浏览代码

HDRenderLoop: Fix issue wih debug param after refactor

/main
Sebastien Lagarde 8 年前
当前提交
383c4443
共有 3 个文件被更改,包括 15 次插入3 次删除
  1. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs
  2. 4
      Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl
  3. 11
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs

3
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs


VertexNormalWS,
VertexColor,
VertexColorAlpha,
// caution if you add something here, it must start below
};
// Number must be contiguous

Depth = DebugViewVarying.VertexColor + 1,
Depth = DebugViewVarying.VertexColorAlpha + 1,
BakeDiffuseLighting,
}
}

4
Assets/ScriptableRenderLoop/HDRenderLoop/Debug/DebugViewMaterial.cs.hlsl


//
// UnityEngine.Experimental.ScriptableRenderLoop.Attributes.DebugViewGbuffer: static fields
//
#define DEBUGVIEWGBUFFER_DEPTH (9)
#define DEBUGVIEWGBUFFER_BAKE_DIFFUSE_LIGHTING (10)
#define DEBUGVIEWGBUFFER_DEPTH (10)
#define DEBUGVIEWGBUFFER_BAKE_DIFFUSE_LIGHTING (11)
#endif

11
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


Shader.SetGlobalInt("_EnvLightSkyEnabled", 0);
}
var invViewProj = Utilities.GetViewProjectionMatrix(camera).inverse;
var screenSize = Utilities.ComputeScreenSize(camera);
var cmd = new CommandBuffer { name = "Push Global Parameters" };
cmd.SetGlobalVector("_ScreenSize", screenSize);
cmd.SetGlobalMatrix("_InvViewProjMatrix", invViewProj);
renderLoop.ExecuteCommandBuffer(cmd);
cmd.Dispose();
m_lightLoop.PushGlobalParams(camera, renderLoop);
}

正在加载...
取消
保存