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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-15 14:18:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-15 14:18:42 +0400
commit06888b7bebf66c5b05dd1a8106e35c57458252c0 (patch)
treeab9a5c6412438c8988a4e8116432ecd3b5705df3 /intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp
parent35dd893c368548b5d9d7bb56a1b9db07c71165d2 (diff)
Cycles OSL minor optimizations: recycle shading context, don't do memory
allocations for trace data, avoid some virtual function calls. Only helps a few percentages.
Diffstat (limited to 'intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp')
-rw-r--r--intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp
index 7189f99a822..a320bea118a 100644
--- a/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp
+++ b/intern/cycles/kernel/osl/bsdf_diffuse_ramp.cpp
@@ -55,7 +55,7 @@ public:
void setup()
{
- sc.N = TO_FLOAT3(N);
+ sc.prim = this;
m_shaderdata_flag = bsdf_diffuse_ramp_setup(&sc);
for(int i = 0; i < 8; i++)
@@ -101,7 +101,7 @@ public:
ClosureParam *closure_bsdf_diffuse_ramp_params()
{
static ClosureParam params[] = {
- CLOSURE_VECTOR_PARAM(DiffuseRampClosure, N),
+ CLOSURE_FLOAT3_PARAM(DiffuseRampClosure, sc.N),
CLOSURE_COLOR_ARRAY_PARAM(DiffuseRampClosure, colors, 8),
CLOSURE_STRING_KEYPARAM("label"),
CLOSURE_FINISH_PARAM(DiffuseRampClosure)