Godot Version
4.2.2-stable
Question
I wanted to try and convert a shadertoy fragment shader to a gdshader that is applied to a Sprite3D.
The function signature in shadertoy is
void mainImage( out vec4 fragColor, in vec2 fragCoord )
How do I convert this into a gdShader? I don’t need to show the entire shader because none of it reports a syntax error aside from these:
The SCREEN_PIXEL_SIZE value mentioned in the documentation does not work within the fragment() function. FRAGCOORD.xy does work, but the output color ALBEDO is a vec3 (not a vec4). Fragment also doesn’t have an output so I assumed that I just need to set the ALBEDO to change the color of a specific pixel on the Sprite3D.