public void Render( ScriptableRenderContext context, Camera camera, bool useDynamicBatching, bool useGPUInstancing, bool useLightsPerObject, ShadowSettings shadowSettings, PostFxSettings postFxSettings ) { this.context = context; this.camera = camera; PrepareBuffer(); PrepareForSceneWindow(); if (!Cull(shadowSettings.maxDistance)) { return; } buffer.BeginSample(SampleName); ExecuteBuffer(); lighting.Setup( context, cullingResults, shadowSettings, useLightsPerObject); postFxStack.Setup(context, camera, postFxSettings); buffer.EndSample(SampleName); Setup(); DrawVisibleGeometry(useDynamicBatching, useGPUInstancing, useLightsPerObject); DrawUnsupportedShaders(); DrawGizmos(); if (postFxStack.IsActive) { postFxStack.Render(frameBufferId); } Cleanup(); Submit(); }
public CustomRenderPipeline( bool useDynamicBatching, bool useGPUInstancing, bool useSRPBatcher, bool useLightsPerObject, ShadowSettings shadowSettings, PostFxSettings postFxSettings) { this.postFxSettings = postFxSettings; this.shadowSettings = shadowSettings; this.useDynamicBatching = useDynamicBatching; this.useGPUInstancing = useGPUInstancing; this.useLightsPerObject = useLightsPerObject; GraphicsSettings.useScriptableRenderPipelineBatching = useSRPBatcher; GraphicsSettings.lightsUseLinearIntensity = true; InitializeForEditor(); }
public void Setup(ScriptableRenderContext context, Camera camera, PostFxSettings settings) { this.context = context; this.camera = camera; this.settings = camera.cameraType <= CameraType.SceneView ? settings : null; }