0 votes

Hello guys, I'm trying to translate a very simple and short shader, that I have listed here on shadertoy .
And here is my godot shader code .

The problem is, in shadertoy output, the shader "overlays" the image, and quantizes and dithers the colors of set image (iChannel0) ordered by bayer8x8 texture (iChannel1). I've tried using a TextureRect node with the same bayer8x8 texture, and assigning the shader to it. But for some reason it renders a weird pattern on a solid black color instead. I'm really close to having it work but I have no clue at all what can be causing this now.
Here is a screenshot from godot.

Any help is highly appreciated!

asked Dec 11, 2019 in Projects by blank (131 points)

1 Answer

+1 vote

The resolution in godot shader expressed as follows:
your code :
getSceneColor (uvPixellated / SCREEN_PIXEL_SIZE.xy, SCREEN_TEXTURE);
So according to Shadertoy's code, it should look like this:
vec3 dc = getSceneColor(uvPixellated / (1.0 / SCREEN_PIXEL_SIZE), SCREEN_TEXTURE);

answered Dec 12, 2019 by estebanmolca (1,203 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.