Пример #1
0
 public void Setup(ScriptableRenderContext context, CullingResults cullingResults, TeaShadowSettings settings)
 {
     this.context                  = context;
     this.cullingResults           = cullingResults;
     this.settings                 = settings;
     ShadowedDirectionalLightCount = 0;
     useShadowMask                 = false;
 }
Пример #2
0
    public TeaRenderPipeline(bool useDynamicBatching, bool useGPUInstancing, bool useSRPBatcher, TeaShadowSettings shadowSettings)
    {
        //LightMapShadowMask();

        this.shadowSettings     = shadowSettings;
        this.useDynamicBatching = useDynamicBatching;
        this.useGPUInstancing   = useGPUInstancing;
        GraphicsSettings.useScriptableRenderPipelineBatching = useSRPBatcher;
        GraphicsSettings.lightsUseLinearIntensity            = true;
    }
Пример #3
0
 public void Setup(ScriptableRenderContext context, CullingResults cullingResults, TeaShadowSettings shadowSettings)
 {
     this.cullingResults = cullingResults;
     buffer.BeginSample(bufferName);
     shadows.Setup(context, cullingResults, shadowSettings);
     SetupLights();
     shadows.Render();
     buffer.EndSample(bufferName);
     context.ExecuteCommandBuffer(buffer);
     buffer.Clear();
 }
Пример #4
0
    public void Render(ScriptableRenderContext context, Camera camera, bool useDynamicBatching, bool useGPUInstancing, TeaShadowSettings shadowSettings)
    {
        this.context = context;
        this.camera  = camera;

        PrepareBuffer();
        PrepareForSceneWindow();
        if (!Cull(shadowSettings.maxDistance))
        {
            return;
        }

        buffer.BeginSample(SampleName);
        ExcuteBuffer();
        lighting.Setup(context, cullingResults, shadowSettings);
        buffer.EndSample(SampleName);
        Setup();
        DrawVisibleGeometry(useDynamicBatching, useGPUInstancing);
        DrawUnsupportedShaders();
        DrawGizmos();
        lighting.Cleanup();
        Submit();
    }