i am learning how to write shaders and am not too experienced.
I use real-time reflection probes for my water and it gives shimmer free reflections that blur nicely when I lower the reflection probe resolution.
But real-time reflection probes are expensive and don’t reflect everything. So I am testing a planar reflection water shader. The Planar reflections use less cpu and reflect everything.
the planar reflection is injected into my shader as a sampler2d texture. But no matter what resolution I capture the reflection in, I get a shimmering, point filtered look to the reflection that I don’t see with the reflection probes. The reflection probe cube map almost seems to come with some sort of temporal anti aliasing built in or something that makes for a nice blurred and stable reflection.
I would like to know how I can resize the planar reflection in my shader? I am thinking it would be an efficient way to blur the reflection if I shrink it in the shader code. (I can resize the size of the planar reflection texture before I inject it into the shader, but it doesn’t blur and keeps the point filtered shadow maker look. ) Or can I somehow apply bilinear filtering to the reflection texture sampler2d in the shader?
Here is an example of the problem. I am switching between the real-time reflection probe water and the planar reflection water. You can see specially in the distance how the planar reflection texture is too sharp, point filtered and noisy.
We are working on a smaller update that will add more settings to the way the reflections are generated internally (allowing you to set up bilinear filtering, mip maps generation and other options to the internal reflection texture) but you can also assign a manually created RenderTexture asset to the reflection renderer component and set up these parameters in your manually created RenderTexture. Hopefully this would stop the shimmering
The update will be available next week (around Friday) but in the meantime we believe using an external RenderTexture asset may help.
Another update (which has become quite necessary) to allow for high quality blurring of the reflection on any shader through the Planar Reflections Caster component is also on the way, but it may still take a little longer to be ready for public use (we are currently testing it internally on URP and HDRP) and we do not think it will be available before mid June.
We wish we had seen your post sooner instead of almost a week later when browsing the forums, but we hope that this still provides some help. Have a great day!
Please take ke your time:) as you know, and for anyone reading this, I love your PIDI planar shader. It’s better to do it right than to rush things. As it is now the water looks wonderful- the blurring would be an extra bonus option for an artistic look.