2d Normal and Specular Lighting with GLSL in Defold

These are the errors if anyone is wondering:
In Defold 1.8.1

dmloader.js:724 ERROR:GRAPHICS: Unable to compile fragment shader.
printErr @ dmloader.js:724
dmloader.js:724 ERROR:GRAPHICS: ERROR: 0:39: '==' : wrong operand types - no operation '==' exists that takes a left-hand operand of type 'mediump float' and a right operand of type 'const int' (or there is no acceptable conversion)
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:56: 'pow' : no matching overloaded function found
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:59: 'max' : no matching overloaded function found
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:64: '==' : wrong operand types - no operation '==' exists that takes a left-hand operand of type 'mediump float' and a right operand of type 'const int' (or there is no acceptable conversion)
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:84: 'pow' : no matching overloaded function found
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:87: 'max' : no matching overloaded function found
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:92: '==' : wrong operand types - no operation '==' exists that takes a left-hand operand of type 'mediump float' and a right operand of type 'const int' (or there is no acceptable conversion)
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:114: 'pow' : no matching overloaded function found
printErr @ dmloader.js:724
dmloader.js:724 ERROR: 0:117: 'max' : no matching overloaded function found
1 Like