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>2011-09-01 19:53:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-09-01 19:53:36 +0400
commitdf625253ac0dec5be70701e2694c1e0358343fbf (patch)
tree10b216af9eb607023a3b280b8641acf336e34b10 /intern/cycles/kernel/svm
parent1e741b3a52cc44b7a3ee173f180fd3d99c958efc (diff)
Cycles:
* Add max diffuse/glossy/transmission bounces * Add separate min/max for transparent depth * Updated/added some presets that use these options * Add ray visibility options for objects, to hide them from camera/diffuse/glossy/transmission/shadow rays * Is singular ray output for light path node Details here: http://wiki.blender.org/index.php/Dev:2.5/Source/Render/Cycles/LightPaths
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r--intern/cycles/kernel/svm/bsdf_transparent.h2
-rw-r--r--intern/cycles/kernel/svm/svm_light_path.h1
-rw-r--r--intern/cycles/kernel/svm/svm_noise.h17
-rw-r--r--intern/cycles/kernel/svm/svm_texture.h4
-rw-r--r--intern/cycles/kernel/svm/svm_types.h1
5 files changed, 5 insertions, 20 deletions
diff --git a/intern/cycles/kernel/svm/bsdf_transparent.h b/intern/cycles/kernel/svm/bsdf_transparent.h
index 30288bf251d..1674f04955e 100644
--- a/intern/cycles/kernel/svm/bsdf_transparent.h
+++ b/intern/cycles/kernel/svm/bsdf_transparent.h
@@ -70,7 +70,7 @@ __device int bsdf_transparent_sample(const ShaderData *sd, float randu, float ra
#endif
*pdf = 1;
*eval = make_float3(1, 1, 1);
- return LABEL_TRANSMIT|LABEL_STRAIGHT;
+ return LABEL_TRANSMIT|LABEL_TRANSPARENT;
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/svm/svm_light_path.h b/intern/cycles/kernel/svm/svm_light_path.h
index d6413d1569e..1b13fd93a0f 100644
--- a/intern/cycles/kernel/svm/svm_light_path.h
+++ b/intern/cycles/kernel/svm/svm_light_path.h
@@ -29,6 +29,7 @@ __device void svm_node_light_path(ShaderData *sd, float *stack, uint type, uint
case NODE_LP_shadow: info = (path_flag & PATH_RAY_SHADOW)? 1.0f: 0.0f; break;
case NODE_LP_diffuse: info = (path_flag & PATH_RAY_DIFFUSE)? 1.0f: 0.0f; break;
case NODE_LP_glossy: info = (path_flag & PATH_RAY_GLOSSY)? 1.0f: 0.0f; break;
+ case NODE_LP_singular: info = (path_flag & PATH_RAY_SINGULAR)? 1.0f: 0.0f; break;
case NODE_LP_reflection: info = (path_flag & PATH_RAY_REFLECT)? 1.0f: 0.0f; break;
case NODE_LP_transmission: info = (path_flag & PATH_RAY_TRANSMIT)? 1.0f: 0.0f; break;
case NODE_LP_backfacing: info = (sd->flag & SD_BACKFACING)? 1.0f: 0.0f; break;
diff --git a/intern/cycles/kernel/svm/svm_noise.h b/intern/cycles/kernel/svm/svm_noise.h
index 72ff353abb4..28ad028ad0e 100644
--- a/intern/cycles/kernel/svm/svm_noise.h
+++ b/intern/cycles/kernel/svm/svm_noise.h
@@ -209,22 +209,5 @@ __device float psnoise(float3 p, float3 pperiod)
return perlin_periodic(p.x, p.y, p.z, pperiod);
}
-/* turbulence */
-__device_noinline float turbulence(float3 P, int oct, bool hard)
-{
- float amp = 1.0f, fscale = 1.0f, sum = 0.0f;
- int i;
-
- for(i=0; i<=oct; i++, amp *= 0.5f, fscale *= 2.0f) {
- float t = noise(fscale*P);
- if(hard) t = fabsf(2.0f*t - 1.0f);
- sum += t * amp;
- }
-
- sum *= ((float)(1<<oct)/(float)((1<<(oct+1))-1));
-
- return sum;
-}
-
CCL_NAMESPACE_END
diff --git a/intern/cycles/kernel/svm/svm_texture.h b/intern/cycles/kernel/svm/svm_texture.h
index 0bf0cf8c2cd..e273a92c988 100644
--- a/intern/cycles/kernel/svm/svm_texture.h
+++ b/intern/cycles/kernel/svm/svm_texture.h
@@ -42,7 +42,7 @@ __device float voronoi_distance(NodeDistanceMetric distance_metric, float3 d, fl
/* Voronoi / Worley like */
-__device void voronoi(float3 p, NodeDistanceMetric distance_metric, float e, float da[4], float3 pa[4])
+__device_noinline void voronoi(float3 p, NodeDistanceMetric distance_metric, float e, float da[4], float3 pa[4])
{
/* returns distances in da and point coords in pa */
int xx, yy, zz, xi, yi, zi;
@@ -213,7 +213,7 @@ __device float noise_wave(NodeWaveType wave, float a)
/* Turbulence */
-__device float noise_turbulence(float3 p, NodeNoiseBasis basis, int octaves, int hard)
+__device_noinline float noise_turbulence(float3 p, NodeNoiseBasis basis, int octaves, int hard)
{
float fscale = 1.0f;
float amp = 1.0f;
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 786478c0c03..758ba25c07a 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -104,6 +104,7 @@ typedef enum NodeLightPath {
NODE_LP_shadow,
NODE_LP_diffuse,
NODE_LP_glossy,
+ NODE_LP_singular,
NODE_LP_reflection,
NODE_LP_transmission,
NODE_LP_backfacing