Android Shader Conversion Error (SOLVED)

Hey, so I have some lighting materials and fps and vps etc… to get it all working and inside the editor build and standalone this works fine, however when porting the project to android it throws this error (using the adb debugger) any ideas on how I can fix this?

ERROR: 0:45: ‘’ : wrong operand types no operation '’ exists that takes a left-hand operand of type ‘const int’ and a right operand of type ‘4-component vector of float’ (or there is no acceptable conversion)

ERROR: 0:45: ‘assign’ : cannot convert from ‘const int’ to ‘4-component vector of float’

GLES 2 does not support that kind of type conversion, but your desktop graphics card likely supports it and happily compiles and runs the code.

The fix is to change the code so it is GLES 2 compliant.

3 Likes

Ah this makes more sense now, sorry I am new to the whole shader thing !

2 Likes

Looks like this issue when on mac it shows errors of GLES version , but on Windows it depend of drivers of something like this.

Yeah it does appear that way, I have since had more GLES version errors and they are only picked up using the android build, on my (windows) development machine there is no error.

1 Like