Cycles / Shader graph: Fallback to Sharp closures for very small roughness.
authorThomas Dinges <blender@dingto.org>
Wed, 18 Nov 2015 17:47:56 +0000 (18:47 +0100)
committerThomas Dinges <blender@dingto.org>
Wed, 18 Nov 2015 17:47:56 +0000 (18:47 +0100)
commit0639ba8ea58bc775bfa3436e1ba9831ece78404d
treebc58bc54aff60d1c9df408d86eb322df271a3f85
parent836c69c92fb5992eb83c4311a98f5ffad4a172f5
Cycles / Shader graph: Fallback to Sharp closures for very small roughness.

We fallback to Sharp closures for Glossy, Glass and Refraction nodes now, in case the Roughness input is disconnected and 0 (< 1e-4f to be exact).
This way we gain a few percentages of performance, in case the user did not manually set the closure type to "Sharp" in the UI.

Sharp will probably be removed from the UI as a followup, not needed anymore with this internal optimization.

Original idea by Lukas Stockner(Differential Revision: https://developer.blender.org/D1439), code implementation by myself.
intern/cycles/render/graph.cpp
intern/cycles/render/graph.h
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h