diff --git a/com.unity.render-pipelines.universal/CHANGELOG.md b/com.unity.render-pipelines.universal/CHANGELOG.md index 35931ced6e1..b25a5d0b555 100644 --- a/com.unity.render-pipelines.universal/CHANGELOG.md +++ b/com.unity.render-pipelines.universal/CHANGELOG.md @@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - 2D shaders now use half-precision floats whenever precise results are not necessary. - Removed the ETC1_EXTERNAL_ALPHA variant from Shader Graph Sprite shaders. - Eliminated GC allocations caused by the 2D Renderer. +- Made the density output of Fog Node to be more consistent with how URP mix fog color. This output can be used to mix material color with fog color by using a Lerp Node to lerp between material color and fog color. ### Fixed - Fixed a performance problem with ShaderPreprocessor with large amount of active shader variants in the project diff --git a/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl b/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl index f4df7d028b0..5280743339d 100644 --- a/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl +++ b/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl @@ -57,7 +57,7 @@ float3 shadergraph_LWReflectionProbe(float3 viewDir, float3 normalOS, float lod) void shadergraph_LWFog(float3 position, out float4 color, out float density) { color = unity_FogColor; - density = ComputeFogFactor(TransformObjectToHClip(position).z); + density = ComputeFogIntensity(ComputeFogFactor(TransformObjectToHClip(position).z)); } // This function assumes the bitangent flip is encoded in tangentWS.w