Skip to content

Commit 58d3655

Browse files
committed
Applied ambientBrightness to env filter refracted.
1 parent fce2200 commit 58d3655

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Nu/Nu.Gaia/Assets/Default/PhysicallyBasedForwardAnimated.glsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,8 @@ void main()
980980
float ambientBoost = 1.0 + ambientBoostFactor * lightAmbientBoostScalar;
981981
vec3 ambientDiffuse = ambientColor * ambientBrightness * ambientBoost * ambientOcclusion;
982982
vec3 ambientSpecular = ambientDiffuse * ambientOcclusion;
983-
vec3 ambientColorRefracted = saturate(environmentFilterRefracted, ENVIRONMENT_FILTER_REFRACTED_SATURATION) * ssrrIntensity;
983+
vec3 environmentFilterSaturated = saturate(environmentFilterRefracted, ENVIRONMENT_FILTER_REFRACTED_SATURATION);
984+
vec3 ambientColorRefracted = environmentFilterSaturated * ambientBrightness * ssrrIntensity;
984985

985986
// compute diffuse term
986987
vec3 f = fresnelSchlickRoughness(nDotV, f0, roughness);

Nu/Nu.Gaia/Assets/Default/PhysicallyBasedForwardStatic.glsl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,8 @@ void main()
961961
float ambientBoost = 1.0 + ambientBoostFactor * lightAmbientBoostScalar;
962962
vec3 ambientDiffuse = ambientColor * ambientBrightness * ambientBoost * ambientOcclusion;
963963
vec3 ambientSpecular = ambientDiffuse * ambientOcclusion;
964-
vec3 ambientColorRefracted = saturate(environmentFilterRefracted, ENVIRONMENT_FILTER_REFRACTED_SATURATION) * ssrrIntensity;
964+
vec3 environmentFilterSaturated = saturate(environmentFilterRefracted, ENVIRONMENT_FILTER_REFRACTED_SATURATION);
965+
vec3 ambientColorRefracted = environmentFilterSaturated * ambientBrightness * ssrrIntensity;
965966

966967
// compute diffuse term
967968
vec3 f = fresnelSchlickRoughness(nDotV, f0, roughness);

0 commit comments

Comments
 (0)