Eevee: Reflection Plane: Small UI fix and invert facing fading
This commit is contained in:
parent
3280adc0aa
commit
3d77517ad5
|
@ -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")
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue