Batiste
February 29, 2024, 1:19pm
1
Godot Version
4.2.1
Something strange occurs with my shader that i dont understand
This is the shader
Adaptation to godot from zenek1290 minecraft shader
[colorblindSample]
Apply the shader material to a mesh and look through it
The shader has 5 modes
0-No modification
1-protanopia
2-deuteranopia
3-tritanopia
4-achromatopsia
shader_type spatial;
render_mode unshaded;
uniform sampler2D SCREEN_TEXTURE:hint_screen_texture;
uniform int mode : hint_range(0,4) = 0;
const mat4 prota = mat4(
vec4(0.170556992,0.170556991,-0.004517144,0.0),
vec4(0.829443014,0.829443008,0.004517144 ,0.0),
v…
every time you create it for the first time everything works fine
but you close the editor, reopen it again and something happens with the colours
on this point, change the name of the shader variables and works again
and ingame always shows the wrong colors even though it shows the correct ones in the editor
I understand nothing