Usually, in the stereo instancing path, we source unity_StereoEyeIndex from the fragment input structure's stereoTargetEyeIndex member. In fact, stereoTargetEyeIndex is needed as it is bound to the SV_RenderTargetArrayIndex semantic, which dictates which render target array slice is rasterized to.
However, for whatever reason, reading stereoTargetEyeIndex is not reliable in the fragment shader. However, if I use the raw instance ID passed into the fragment shader, that works correctly. More work probably needs to be done, but this is fine for now.
Our internal blit code does not want to bind all slices of a texture array if either the source of destination isn't a texture array. If we use a NULL source, then the engine won't bind all slices.
Even though we don't need a source, I can bind the screenspace shadow map texture in order to satisfy the engine. We need to fix the engine, or use another path in engine.
The screenspace shadow map generation still isn't quite working, but at least all slices are bound!
The screen-space shadow map texture coordinates need to be corrected for stereo, but it has to happen after the perspective divide in SampleScreenSpaceShadowMap
- Upgrades to Standard, Simple Standard and Unlit
- Split Rendering Mode into Surface Type and Blending Mode
- Add premultiply option to Simple Standard
- Make Alpha Clip Orthogonal
- Add two sided toggle
- Add Additive and Multiply blend modes
- Rename all blend modes to match HD and SG
- Rename Alpha Cutoff to Clip Threshold
- Remove unused "_ALPHABLEND" keyword
- Split premultiply and clip keywords
- Update material upgrader to reflect changes
- Various shader GUI fixes
Keywords: Adds 1 to Simple, Removes 1 from Unlit, PBR stays the same