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:
authorLukas Tönne <lukas.toenne@gmail.com>2018-08-12 14:52:49 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2018-08-12 14:52:49 +0300
commitdc2d841b7c50565302af2986d62ddbd29c332acd (patch)
tree324f234e56fde77fb80dfdef0c7c21f01968f71b /source/blender/nodes/shader/nodes/node_shader_blackbody.c
parent27b28e437d974ebbafa234205941c07aa0ab546c (diff)
parent4b6fa4d897a0bb3252b16383492b526d2cef3920 (diff)
Merge branch 'blender2.8' into hair_guideshair_guides
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_blackbody.c')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_blackbody.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_blackbody.c b/source/blender/nodes/shader/nodes/node_shader_blackbody.c
index 76291df41bc..e57f5e0d6cf 100644
--- a/source/blender/nodes/shader/nodes/node_shader_blackbody.c
+++ b/source/blender/nodes/shader/nodes/node_shader_blackbody.c
@@ -40,12 +40,15 @@ static bNodeSocketTemplate sh_node_blackbody_out[] = {
static int node_shader_gpu_blackbody(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
- const int size = 256;
+ const int size = CM_TABLE + 1;
float *data = MEM_mallocN(sizeof(float) * size * 4, "blackbody texture");
blackbody_temperature_to_rgb_table(data, size, 965.0f, 12000.0f);
- return GPU_stack_link(mat, node, "node_blackbody", in, out, GPU_texture(size, data));
+ float layer;
+ GPUNodeLink *ramp_texture = GPU_texture_ramp(mat, size, data, &layer);
+
+ return GPU_stack_link(mat, node, "node_blackbody", in, out, ramp_texture, GPU_uniform(&layer));
}
/* node type definition */