Fog.hlsl 255 B

123456789
  1. float3 GetFog(float3 color, float depth)
  2. {
  3. return lerp(color, cFogColor, saturate((depth - cFogParams.x) * cFogParams.z));
  4. }
  5. float3 GetLitFog(float3 color, float depth)
  6. {
  7. return color * saturate((cFogParams.y - depth) * cFogParams.z);
  8. }