浏览代码

Fixed truncation warnings in LW shaders.

/main
Felipe Lira 7 年前
当前提交
0571f34d
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 2
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightShaderLibrary/Core.hlsl
  2. 3
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardTerrain.shader

2
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightShaderLibrary/Core.hlsl


void ApplyFog(inout half3 color, half fogFactor)
{
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
color = lerp(unity_FogColor, color, fogFactor);
color = lerp(unity_FogColor.rgb, color, fogFactor);
#endif
}
#endif

3
ScriptableRenderPipeline/LightweightPipeline/LWRP/Shaders/LightweightStandardTerrain.shader


half3 indirectDiffuse = half3(0, 0, 0);
#if LIGHTMAP_ON
float4 lightmapUV = half4(IN.uvControlAndLM.zw, 0.0, 0.0);
indirectDiffuse = SampleLightmap(lightmapUV, normalWS);
indirectDiffuse = SampleLightmap(IN.uvControlAndLM.zw, normalWS);
#endif
half3 viewDirectionWS = SafeNormalize(_WorldSpaceCameraPos - IN.positionWS);

正在加载...
取消
保存