• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Shaders Do shaders work differently for different platforms?

M

MexicanBurrito

Guest
Was working on a shader when it struck me; "will this even work on Playstation 4 or Xbox One?". So I just wanted to ask any experienced developer here if that is the case and what is different.
 

Roa

Member
No, not really. Different platforms have different shader types they accept, but the ones for gamemaker are pretty universal. You should be fine if its open GL based.
 

RujiK

Member
To expand:
IDEALLY (And normally) a shader will look the same from platform to platform.

BUT some shaders do work differently depending on the hardware. I remember awhile back there was a shader that worked for most people but with a few the entire screen just turned white. And this was just on windows.

I would only worry about this if you actually run into the problem though, as it seems most shaders are universal.
 

Mike

nobody important
GMC Elder
For the most part yes. We auto-convert the GLSL ES shader into all other shader types (although you can write directly in the platform shader type - OpenGL, HLSL etc. if you want to).

BUT..... hardware does differ. If you have some highly specialised and complex shaders, you may notice inaccuracies on different platforms. Windows machines are large, expensive bits of kit, Android devices aren't. This means the hardware might "cut" corners. I had a shader for my ZX Spectrum emulator that extracted "bits" from a floating point number. This was easy in windows, but on some Android devices, it became clear some "bits" weren't there. It was like the hardware was 31 bits, not 32. Now chances are...... its the maths that they cut corners on, but either way, its clear the way they get the job doe differs massively.

http://www.yoyogames.com/blog/89

What this means though, is that when you write a shader, you will have to "tune" it on every device. It'll run.... but it might not run as expected due to hardware variances. You should however be able to "fix" it so that the same source runs on every device.
 
M

MexicanBurrito

Guest
Thanks for the help! Will definitely keep all this in mind as I progress!
 
Top