Skip to content

Commit 5cd9363

Browse files
anisunitysebastienlagarde
authored andcommitted
Fixed a shader warning in the volumetric clouds combine file. (#6410)
* - Fixed a shader warning in the volumetric clouds combine file. * more warnings
1 parent dcebfdc commit 5cd9363

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3838
- Fixed for screen space overlay rendered by camera when HDR is disabled.
3939
- Fixed dirtiness handling in path tracing, when using multiple cameras at once (case 1376940).
4040
- Fixed taa jitter for after post process materials (case 1380967).
41+
- Fixed a shader warning in the volumetric clouds combine file.
4142

4243
## [13.1.2] - 2021-11-05
4344

com.unity.render-pipelines.high-definition/Runtime/Lighting/VolumetricLighting/VolumetricCloudsCombine.shader

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Shader "Hidden/HDRP/VolumetricCloudsCombine"
138138
float4 Frag(Varyings input) : SV_Target
139139
{
140140
// Points towards the camera
141-
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS));
141+
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS).xyz);
142142
// Fetch the clouds
143143
return SAMPLE_TEXTURECUBE_LOD(_VolumetricCloudsTexture, s_linear_clamp_sampler, viewDirWS, _Mipmap);
144144
}
@@ -157,7 +157,7 @@ Shader "Hidden/HDRP/VolumetricCloudsCombine"
157157
float4 Frag(Varyings input) : SV_Target
158158
{
159159
// Construct the view direction
160-
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS));
160+
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS).xyz);
161161
// Fetch the clouds
162162
float4 clouds = SAMPLE_TEXTURECUBE_LOD(_VolumetricCloudsTexture, s_linear_clamp_sampler, viewDirWS, _Mipmap);
163163
// Inverse the exposure
@@ -183,7 +183,7 @@ Shader "Hidden/HDRP/VolumetricCloudsCombine"
183183
float4 Frag(Varyings input) : SV_Target
184184
{
185185
// Construct the view direction
186-
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS));
186+
float3 viewDirWS = -normalize(mul(float4(input.positionCS.xy * (float)_Mipmap, 1.0, 1.0), _PixelCoordToViewDirWS).xyz);
187187
// Fetch the clouds
188188
float4 clouds = SAMPLE_TEXTURECUBE_LOD(_VolumetricCloudsTexture, s_linear_clamp_sampler, viewDirWS, _Mipmap);
189189
// Inverse the exposure

0 commit comments

Comments
 (0)