Two-sided area lamps
This commit is contained in:
parent
78b9bd0092
commit
862044ac11
|
@ -158,6 +158,9 @@ float ltcEvaluate(vec3 N, vec3 V, float dotNV, vec3 P, mat3 Minv, vec3 points0,
|
|||
if (n >= 4) sum += integrateEdge(L3, L4);
|
||||
if (n == 5) sum += integrateEdge(L4, L0);
|
||||
|
||||
// return twoSided ? abs(sum) : max(0.0, -sum);
|
||||
#ifdef _TwoSidedAreaLamp
|
||||
return abs(sum);
|
||||
#else
|
||||
return max(0.0, -sum);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -71,6 +71,9 @@ def build_node_tree(world):
|
|||
if wrd.generate_ssrs:
|
||||
wrd.world_defs += '_SSRS'
|
||||
|
||||
if wrd.generate_two_sided_area_lamp:
|
||||
wrd.world_defs += '_TwoSidedAreaLamp'
|
||||
|
||||
# Alternative models
|
||||
if wrd.lighting_model == 'Cycles':
|
||||
wrd.world_defs += '_Cycles'
|
||||
|
|
|
@ -468,6 +468,7 @@ def init_properties():
|
|||
('Auto', 'Auto', 'Auto')],
|
||||
name="Anisotropic Filtering", description="Texture filtering", default='On')
|
||||
bpy.types.World.force_no_culling = bpy.props.BoolProperty(name="Force No Culling", default=False)
|
||||
bpy.types.World.generate_two_sided_area_lamp = bpy.props.BoolProperty(name="Two-Sided Area Lamps", description="Emit light from both faces of area lamp", default=False, update=assets.invalidate_shader_cache)
|
||||
bpy.types.World.tessellation_enabled = bpy.props.BoolProperty(name="Tessellation", description="Enable tessellation for height maps on supported targets", default=True, update=assets.invalidate_shader_cache)
|
||||
# Lighting flags
|
||||
bpy.types.World.lighting_model = EnumProperty(
|
||||
|
|
|
@ -284,6 +284,7 @@ class PropsRPDataPropsPanel(bpy.types.Panel):
|
|||
layout.prop(wrd, 'anisotropic_filtering_state')
|
||||
layout.prop(wrd, 'tessellation_enabled')
|
||||
layout.prop(wrd, 'force_no_culling')
|
||||
layout.prop(wrd, 'generate_two_sided_area_lamp')
|
||||
|
||||
layout.prop(wrd, 'arm_camera_props_advanced')
|
||||
if wrd.arm_camera_props_advanced:
|
||||
|
|
Loading…
Reference in a new issue