Attribute nodes in World shaders
Attribute nodes currently don't work with world shaders. This means any custom parameters you want to have require at least a partial shader recompilation on change. Having the ability to use Attribute node similarly how you can use it with objects could solve this issue, letting us use custom attributes in the shader that can be updated in real-time.
drive.google.com/file/d/1au9zJ1mxdywD20fU8WQEre1R4fiN3i0d/view
In the link I have added a .blend file to showcase how these attributes can help. The function in the node group is redundant, but it showcases the performance implications with complex node trees. By default attribute is connected to the function. If you modify the "TEST1" property under object you can see the shader changing in real-time. However, if you connect the value node to the shader instead, you will see how slow it is to change the value. You can probably imagine how much more pronounced this issue is for larger and more complex node trees. And the method with the value node is the only one available for world shaders. Having the attribute node function in world shaders (albeit limited to the equivalent of "object" type attributes due to lack of geometry) could be a godsend in those situations.
0 Comments