mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-06 07:30:35 +07:00
Fixed potential divide-by-zero in bloom shader
This commit is contained in:
parent
aa0e254f0e
commit
c9b9cf6cc4
@ -10,6 +10,6 @@ void main(){
|
||||
vec4 bloom = texture2D(u_texture1, v_texCoords) * BloomIntensity;
|
||||
original = original * (vec4(1.0) - bloom);
|
||||
vec4 combined = original + bloom;
|
||||
float mx = min(max(combined.r,max(combined.g,combined.b)), 1.0);
|
||||
gl_FragColor = vec4(combined.rgb / mx, mx);
|
||||
float mx = min(max(combined.r, max(combined.g, combined.b)), 1.0);
|
||||
gl_FragColor = vec4(combined.rgb / max(mx, 0.0001), mx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user