- Home /
Rendering after post process does not work in Oculus VR
I am working in Unity 2019.3.0f1 (windows+oculus) and am trying to get my text to render after post processing. To do this I added and "Renderer Feature" override to my ForwardRenderer and set the event to be "After Rendering Post Process" and set the layer to the layer which my UI is on.
Then on my camera I make sure that I set my renderer to be the forward renderer and turn on post-processing like so:
The issue is that my text (which is on the layer "ObstacleMedium") does not show up in Oculus. It will show up when playing in editor without oculus however. At first I thought it might have been my shader for the text (my text is using the built in shader "GUI/Text Shader") but I tried adding a cube with the default unlit shader (I also changed the forward renderer feature features->queue to be opaque for the cube) and it also does not work in oculus (although it does cast a shadow!). Does anyone have any ideas on how to fix this in oculus? I am not sure if it is a bug or I am doing something wrong or if it is just not possible to render after post processing with oculus. Also not I am using Single Pass Instanced rendering.
Edit 1 It will render if I set the render feature to render before post processing but of course this is not what I want as I want my text to display on top of the post processing.
Edit 2 Looking at the frame debugger I can see the opaques getting drawn, then the post processing, and then my render feature pass is getting drawn I think but it does not seem to make it to the final image.
Edit 3 Looking deeper into the frame debugger I notice that all of the opaque and transparent draws have a render target of _CameraColorTexture. The post processing draw then takes this _CameraColorTexture as input and writes to the render target RTUnityEyeTextureArray0. After that my custom render feature pass takes a font texture as input and writes to the render target texture _CameraColorTexture. I think this is the problem as I want to write to the newly created RTUnityEyeTextureArray0 target that the post processing wrote to. I dont know how to change the render target of my font shader to write to this intead of _CameraColorTexture.
Your answer
Follow this Question
Related Questions
Transparency and URP for Oculus Quest 1 Answer
Wierd shading in UV seams 0 Answers
Send vertice shader changes to surface shader 0 Answers
Post-process masking? 0 Answers