summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/effects
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-05-15 12:30:23 +0800
committerErik Kundiman <erik@megapahit.org>2024-05-15 12:30:23 +0800
commit0958f5cc290b5ad7cfe6ea10974d65f8ab79ae0a (patch)
tree8858e0d11872094c59ba8f2c4e281c54eb9b98ef /indra/newview/app_settings/shaders/class1/effects
parentc655968f91ca6b74b91219d08cf3e8f16c7d45d5 (diff)
Float operands for float operations
This is so that it doesn't throw a compilation error at runtime for not finding the named function expecting certain operand types, on some certain other implementation.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/effects')
-rw-r--r--indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
index b5437d43d2..97b3c2e2ea 100644
--- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
+++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl
@@ -49,13 +49,13 @@ void main()
float warmth = smoothstep(minLuminance, minLuminance+1.0, max(col.r * warmthWeights.r, max(col.g * warmthWeights.g, col.b * warmthWeights.b)) );
#if HAS_NOISE
- float TRUE_NOISE_RES = 128; // See mTrueNoiseMap
+ float TRUE_NOISE_RES = 128.0; // See mTrueNoiseMap
// *NOTE: Usually this is vary_fragcoord not vary_texcoord0, but glow extraction is in screen space
vec3 glow_noise = texture(glowNoiseMap, vary_texcoord0.xy * (screen_res / TRUE_NOISE_RES)).xyz;
// Dithering. Reduces banding effects in the reduced precision glow buffer.
float NOISE_DEPTH = 64.0;
col.rgb += glow_noise / NOISE_DEPTH;
- col.rgb = max(col.rgb, vec3(0));
+ col.rgb = max(col.rgb, vec3(0.0));
#endif
frag_color.rgb = col.rgb;
frag_color.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha);