Environment light fixes

This commit is contained in:
Lubos Lenco 2017-09-25 10:16:34 +02:00
parent d89cce4e3e
commit 4cfbde85a5
4 changed files with 7 additions and 2 deletions

View file

@ -114,7 +114,10 @@ void main() {
// Envmap
#ifdef _Irr
vec3 envl = shIrradiance(n) / PI;
vec3 envl = shIrradiance(n);
#ifdef _EnvTex
envl /= PI;
#endif
#else
vec3 envl = vec3(1.0);
#endif

View file

@ -269,6 +269,7 @@ def init_properties():
bpy.types.Material.arm_receive_shadow = bpy.props.BoolProperty(name="Receive Shadow", default=True)
bpy.types.Material.arm_overlay = bpy.props.BoolProperty(name="Overlay", default=False)
bpy.types.Material.arm_decal = bpy.props.BoolProperty(name="Decal", default=False)
bpy.types.Material.arm_particle = bpy.props.BoolProperty(name="Particle", default=False)
bpy.types.Material.arm_two_sided = bpy.props.BoolProperty(name="Two-Sided", default=False)
bpy.types.Material.arm_cull_mode = EnumProperty(
items=[('none', 'Both', 'None'),

View file

@ -256,6 +256,7 @@ class MaterialPropsPanel(bpy.types.Panel):
row = layout.row()
row.prop(mat, 'arm_tilesheet_mat')
row.prop(mat, 'arm_blending')
layout.prop(mat, 'arm_particle')
layout.operator("arm.invalidate_material_cache")

View file

@ -278,7 +278,7 @@ def write_sky_irradiance(base_name):
def write_color_irradiance(base_name, col):
# Constant color
irradiance_floats = [col[0], col[1], col[2]]
irradiance_floats = [col[0] * 1.13, col[1] * 1.13, col[2] * 1.13] # Adjust to Cycles
for i in range(0, 24):
irradiance_floats.append(0.0)