forked from blender/blender
EEVEE-Next: Light: Add ray visbility support #1
@ -395,6 +395,14 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
|
|||||||
col = layout.column(heading="Ray Visibility")
|
col = layout.column(heading="Ray Visibility")
|
||||||
col.prop(ob, "visible_shadow", text="Shadow", toggle=False)
|
col.prop(ob, "visible_shadow", text="Shadow", toggle=False)
|
||||||
|
|
||||||
|
if ob.type in {'LIGHT'}:
|
||||||
|
layout.separator()
|
||||||
|
col = layout.column(heading="Ray Visibility")
|
||||||
|
col.prop(ob, "visible_diffuse", text="Diffuse", toggle=False)
|
||||||
|
col.prop(ob, "visible_glossy", text="Glossy", toggle=False)
|
||||||
|
col.prop(ob, "visible_transmission", text="Transmission", toggle=False)
|
||||||
|
col.prop(ob, "visible_volume_scatter", text="Volume Scatter", toggle=False)
|
||||||
|
|
||||||
if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'CURVES', 'POINTCLOUD', 'VOLUME'}:
|
if ob.type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'CURVES', 'POINTCLOUD', 'VOLUME'}:
|
||||||
layout.separator()
|
layout.separator()
|
||||||
col = layout.column(heading="Light Probes")
|
col = layout.column(heading="Light Probes")
|
||||||
|
@ -70,12 +70,17 @@ void Light::sync(ShadowModule &shadows, const Object *ob, float threshold)
|
|||||||
|
|
||||||
shape_parameters_set(la, scale, threshold);
|
shape_parameters_set(la, scale, threshold);
|
||||||
|
|
||||||
|
const bool diffuse_visibility = (ob->visibility_flag & OB_HIDE_DIFFUSE) == 0;
|
||||||
|
const bool glossy_visibility = (ob->visibility_flag & OB_HIDE_GLOSSY) == 0;
|
||||||
|
const bool transmission_visibility = (ob->visibility_flag & OB_HIDE_TRANSMISSION) == 0;
|
||||||
|
const bool volume_visibility = (ob->visibility_flag & OB_HIDE_VOLUME_SCATTER) == 0;
|
||||||
|
|
||||||
float shape_power = shape_radiance_get();
|
float shape_power = shape_radiance_get();
|
||||||
float point_power = point_radiance_get();
|
float point_power = point_radiance_get();
|
||||||
this->power[LIGHT_DIFFUSE] = la->diff_fac * shape_power;
|
this->power[LIGHT_DIFFUSE] = la->diff_fac * shape_power * diffuse_visibility;
|
||||||
this->power[LIGHT_SPECULAR] = la->spec_fac * shape_power;
|
this->power[LIGHT_SPECULAR] = la->spec_fac * shape_power * glossy_visibility;
|
||||||
this->power[LIGHT_TRANSMISSION] = la->transmission_fac * shape_power;
|
this->power[LIGHT_TRANSMISSION] = la->transmission_fac * shape_power * transmission_visibility;
|
||||||
this->power[LIGHT_VOLUME] = la->volume_fac * point_power;
|
this->power[LIGHT_VOLUME] = la->volume_fac * point_power * volume_visibility;
|
||||||
|
|
||||||
this->pcf_radius = la->shadow_filter_radius;
|
this->pcf_radius = la->shadow_filter_radius;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user