- Home /
OnPreRender updates shader parameters for each eye in 5.3 but not in 5.4?
I want to show different regions of a texture to each eye when VR support is enabled.
In Unity 5.3.5 I could implement OnPreRender() so that a shader parameter would be changed to select the region of the texture to display.
When I upgraded to 5.4.2 I found that while OnPreRender() was called twice, and the shader parameter was reported as changed, but the same region was displayed to both eyes.
Since Unity 5.4 introduces single-pass stereo rendering I tried enabling this mode. In this case OnPreRender() was called only once (as expected) so both eyes still saw the same texture region. (In successive frames the visible region is changed back and forth, which is expected but unpleasant.)
Clearly I need to stick with 5.3 for now... if anyone can clarify whether this is an intended behavior (and so will persist in future releases) or is a bug (and so will be fixed) I would be glad to know :-)
Details: Using Windows 10 and the DK2 HMD from Oculus.