Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/shader/nodes/node_shader_geom.c
| Context not available. | |||||
| copy_v3_v3(out[GEOM_OUT_ORCO]->vec, shi->lo); | copy_v3_v3(out[GEOM_OUT_ORCO]->vec, shi->lo); | ||||
| copy_v3_v3(out[GEOM_OUT_UV]->vec, suv->uv); | copy_v3_v3(out[GEOM_OUT_UV]->vec, suv->uv); | ||||
| copy_v3_v3(out[GEOM_OUT_NORMAL]->vec, shi->vno); | copy_v3_v3(out[GEOM_OUT_NORMAL]->vec, shi->vno); | ||||
| if (shi->use_world_space_light_params) | |||||
| mul_mat3_m4_v3((float (*)[4])RE_render_current_get_matrix(RE_VIEWINV_MATRIX), out[GEOM_OUT_NORMAL]->vec); | |||||
| if (shi->totcol) { | if (shi->totcol) { | ||||
| /* find vertex color layer by name */ | /* find vertex color layer by name */ | ||||
| Context not available. | |||||
| GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, ngeo->uvname); | GPUNodeLink *mtface = GPU_attribute(CD_MTFACE, ngeo->uvname); | ||||
| GPUNodeLink *mcol = GPU_attribute(CD_MCOL, ngeo->colname); | GPUNodeLink *mcol = GPU_attribute(CD_MCOL, ngeo->colname); | ||||
| return GPU_stack_link(mat, "geom", in, out, | bool ret = GPU_stack_link(mat, "geom", in, out, | ||||
| GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL), | GPU_builtin(GPU_VIEW_POSITION), GPU_builtin(GPU_VIEW_NORMAL), | ||||
| GPU_builtin(GPU_INVERSE_VIEW_MATRIX), orco, mtface, mcol); | GPU_builtin(GPU_INVERSE_VIEW_MATRIX), orco, mtface, mcol); | ||||
| if (GPU_material_use_world_space_light_params(mat)) | |||||
| ret &= GPU_link(mat, "direction_transform_m4v3", out[5].link, GPU_builtin(GPU_INVERSE_VIEW_MATRIX), &out[5].link); | |||||
| return ret; | |||||
| } | } | ||||
| /* node type definition */ | /* node type definition */ | ||||
| Context not available. | |||||