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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 16:56:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-28 16:57:14 +0300
commit971affb4366634da35a7d9637243d451f0b227e2 (patch)
tree714500dd7456450d67af9cc50471bab3d9318bd4 /source/blender
parentbe047fe455b8a289b2ebc43af81374510c0b6a06 (diff)
Fix T45590: Some more missing glsl functions
Also SSS node was using wrong Normal input index.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl5
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index ea7ab054234..54864b2b185 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2267,6 +2267,11 @@ void node_bsdf_refraction(vec4 color, float roughness, float ior, vec3 N, out ve
node_bsdf_diffuse(color, 0.0, N, result);
}
+void node_ambient_occlusion(vec4 color, out vec4 result)
+{
+ result = color;
+}
+
/* emission */
void node_emission(vec4 color, float strength, vec3 N, out vec4 result)
diff --git a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
index 9fe56d4f01d..8c83fa47815 100644
--- a/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
+++ b/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
@@ -60,8 +60,8 @@ static void node_shader_init_subsurface_scattering(bNodeTree *UNUSED(ntree), bNo
static int node_shader_gpu_subsurface_scattering(GPUMaterial *mat, bNode *UNUSED(node), bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
- if (!in[1].link)
- in[1].link = GPU_builtin(GPU_VIEW_NORMAL);
+ if (!in[5].link)
+ in[5].link = GPU_builtin(GPU_VIEW_NORMAL);
return GPU_stack_link(mat, "node_subsurface_scattering", in, out);
}