Hi,
I’m trying to apply a custom post processing effect and built for webgl but so far my shader has been completely ignored everytime (the game still renders), without any related warning or error in the browser’s console.
I’m using URP and the “Full Screen Pass Renderer Feature” feature with a shader-graph, but also tried using a ScriptableRendererFeature from the web (that didn’t work either).
Other things I tried :
- changing precision mode on my shader graph to half
- setting webgl mode to version 2 only
- added my shader as “always included”
- used another shader from URP package (FullscreenInvertColors)
- used a flat screen color shader
- Setting “requirements” to all in the “Full Screen Pass Renderer Feature” options
- Most likely other things I simply forgot
Notably in the editor the effect works.
Any idea what could be the problem?
Is what I am doing impossible?
I couldn’t find much info on the web.
Are you aware of the state of WebGL rendering? It’s equivalent to OpenGLES 3.0 which roughly means a decade-old graphics technology. Many shader features that we’ve come to expect on desktop GPUs are simply not available. You can review the specs here although it’s quite a long read.
I doubt Shader Graph will actively inform you of anything that isn’t supported for a given platform. You may want to post your graph, perhaps someone with experience in Shader Graph and WebGL can point out some issues.
Are you making development builds?
I’m roughly aware of webgl’s limitations (no compute shaders, single thread, slow etc…)
My issue isn’t with the specific shader i’m using though, but with the URP/SRP pipeline: “Full Screen Pass Renderer Feature” doesn’t seem to work at all.
As I stated, I tried simply passing the simplest shader possible (color node to fragment) and it wasn’t applied in webgl.
It might be that this feature is not ready for webgl (it’s quite recent AFAIK), in which case I’d be glad to have some kind of confirmation, or even better a workaround.
I didn’t try a development build, but I will!
Hmmm I wonder, perhaps you have to enable post-processing for fullscreen features to work? It’s amounting to the same thing.
Also check the Quality settings, for a while now the WebGL builds (and mobile) have their own Quality settings, different from the one used for the editor (and desktop etc platforms). This often strikes devs unexpectedly because there’s no obvious hint (other than bad quality) that you’re working with a different quality level and possibly a different renderer asset, too.
Because of the latter, also check that the WebGL quality setting has a renderer asset assigned, and that this renderer asset is where you enable / add your custom render pass.
1 Like
That was it!
As you said, wrong webgl-specific quality setting.
The feature works as intended now.
Thanks for taking your time!
1 Like