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

WebGPU: Fix glow layer when using opacity #15883

Merged
merged 1 commit into from
Nov 25, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var diffuseSampler: texture_2d<f32>;
varying vUVOpacity: vec2f;
var opacitySamplerSampler: sampler;
var opacitySampler: texture_2d<f32>;
uniform var opacityIntensity: f32;
uniform opacityIntensity: f32;
#endif

#ifdef EMISSIVE
Expand Down Expand Up @@ -66,7 +66,7 @@ var finalColor: vec4f = uniforms.glowColor;
finalColor = vec4f(finalColor.rgb, finalColor.a * opacityMap.a);
#endif

finalColor = vec4f(finalColor.rgb, finalColor.a * opacityIntensity);
finalColor = vec4f(finalColor.rgb, finalColor.a * uniforms.opacityIntensity);
#endif

#ifdef VERTEXALPHA
Expand All @@ -92,4 +92,4 @@ var finalColor: vec4f = uniforms.glowColor;
// a should stay untouched from the setup in highlight mode.
fragmentOutputs.color = vec4f(fragmentOutputs.color.rgb, uniforms.glowColor.a);
#endif
}
}