Converting shaders
From GLSL to Godot shaders
Last updated
From GLSL to Godot shaders
Last updated
SCREEN_PIXEL_SIZE
is the inverse of iResolution
Usually on shader toy you will see UV from fragcoord
But in Godot if you want to make shader draw things in object coordinates, then just use
If you have an error message like
then replace the way 2D matrix is created. It must be 2 vectors of floats, but not 4 floats
For example, SCREEN_PIZEL_SIZE
only defined in main fragment()
function, pass it as argument to other functions.