|
|
|
|
|
|
|
|
|
|
public static class BasicRendering |
|
|
|
{ |
|
|
|
// Main entry point for our scriptable render loop
|
|
|
|
|
|
|
|
static void ConfigureAndBindIntermediateRenderTarget(ScriptableRenderContext context, Camera cam, bool stereoEnabled, out RenderTargetIdentifier intermediateRTID, out bool isRTTexArray) |
|
|
|
{ |
|
|
|
var intermediateRT = Shader.PropertyToID("_IntermediateTarget"); |
|
|
|
|
|
|
|
|
|
|
if (stereoEnabled) |
|
|
|
{ |
|
|
|
RenderTextureDescriptor vrDesc = XRSettings.eyeTextureDesc; |
|
|
|
vrDesc.depthBufferBits = 24; |
|
|
|
RenderTextureDescriptor xrDesc = XRSettings.eyeTextureDesc; |
|
|
|
xrDesc.depthBufferBits = 24; |
|
|
|
if (vrDesc.dimension == TextureDimension.Tex2DArray) |
|
|
|
if (xrDesc.dimension == TextureDimension.Tex2DArray) |
|
|
|
bindIntermediateRTCmd.GetTemporaryRT(intermediateRT, vrDesc, FilterMode.Point); |
|
|
|
bindIntermediateRTCmd.GetTemporaryRT(intermediateRT, xrDesc, FilterMode.Point); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
CommandBufferPool.Release(blitIntermediateRTCmd); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// Main entry point for our scriptable render loop
|
|
|
|
|
|
|
|
public static void Render(ScriptableRenderContext context, IEnumerable<Camera> cameras, bool useIntermediateBlitPath) |
|
|
|
{ |
|
|
|