Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
btrusler's avatar
btrusler
Honored Guest
13 years ago

GUI.DrawTexture with OVR

I'm trying to apply a vignette effect of a helmet across the two rift cameras, but it is drawing the texture seemingly on a different layer to the cameras. I've tried attaching the vignette script/texture to each individual camera but the result is the same.

Has anyone come up with a solution to this or encountered this issue before?

I've included a picture to help show my problem:
http://imgur.com/zFVaVPK

1 Reply

Replies have been turned off for this discussion
  • Any draw calls initiated within OnGUI will not be affected by post-processing effects applied on the rendertarget, because OnGUI is called only after the scene rendering stages have completed. GUI elements will not be affected by post-processing shaders. This is well documented. Here's a good wiki article that lets you explorer the Unity pipeline.

    http://wiki.unity3d.com/index.php?title=Event_Execution_Order

    If you want your helmet to be affected by the vignette shader, then it must be rendered as part of the scene.