Basic use case using prototype engine code living in Hg graphics/srp/xr-renderpass-sandbox. Works with single pass double-wide.
Engine handles connecting CameraTarget to VR device texture.
Remaining work:
* Support stereo instancing
* Support transient textures
The important changes here are actually to support stereo instancing and multiview.
I'm not sure if I need the multi_compile bit, but it's nice as an example.
The clear code wasn't clearing depth if the camera clear flag was set to Skybox. The skybox rendering is dependent on depth being cleared initially, so it can fill in areas that opaque rendering hasn't covered. But right now, depth is not being cleared, which breaks rendering.
This is a temporary fix for the clear code, as it isn't entirely optimal for TBDR GPUs. Ideally, the first camera in the camera stack will clear both depth and color in order to prevent tile initialization. Then the following cameras will avoid color clearing as they will need to load the contents from the previous camera render. This code will be amended when Felipe adds camera stack support to LightweightPipeline.
Do some plumbing in order to set up a UI interface for BasicRenderPipeline, in order for the actual rendering to pick up this option. It will be used to configure an example intermediate target for rendering.
Script changes were relatively trivial.
The only real tricky part I ran into was that I had to change the temporary RT release point to after the final blit, because of how texture arrays work right now if you need to blit between them. If the reference is released too early, the texture is freed just before the blit. This only affects the Stereo Instanced path.
- Debug Diffuse Lighting albedo override now works correctly for SSS materials.
- GBuffer debug now only shows GBuffer enabled material (no more forward only materials)
- Changed previous fix of PS4 crash in ShaderPassForward (it caused debug lighting for transparent objects to break).