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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-05 22:09:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-06 14:05:21 +0300
commit2a0a7cd73d99340b348a0298cc709a9c3f663ee9 (patch)
treef754ce355a5390d5893cfc5c5f996c28b919d54c /source/blender/gpu
parent15ad75ffefca8d0fa800fddd8c57e9d578dfa0f4 (diff)
Eevee: Fix missing UBO bound if using a muted Shader to RGB node with SSS
This is a nasty bug. Because the node does not get properlly tagged as SSS (sss_id is 0) but is still evaluated (so tagging the GPUMaterial as having SSS). The sssProfile UBO is still declared and we need to bind something to it.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_material.h1
-rw-r--r--source/blender/gpu/intern/gpu_material.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index b724299935b..265ba15dc39 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -194,6 +194,7 @@ GPUMaterialStatus GPU_material_status(GPUMaterial *mat);
struct GPUUniformBuffer *GPU_material_uniform_buffer_get(GPUMaterial *material);
void GPU_material_uniform_buffer_create(GPUMaterial *material, ListBase *inputs);
+struct GPUUniformBuffer *GPU_material_create_sss_profile_ubo(void);
void GPU_material_vertex_attributes(
GPUMaterial *material,
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 986003c99e6..fa267102088 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -568,6 +568,11 @@ struct GPUUniformBuffer *GPU_material_sss_profile_get(GPUMaterial *material, int
return material->sss_profile;
}
+struct GPUUniformBuffer *GPU_material_create_sss_profile_ubo(void)
+{
+ return GPU_uniformbuffer_create(sizeof(GPUSssKernelData), NULL, NULL);
+}
+
#undef SSS_EXPONENT
#undef SSS_SAMPLES