- Home /
URP Bokeh DoF not showing in render texture
Hello, I have created a new project using the Universal Render Pipeline and set up a simple scene with a post processing volume.
When the camera is rendered straight to the display (on the left), bokeh DoF is shown correctly, but when rendered to a render texture (on the right), while a DoF is present, it looks completely different and does not have the bokeh effect.
Other post processing effects seem to work fine.
I can't seem to find the answer in documentation or the forums, but I don't understand the problem. Maybe bokeh is simply incompatible with the render pipeline. Is there a way to get the correct effect in the render texture?
Both images appear to have the same filter applied to them, however the one on the right appears to be LDR (with a low dynamic colour range). I would make sure your rendertexture is an HDR colour format (DefaultHDR, ARGBHalf, etc).
That's it! Still looks slightly different but totally workable now, thanks very much! Knew I was missing something. Still surprised that was the solution as the glowey bokeh blobs aren't there in that colour format so I was convinced it was drawing after the rendertexture but I'm glad it was such a simple fix (:
The bokeh is actually still there, but because it's working with information in a [0,1] range the contrast isn't enough to actually emphasise the highlights and spread properly to other pixels. You would be able to see it in LDR if you made the rest of your scene incredibly dark in comparison, although it still wouldn't be as strong.
Your answer
Follow this Question
Related Questions
Universal Render Pipeline Execlude objects from global volume (Post Prossesing) 0 Answers
HDR data is not rendered into render texture when using URP 2 Answers
Unity Terrain Holes Not Showing 1 Answer
How to do texture bombing in shader graph 0 Answers
How can i active again a render texture after set it to null ? 1 Answer