• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX Error shader from mac to windows : == operand conversion

B

bilouw

Guest
Hello,

I've wrote a shader (GLSL_ES) that works great on my mac, but when i try to put the shader on a windows platform, i have errors (all the same). The errors say :

'==' : wrong operand type no operation '==' exist that takes a left-operand of type 'float' and a right-operand of type 'const mediump int' (or there is no acceptable conversion).

I don't understand because i don't have precision like "mediump" specified in my fragment shader code. And it works great on my mac.

Do you have any clues?

Thanks!

EDIT : I just tried with shader type 'HLSL' and it compile! But i don't understand, the documentation say "All target platforms" for 'GLSL_ES', so why it doesn't work on windows plarform?

EDIT 2: There are still errors, so the compile isn't successful.

EDIT 3 : Ok, so i understand that gamemaker don't really support GLSL_ES on windows, instead gamemaker convert GLSL_ES code into HLSL code. And there is the problem! Something goes wrong when gamemaker convert the code (related to precsion type).

EDIT 4 : Ok i found. At some point in my code, i do things like : if colour.r == 1 && ... this work in GLSL_ES but when gamemaker convert this into HLSL code, "1" is considered like an integer and not a float, so the operation is not allowed! I need to write "1.0" instead of 1 every time this is a float (that seem logic)

EDIT 5 : I still had a problem with the shader behavior and it came from the fact that $ffff0000 is RED color on mac, but is BLUE color on windows (color inverted). Do you know why? I did a thread especially for that, see you there!
 
Last edited by a moderator:
Top