|
@@ -31,6 +31,7 @@ class Indirect extends PropsDefinition {
|
|
|
@param var emissivePower : Float;
|
|
|
|
|
|
var calculatedUV : Vec2;
|
|
|
+ var indirectMultiplier : Float;
|
|
|
|
|
|
function rotateNormal( n : Vec3 ) : Vec3 {
|
|
|
return vec3(n.x * irrRotation.x - n.y * irrRotation.y, n.x * irrRotation.y + n.y * irrRotation.x, n.z);
|
|
@@ -44,6 +45,10 @@ class Indirect extends PropsDefinition {
|
|
|
return irrDiffuse.get( rotateNormal(normal) ).rgb;
|
|
|
}
|
|
|
|
|
|
+ function __init__fragment2() {
|
|
|
+ indirectMultiplier = 1.0;
|
|
|
+ }
|
|
|
+
|
|
|
function fragment() {
|
|
|
#if !MRT_low
|
|
|
var isSky = normal.dot(normal) <= 0;
|
|
@@ -87,7 +92,7 @@ class Indirect extends PropsDefinition {
|
|
|
}
|
|
|
|
|
|
var indirect = (diffuse * (1 - metalness) * (1 - F) + specular) * irrPower;
|
|
|
- pixelColor.rgb += indirect * occlusion + albedo * emissive * emissivePower;
|
|
|
+ pixelColor.rgb += indirect * occlusion * indirectMultiplier + albedo * emissive * emissivePower;
|
|
|
}
|
|
|
}
|
|
|
};
|