Incremental recompute
This commit is contained in:
@ -239,9 +239,10 @@ def build_node_tree(world: bpy.types.World, frag: Shader, vert: Shader, con: Sha
|
||||
if '_EnvCol' in world.world_defs:
|
||||
frag.add_uniform('vec3 backgroundCol', link='_backgroundCol')
|
||||
frag.write('fragColor.rgb = backgroundCol * envmapStrength;')
|
||||
|
||||
elif '_EnvTex' in world.world_defs and '_EnvLDR' in world.world_defs:
|
||||
frag.write('fragColor.rgb = pow(fragColor.rgb, vec3(2.2));')
|
||||
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