Cycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive...
authorLukas Stockner <lukas.stockner@freenet.de>
Wed, 14 Dec 2016 22:47:39 +0000 (23:47 +0100)
committerLukas Stockner <lukas.stockner@freenet.de>
Mon, 27 Mar 2017 03:36:49 +0000 (05:36 +0200)
commit5aaa643947929cf807c349b2b5fe33d4dc669c3d
tree091bf2c52f7a935525004bab2ceabeba989fafe6
parent086320a62e108b6e640f2b2453b8f1f0a946e57b
Cycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive rendering

Before, Cycles would first sync the shader exactly as shown in the UI, then determine and sync the used attributes and later optimize the shader.
Therefore, even completely unconnected nodes would cause unneccessary attributes to be synced.

The reason for this is to avoid frequent resyncs when editing shaders interactively, but it can still be avoided for noninteractive renders - which is what this commit does.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D2285
intern/cycles/blender/blender_shader.cpp
intern/cycles/render/graph.cpp
intern/cycles/render/graph.h
intern/cycles/render/osl.cpp
intern/cycles/render/svm.cpp