浏览代码

HDRenderLoop: Miss one file in previous commit

/main
sebastienlagarde 8 年前
当前提交
4f1e723e
共有 1 个文件被更改,包括 9 次插入4 次删除
  1. 13
      Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs

13
Assets/ScriptableRenderLoop/HDRenderLoop/ShaderConfig.cs


// Changing a value in this enum Config here require to regenerate the hlsl include and recompile C# and shaders
public class ShaderConfig
{
public const int VelocityInGbuffer = (int)ShaderOptions.VelocityInGBuffer;
public const int PackgbufferInU16 = (int)ShaderOptions.PackGBufferInU16;
// const variable produce warning like this one: warning CS0162: Unreachable code detected
// If we want to avoid them we can add #pragma warning disable 162, however doing that make the debugger shift his line count when debugging which is really annoying
// so here we decalare two kind of variable, one const that can be use in enum init and one static so the compiler doesn't complain. It mean that the conditional code will stay
// but it is usually small, so we are fine with it (until someone at microsoft fix the debuggger).
public const int k_VelocityInGbuffer = (int)ShaderOptions.VelocityInGBuffer;
public static int s_VelocityInGbuffer = (int)ShaderOptions.VelocityInGBuffer;
public const int k_PackgbufferInU16 = (int)ShaderOptions.PackGBufferInU16;
public static int s_PackgbufferInU16 = (int)ShaderOptions.PackGBufferInU16;
//#define VELOCITY_IN_GBUFFER
正在加载...
取消
保存