Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/node_shader_tree.c
| Show First 20 Lines • Show All 488 Lines • ▼ Show 20 Lines | void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat, short compatibility) | ||||
| exec = ntreeShaderBeginExecTree(localtree); | exec = ntreeShaderBeginExecTree(localtree); | ||||
| ntreeExecGPUNodes(exec, mat, 1, compatibility); | ntreeExecGPUNodes(exec, mat, 1, compatibility); | ||||
| ntreeShaderEndExecTree(exec); | ntreeShaderEndExecTree(exec); | ||||
| ntreeFreeTree(localtree); | ntreeFreeTree(localtree); | ||||
| MEM_freeN(localtree); | MEM_freeN(localtree); | ||||
| } | } | ||||
| /** | |||||
| * We read the node tree to populate the data into GPUMaterial. | |||||
| * | |||||
| * This is not entirely cow safe since we are storing pointers to the bNodeTree data | |||||
| * directly in the Uniform buffer objects. | |||||
| * | |||||
| * It's only to be used when handling gpu materials. | |||||
| */ | |||||
| void ntreeGPUMaterialNodes_gpu(bNodeTree *ntree, GPUMaterial *mat) | |||||
| { | |||||
| bNodeTreeExec *exec = ntreeShaderBeginExecTree(ntree); | |||||
| ntreeExecGPUNodes(exec, mat, 1, NODE_NEWER_SHADING); | |||||
| ntreeShaderEndExecTree(exec); | |||||
| } | |||||
brecht: This function name doesn't describe what it does differently than `ntreeGPUMaterialNodes`.
It… | |||||
| /* **************** call to switch lamploop for material node ************ */ | /* **************** call to switch lamploop for material node ************ */ | ||||
| void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *); | void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *); | ||||
| void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *)) | void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *)) | ||||
| { | { | ||||
| node_shader_lamp_loop = lamp_loop_func; | node_shader_lamp_loop = lamp_loop_func; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines | |||||
This function name doesn't describe what it does differently than ntreeGPUMaterialNodes.
It skips the localization, that is used to modify the nodetree to support reroute, mute and bump. So those are broken now or did I miss something?