浏览代码

Add high level camera callbacks to HD / LW.

/2018.1
Tim Cooper 7 年前
当前提交
449b2c69
共有 2 个文件被更改,包括 7 次插入1 次删除
  1. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs
  2. 3
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipeline.cs


using System.Collections.Generic;
using System.Collections.Generic;
using UnityEngine.Rendering;
using System;
using System.Diagnostics;

public override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
{
base.Render(renderContext, cameras);
BeginFrameRendering(cameras);
if (m_FrameCount != Time.frameCount)
{

{
if (camera == null)
continue;
BeginCameraRendering(camera);
if (camera.cameraType != CameraType.Reflection)
// TODO: Render only visible probes

3
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


public override void Render(ScriptableRenderContext context, Camera[] cameras)
{
base.Render(context, cameras);
BeginFrameRendering(cameras);
GraphicsSettings.lightsUseLinearIntensity = true;
SetupPerFrameShaderConstants();

foreach (Camera camera in cameras)
{
BeginCameraRendering(camera);
bool sceneViewCamera = camera.cameraType == CameraType.SceneView;
bool stereoEnabled = XRSettings.isDeviceActive && !sceneViewCamera;
m_CurrCamera = camera;

正在加载...
取消
保存