Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffuse/specular parameters are mixed incorrectly. Or not? #444

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Samples/Media/Hlms/Pbs/Any/AmbientLighting_piece_ps.any
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@
{
@end
pixelData.envColourS += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
pixelData.envColourD += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWS );
pixelData.envColourD += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
@property( vct_num_probes )
}
@end
Expand Down
8 changes: 4 additions & 4 deletions Samples/Media/Hlms/Pbs/GLSLES/PixelShader_ps.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,11 @@ void main()
float ambientWS = dot( passBuf.ambientHemisphereDir.xyz, reflDir ) * 0.5 + 0.5;

@property( use_envprobe_map || hlms_use_ssr || use_planar_reflections )
envColourS += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
envColourD += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
envColourS += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
envColourD += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
@end @property( !use_envprobe_map && !hlms_use_ssr && !use_planar_reflections )
vec3 envColourS = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
vec3 envColourD = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
vec3 envColourS = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
vec3 envColourD = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
@end
@end

Expand Down
8 changes: 4 additions & 4 deletions Samples/Media/Hlms/Terra/Any/800.PixelShader_piece_ps.any
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,17 @@
{
@end
pixelData.envColourS += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
pixelData.envColourD += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWS );
pixelData.envColourD += lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
@property( vct_num_probes )
}
@end
@else
pixelData.envColourS = lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
pixelData.envColourD = lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWS );
pixelData.envColourD = lerp( midf3_c( passBuf.ambientLowerHemi.xyz ),
midf3_c( passBuf.ambientUpperHemi.xyz ), ambientWD );
@end
@end
@property( ambient_fixed && vct_num_probes )
Expand Down
8 changes: 4 additions & 4 deletions Samples/Media/Hlms/Terra/GLSLES/PixelShader_ps.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,11 @@ void main()
float ambientWS = dot( passBuf.ambientHemisphereDir.xyz, reflDir ) * 0.5 + 0.5;

@property( envprobe_map )
envColourS += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
envColourD += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
envColourS += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
envColourD += mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
@end @property( !envprobe_map )
vec3 envColourS = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
vec3 envColourD = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
vec3 envColourS = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWS );
vec3 envColourD = mix( passBuf.ambientLowerHemi.xyz, passBuf.ambientUpperHemi.xyz, ambientWD );
@end
@end

Expand Down
Loading