public LightweightRenderPipeline(LightweightRenderPipelineAsset asset) { settings = PipelineSettings.Create(asset); renderer = new ScriptableRenderer(asset); SetSupportedRenderingFeatures(); GraphicsSettings.useScriptableRenderPipelineBatching = asset.useSRPBatcher; PerFrameBuffer._GlossyEnvironmentColor = Shader.PropertyToID("_GlossyEnvironmentColor"); PerFrameBuffer._SubtractiveShadowColor = Shader.PropertyToID("_SubtractiveShadowColor"); PerCameraBuffer._InvCameraViewProj = Shader.PropertyToID("_InvCameraViewProj"); PerCameraBuffer._ScaledScreenParams = Shader.PropertyToID("_ScaledScreenParams"); // Let engine know we have MSAA on for cases where we support MSAA backbuffer if (QualitySettings.antiAliasing != settings.msaaSampleCount) { QualitySettings.antiAliasing = settings.msaaSampleCount; } Shader.globalRenderPipeline = "LightweightPipeline"; Lightmapping.SetDelegate(lightsDelegate); CameraCaptureBridge.enabled = true; }
public LightweightPipeline(LightweightPipelineAsset asset) { m_PipelineSettings = PipelineSettings.Create(asset); SetSupportedRenderingFeatures(); SetPipelineCapabilities(asset); PerFrameBuffer._GlossyEnvironmentColor = Shader.PropertyToID("_GlossyEnvironmentColor"); PerFrameBuffer._SubtractiveShadowColor = Shader.PropertyToID("_SubtractiveShadowColor"); PerCameraBuffer._InvCameraViewProj = Shader.PropertyToID("_InvCameraViewProj"); PerCameraBuffer._ScaledScreenParams = Shader.PropertyToID("_ScaledScreenParams"); m_Renderer = new ScriptableRenderer(asset); // Let engine know we have MSAA on for cases where we support MSAA backbuffer if (QualitySettings.antiAliasing != m_PipelineSettings.msaaSampleCount) { QualitySettings.antiAliasing = m_PipelineSettings.msaaSampleCount; } Shader.globalRenderPipeline = "LightweightPipeline"; }