forked from LeenkxTeam/LNXSDK
Consolidate and update
This commit is contained in:
@ -232,8 +232,7 @@ def build_node_tree(world: bpy.types.World, frag: Shader, vert: Shader, con: Sha
|
||||
wrd.world_defs += '_EnvClouds'
|
||||
frag_write_clouds(world, frag)
|
||||
|
||||
if '_EnvSky' in world.world_defs or '_EnvTex' in world.world_defs or '_EnvImg' in world.world_defs or '_EnvCol' in world.world_defs or '_EnvClouds' in world.world_defs:
|
||||
frag.add_uniform('float envmapStrength', link='_envmapStrength')
|
||||
frag.add_uniform('float envmapStrength', link='_envmapStrength')
|
||||
|
||||
# Clear background color
|
||||
if '_EnvCol' in world.world_defs:
|
||||
@ -242,7 +241,6 @@ def build_node_tree(world: bpy.types.World, frag: Shader, vert: Shader, con: Sha
|
||||
else:
|
||||
if '_EnvTex' in world.world_defs and '_EnvLDR' in world.world_defs:
|
||||
frag.write('fragColor.rgb = pow(fragColor.rgb, vec3(2.2));')
|
||||
frag.write('fragColor.rgb *= envmapStrength;')
|
||||
|
||||
if '_EnvClouds' in world.world_defs:
|
||||
frag.write('if (pos.z > 0.0) fragColor.rgb = mix(fragColor.rgb, traceClouds(fragColor.rgb, pos), clamp(pos.z * 5.0, 0, 1));')
|
||||
|
||||
Reference in New Issue
Block a user