Hello, I’m trying to create a pixelation effect in node material editor.
Someone knows how to get this done?
Should work more or less like this frag shader:
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D textureSampler;
uniform vec2 screenSize;
uniform float pixelationLevel;
void main()
{
vec2 pixelSize = vec2(1.0 / screenSize.x, 1.0 / screenSize.y);
vec2 uv = gl_FragCoord.xy * pixelSize;
uv = floor(uv / pixelationLevel) * pixelationLevel;
gl_FragColor = texture2D(textureSampler, uv);
}