mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-23 08:09:31 -07:00
The primary and bloom textures are now combined with a weight so that fainter bloom doesn't create a fainter overall effect.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
struct Config {
|
||||
bloomStrength : f32;
|
||||
ditherMagnitude : f32;
|
||||
backgroundColor : vec3<f32>;
|
||||
};
|
||||
@@ -71,7 +72,7 @@ fn hslToRgb(h : f32, s : f32, l : f32) -> vec3<f32> {
|
||||
// to approximate a lens blur
|
||||
var brightness = mix(
|
||||
textureSampleLevel( tex, linearSampler, uv, 0.0 ).rgb,
|
||||
textureSampleLevel( bloomTex, linearSampler, uv, 0.0 ).rgb,
|
||||
textureSampleLevel( bloomTex, linearSampler, uv, 0.0 ).rgb * config.bloomStrength,
|
||||
(0.7 - length(uv - 0.5))
|
||||
) * 1.25;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user