Transparent Film option

This commit is contained in:
Lubos Lenco 2017-11-10 15:46:05 +01:00
parent f87bee5bc8
commit d92387d6e6
2 changed files with 8 additions and 0 deletions

View file

@ -184,6 +184,9 @@ void main() {
#ifdef _EnvCol
fragColor.rgb = backgroundCol;
#ifdef _EnvTransp
return;
#endif
#ifdef _EnvClouds
vec3 n = normalize(normal);
#endif

View file

@ -68,6 +68,11 @@ def build_node_tree(world):
world.arm_envtex_irr_name = wname
write_probes.write_color_irradiance(wname, world.arm_envtex_color)
# film_transparent
if bpy.context.scene != None and bpy.context.scene.cycles != None and bpy.context.scene.cycles.film_transparent:
wrd.world_defs += '_EnvTransp'
wrd.world_defs += '_EnvCol'
# Clouds enabled
if rpdat.arm_clouds:
wrd.world_defs += '_EnvClouds'