Ogre Version: 2.2
Operating System: Windows 10
Render System: Direct3D11
Hi, I am in the process of upgrading our software from Ogre 2.1 to 2.2. Most things are working smoothly, thanks for the improvements! Last step is getting VR to work again. In OgreV1 and up until 2.1 I used a self-made solution to update to camera position from VR, render the two cameras and present to OpenVR. I decided to move away from it and adopt the demo implementation to get the benefits of Ogre’s implementation of radial density, hidden area mesh, a working system (with possible future updates) and all this without adopting my own solution to the new way of handling textures.
In my scene I use the HlmsPbs with some custom modifications. This is working ok so far. Now I tried to reactivate the HlmsUnlit that I use to render lines. In the Ogre branch 2.2 I had a problem with HlmsUnlit not being aware of instanced stereo and therefore only rendering to one eye. I was able to adapt the 2.2 source code with the changes from master aka the "instanced stereo unlit" branch. Now my lines are rendering to both eyes - yay. Next problem now is culling. Both eyes use their own culling camera.
I and now trying to analyse the rest of the changes I did not port yet to find what is necessary for the culling to work correctly.
- Is the current HlmsUnlit implementation capable of using only a single culling camera for VR?
If it should be capable, I will try to replicate my issues by extending the demo. - If it is not, and this is my guess at this moment, I am trying to understand the changes in HlmsPbs with ForwardPlus and instanced stereo and I am hitting a wall. As unlit does not need lighting I am unsure which parts are important to port.
This is a snippet I found in the ForwardPlus file that indicates, that culling is correctly compensated for PBS.Code: Select all
@property( hlms_instanced_stereo ) float2 fwdFragCoord = inPs.cullCamPosXY.xy * (1.0f / inPs.cullCamPosXY.z); fwdFragCoord.xy = fwdFragCoord.xy * 0.5f + 0.5f;