浏览代码

Fixed shader error when in color space gamma.

/main
Felipe Lira 7 年前
当前提交
1496a464
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightCore.cginc

4
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightCore.cginc


#if defined(UNITY_COLORSPACE_GAMMA)
#define LIGHTWEIGHT_GAMMA_TO_LINEAR(gammaColor) gammaColor * gammaColor
#define LIGHTWEIGHT_LINEAR_TO_GAMMA(linColor) sqrt(color)
#define OUTPUT_COLOR(color) return half4(LIGHTWEIGHT_LINEAR_TO_GAMMA(color.rgb), color.a)
#define LIGHTWEIGHT_LINEAR_TO_GAMMA(linColor) sqrt(linColor)
#define OUTPUT_COLOR(color) half4(LIGHTWEIGHT_LINEAR_TO_GAMMA(color.rgb), color.a)
#else
#define LIGHTWEIGHT_GAMMA_TO_LINEAR(color) color
#define LIGHTWEIGHT_LINEAR_TO_GAMMA(color) color

正在加载...
取消
保存