Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2015-11-18 20:47:56 +0300
committerThomas Dinges <blender@dingto.org>2015-11-18 20:47:56 +0300
commit0639ba8ea58bc775bfa3436e1ba9831ece78404d (patch)
treebc58bc54aff60d1c9df408d86eb322df271a3f85 /intern/cycles/render/graph.h
parent836c69c92fb5992eb83c4311a98f5ffad4a172f5 (diff)
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.
Diffstat (limited to 'intern/cycles/render/graph.h')
-rw-r--r--intern/cycles/render/graph.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index 8169e606f1a..fa2de3703c0 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -196,6 +196,7 @@ public:
virtual void attributes(Shader *shader, AttributeRequestSet *attributes);
virtual void compile(SVMCompiler& compiler) = 0;
virtual void compile(OSLCompiler& compiler) = 0;
+ virtual void optimize() {};
virtual bool has_surface_emission() { return false; }
virtual bool has_surface_transparent() { return false; }
@@ -275,6 +276,7 @@ public:
void relink(vector<ShaderInput*> inputs, vector<ShaderInput*> outputs, ShaderOutput *output);
void remove_unneeded_nodes();
+ void simplify_nodes();
void finalize(bool do_bump = false, bool do_osl = false);
int get_num_closures();