ncannasse 7 éve
szülő
commit
db4b43017f
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      h3d/shader/pbr/Bloom.hx

+ 2 - 1
h3d/shader/pbr/Bloom.hx

@@ -14,8 +14,9 @@ class Bloom extends ScreenShader {
 		function fragment() {
 		function fragment() {
 			pixelColor = hdr.get(calculatedUV);
 			pixelColor = hdr.get(calculatedUV);
 			var lum = pixelColor.rgb.dot(vec3(0.2126, 0.7152, 0.0722));
 			var lum = pixelColor.rgb.dot(vec3(0.2126, 0.7152, 0.0722));
-			if( lum < threshold ) pixelColor.rgb = vec3(0.) else pixelColor.rgb *= intensity * (lum - threshold) / lum;
+			if( lum < threshold ) pixelColor.rgb = vec3(0.) else pixelColor.rgb *= (lum - threshold) / lum;
 			pixelColor.rgb += albedo * emissive;
 			pixelColor.rgb += albedo * emissive;
+			pixelColor.rgb *= intensity;
 		}
 		}
 
 
 	};
 	};