- Home /
Problem of using multiple scripts attached to camera containing OnPostRender() for VR projects
Hi, I am using one free asset in my project which has OnPostRender() function in script attached to camera. I am also using compute shader in my project where I need to pass compute buffer data to material in OnPostRender() in another script attached to camera , and I have another script related to Vive lens which also has OnPostRender() .
Now the problem is, if asset script component is disabled for the camera, my compute shader vertices are coming at correct positions, vive lens script is also working correct. If asset script component is enabled, compute shader vertices positions are changed , and data is rendered only to one eye related to functionality in vive lens script.
I am having this problem in my project (of Unity 2017.2.0 version) which is virtual reality enabled, with single pass stereo, and the asset is also upgraded to use with Unity 2017.2.0.
Will there be any problem in using multiple scripts containing OnPostRender() attached to camera? Does the order of attaching these as components to camera matter, in virtual reality enabled projects.
Why it's happening, and what is the way to solve it ??
Your answer
Follow this Question
Related Questions
Update Mesh immediately for rendering While changing blendshape 1 Answer
DrawProcedural() in OnPostRender() drawing over transparent objects 1 Answer
Render a camera multiple times in a single frame? 1 Answer
Using stencil buffer for outline effect 0 Answers
Do I have to turn on camera relative rendering in URP? 0 Answers