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.
This commit is contained in:
@@ -310,6 +310,8 @@ class GlossyBsdfNode : public BsdfNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(GlossyBsdfNode)
|
||||
|
||||
void optimize();
|
||||
|
||||
ustring distribution;
|
||||
static ShaderEnum distribution_enum;
|
||||
};
|
||||
@@ -318,6 +320,8 @@ class GlassBsdfNode : public BsdfNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(GlassBsdfNode)
|
||||
|
||||
void optimize();
|
||||
|
||||
ustring distribution;
|
||||
static ShaderEnum distribution_enum;
|
||||
};
|
||||
@@ -326,6 +330,8 @@ class RefractionBsdfNode : public BsdfNode {
|
||||
public:
|
||||
SHADER_NODE_CLASS(RefractionBsdfNode)
|
||||
|
||||
void optimize();
|
||||
|
||||
ustring distribution;
|
||||
static ShaderEnum distribution_enum;
|
||||
};
|
||||
|
Reference in New Issue
Block a user