Hi everyone.
<br>
I'm making a 2D platformer and quite fascinated with what Godot engine is capable of.
<br>But now I'm on a struggle bus with some shading issues.
<br>
On desktop my 2D shaders seems to work quite well.
<br>
However, when I'm running my game on Android device they are gone.
<br>
I'm receiving the following messages from ADB whenever my shader should activate itself:
<br>I/godot (13606): ERROR: set_custom_uniform: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:329.<br>I/godot (13606): ERROR: set_custom_uniform: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:329.<br>I/godot (13606): ERROR: get_custom_uniform_location: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:336.<br>V/AudioTrack(13606): obtainBuffer(1536) returned 1536 = 1536 + 0 err 0<br>V/AudioTrack(13606): obtainBuffer(1024) returned 1024 = 1024 + 0 err 0<br>I/godot (13606): ERROR: set_custom_uniform: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:329.<br>I/godot (13606): ERROR: set_custom_uniform: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:329.<br>I/godot (13606): ERROR: get_custom_uniform_location: Index p_idx out of size (version->custom_uniform_locations.size()).<br>I/godot (13606): At: ./drivers/gles2/shader_gles2.h:336.<br>
All shaders are implemented within materials for the TextureFrame nodes.
<br>
Here's the example of one that doesn't work:
<br>// this is a simple texture-based Vignette modulated shader<br>uniform texture vignette;<br>uniform float lightness;<br>uniform vec3 modulate;<br>vec3 screen = texscreen( SCREEN_UV ).rgb;<br>vec4 tex = tex(vignette, UV) lightness;<br>// combine final color<br>color res = color( tex.r, tex.g, tex.b, tex.a);<br>res.rgb = mix( res.rgb, _screen.rgb, lightness );<br>res.rgb = modulate;<br>COLOR = res;<br>
<br>