{
// If PostProcessing is enabled, it is already blit to CameraTarget.
if (!LightweightUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.PostProcess))
Blit(cmd, renderingConfig, BuiltinRenderTextureType.CurrentActive, BuiltinRenderTextureType.CameraTarget);
Blit(cmd, renderingConfig, BuiltinRenderTextureType.CurrentActive, BuiltinRenderTextureType.CameraTarget, m_BlitMaterial);
}
SetRenderTarget(cmd, BuiltinRenderTextureType.CameraTarget);
private void Blit(CommandBuffer cmd, FrameRenderingConfiguration renderingConfig, RenderTargetIdentifier sourceRT, RenderTargetIdentifier destRT, Material material = null)
cmd.SetGlobalTexture(m_BlitTexID, sourceRT);
if (LightweightUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.DefaultViewport))
cmd.Blit(sourceRT, destRT, material);
if (m_BlitQuad == null)
m_BlitQuad = LightweightUtils.CreateQuadMesh(false);
cmd.DrawMesh(m_BlitQuad, Matrix4x4.identity, m_BlitMaterial);
cmd.DrawMesh(m_BlitQuad, Matrix4x4.identity, material);
Tags { "LightMode" = "LightweightForward"}
ZTest Always ZWrite Off
HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
Pass
ColorMask 0
ZTest Always
ZWrite On
ZTest Always ZWrite Off ColorMask 0