[Bf-blender-cvs] [3d77517ad5b] blender2.8: Eevee: Reflection Plane: Small UI fix and invert facing fading

Clément Foucault noreply at git.blender.org
Thu Nov 22 16:15:20 CET 2018


Commit: 3d77517ad5b341bd3c589c349e38a62e433c8ec2
Author: Clément Foucault
Date:   Thu Nov 22 16:14:56 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB3d77517ad5b341bd3c589c349e38a62e433c8ec2

Eevee: Reflection Plane: Small UI fix and invert facing fading

===================================================================

M	release/scripts/startup/bl_ui/properties_data_lightprobe.py
M	source/blender/draw/engines/eevee/eevee_lightprobes.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_lightprobe.py b/release/scripts/startup/bl_ui/properties_data_lightprobe.py
index 2ca7e1723b6..20ac2d52ad9 100644
--- a/release/scripts/startup/bl_ui/properties_data_lightprobe.py
+++ b/release/scripts/startup/bl_ui/properties_data_lightprobe.py
@@ -77,6 +77,7 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
         elif probe.type == 'PLANAR':
             col = layout.column()
             col.prop(probe, "influence_distance", text="Distance")
+            col.prop(probe, "falloff")
         else:
             col = layout.column()
             col.prop(probe, "influence_type")
@@ -91,7 +92,10 @@ class DATA_PT_lightprobe(DataButtonsPanel, Panel):
 
         col = layout.column()
         sub = col.column()
-        sub.prop(probe, "clip_start", text="Clipping Start")
+        if probe.type != 'PLANAR':
+            sub.prop(probe, "clip_start", text="Clipping Start")
+        else:
+            sub.prop(probe, "clip_start", text="Clipping Offset")
 
         if probe.type != 'PLANAR':
             sub.prop(probe, "clip_end", text="End")
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index a636eac8b93..0b4341f5cb9 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -646,7 +646,7 @@ void EEVEE_lightprobes_planar_data_from_object(Object *ob, EEVEE_PlanarReflectio
 	eplanar->clip_edge_y_neg = dot_v3v3(eplanar->clip_vec_y, vec);
 
 	/* Facing factors */
-	float max_angle = max_ff(1e-2f, probe->falloff) * M_PI * 0.5f;
+	float max_angle = max_ff(1e-2f, 1.0f - probe->falloff) * M_PI * 0.5f;
 	float min_angle = 0.0f;
 	eplanar->facing_scale = 1.0f / max_ff(1e-8f, cosf(min_angle) - cosf(max_angle));
 	eplanar->facing_bias = -min_ff(1.0f - 1e-8f, cosf(max_angle)) * eplanar->facing_scale;



More information about the Bf-blender-cvs mailing list