• 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 Shaders broken in GM2?

F

freekshow_kc

Guest
Hello,
are shaders broken in GM2 ?
I imported my GM1.99 Project and shaders behave completely different...

The Output is very different, like when i replace with 1,1,1,1 i get White in gamemaker 1 (255,255,255,1.0)
but i get Cyan on Gamemaker 2 (0,255,255,1.0)
Also the Input is not working as intended, it also seems it always ignores the red value... (only Colors with red = 0 gets replaced...)

any idea how to solve this ? the shader itself is fine but something is very broken :/

edit: i use GLSL ES shader
 
Last edited by a moderator:
You should try the Game Maker 2 beta forum. There is some talk there about GM2 doesn't support HLSL9 anymore, only HLSL11. I don't know enough about shaders to know if this also affects GLSL shaders, but you should check it out.

Link: A GM2 Shader Post
 

xygthop3

Member
Why are you using 255 in a shader? the range is 0-1 so:

Full black = vec4(0.0, 0.0, 0.0, 1.0);
Full white = vec4(1.0, 1.0, 1.0, 1.0);
Full red = vec4(1.0, 0.0, 0.0, 1.0);
Full green = vec4(0.0, 1.0, 0.0, 1.0);
Full blue = vec4(0.0, 0.0, 1.0, 1.0);
grey = vec4(0.5, 0.5, 0.5, 1.0);

etc.... you get the hint.
 
F

freekshow_kc

Guest
Why are you using 255 in a shader? the range is 0-1 so:
my bad explaining it, i use those values within the shader, the color its trying to make is eg 0.97, 0.97, 1.0, 1.0, i pass rgbval/255 of each color and transform into HSV
but the output is 0, 0.97, 1.0, 1.0 (still cyan) :)

its a simple passthrough shader, but all my output and input values miss red ...

i even used 1,1,1,1 in the original question :D
 
F

freekshow_kc

Guest
i removed the shader from this post for various reasons...
i submitted a bug report to GM2, i dont think the problem is somehow shader related especially because GLSL ES should work exactly the same between 1.X and 2.X
 
Last edited by a moderator:
Top