SCREEN TEXTURE does not work work when deploying for web

Godot Version

v4.2.stable.official [46dc27791]

Question

I’m trying to create a blur effect using the SCREEN TEXTURE, since the new syntax was implemented to this – > (uniform sampler2D SCREEN_TEXTURE: hint_screen_texture,) stop working on web , however it works fine on the engine.

I’ve even find different solutions for the blur, like a Gaussian algorithm for the GLES2, although it kills my performance

1 Like

I’ve tried a different shader, the example from Godot documentation, however I used the saturation shader (SCREEN TEXTURE EXAMPLE ), which uses the same line for the blur,

vec3 c = textureLod(screen_texture, SCREEN_UV, 0.0).rgb;

and it works fine when deploying for web, just the blur shader is not working…

Check the documentation about screen reading shaders Screen-reading shaders — Godot Engine (stable) documentation in English it’s explained there what you need to do to get textureLod() working correctly.

1 Like

I’ve checked it, it works fine for me inside the engine, that just doesn’t work when I try it on web

There is an open github issue for this. According to the thread, it seems this issue regressed between versions 4.1 and 4.2.

Please share if you found a work around, my web export project is in trouble because of this bug.