I have a debug shader that shows overdraw, it worked fine until I added a sprite with a tinting script. The shader is super simple.
overdraw.fp
varying mediump vec4 position;
varying mediump vec4 var_color;
uniform lowp vec4 tint;
void main()
{
gl_FragColor = vec4(0.12, 0.0, 0.0, 0.0);
}
overdraw.vp
uniform mediump mat4 view_proj;
uniform mediump mat4 world;
attribute mediump vec4 position;
attribute mediump vec2 texcoord0;
varying lowp vec4 var_color;
void main()
{
gl_Position = view_proj * vec4(position.xyz, 1.0);
var_color = vec4(1.0, 1.0, 1.0, 1.0);
}
Other relevant stuff is here.
The error I get is this
ERROR:GRAPHICS: gl error 1282: invalid operation
Assertion failed: 0, file ..\src\opengl\graphics_opengl.cpp, line 1141
But I can’t figure out why, help would be appreciated.