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:
Diffstat (limited to 'intern/cycles/kernel/svm/svm_image.h')
-rw-r--r--intern/cycles/kernel/svm/svm_image.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/kernel/svm/svm_image.h b/intern/cycles/kernel/svm/svm_image.h
index 662419418e3..0894c9c8290 100644
--- a/intern/cycles/kernel/svm/svm_image.h
+++ b/intern/cycles/kernel/svm/svm_image.h
@@ -52,6 +52,12 @@ __device_inline float svm_image_texture_frac(float x, int *ix)
__device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y, uint srgb)
{
+ /* first slots are used by float textures, which are not supported here */
+ if(id < TEX_NUM_FLOAT_IMAGES)
+ return make_float4(1.0f, 0.0f, 1.0f, 1.0f);
+
+ id -= TEX_NUM_FLOAT_IMAGES;
+
uint4 info = kernel_tex_fetch(__tex_image_packed_info, id);
uint width = info.x;
uint height = info.y;
@@ -265,7 +271,7 @@ __device void svm_node_tex_image_box(KernelGlobals *kg, ShaderData *sd, float *s
* between three textures.
*
* the Nxyz values are the barycentric coordinates in an equilateral
- * triangle, which in case of blending in the middle has a smaller
+ * triangle, which in case of blending, in the middle has a smaller
* equilateral triangle where 3 textures blend. this divides things into
* 7 zones, with an if() test for each zone */