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-05-18 17:30:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-18 17:30:34 +0400
commit578864180b1e40a8689064763437247ff7a5826b (patch)
tree6dfd0b6a2a6a513eced8cf62e0fb42c3c340aa57 /source/blender/gpu/shaders/gpu_shader_material.glsl
parent894dd820ac6ffcb19ff74cf662ff2d4ce3e5179b (diff)
Fix related to #31446: cycles glsl error with empty image texture node.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_material.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 9498bf92446..7e4312e21e0 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2127,12 +2127,23 @@ void node_tex_environment(vec3 co, sampler2D ima, out vec4 color)
color = texture2D(ima, vec2(u, v));
}
+void node_tex_environment_empty(vec3 co, out vec4 color)
+{
+ color = vec4(0.0);
+}
+
void node_tex_image(vec3 co, sampler2D ima, out vec4 color, out float alpha)
{
color = texture2D(ima, co.xy);
alpha = color.a;
}
+void node_tex_image_empty(vec3 co, out vec4 color, out float alpha)
+{
+ color = vec4(0.0);
+ alpha = 0.0;
+}
+
void node_tex_magic(vec3 p, float scale, float distortion, out vec4 color, out float fac)
{
color = vec4(1.0);