diff options
author | Hans Goudey <h.goudey@me.com> | 2022-08-05 07:01:50 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-08-05 07:02:02 +0300 |
commit | 359aca8d4cf9463d5c3ec7d0ab56ee52b2784eab (patch) | |
tree | da50fd07f7d55642615aba162463276a95586f89 /source/blender/nodes | |
parent | 53c0c3cbd7a6be77c002c0e7fe9a3b19ad34c0d2 (diff) |
Cleanup: Spelling, remove double negative
Diffstat (limited to 'source/blender/nodes')
3 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_geometry.cc b/source/blender/nodes/shader/nodes/node_shader_geometry.cc index 47df932f9d4..d23561de7ff 100644 --- a/source/blender/nodes/shader/nodes/node_shader_geometry.cc +++ b/source/blender/nodes/shader/nodes/node_shader_geometry.cc @@ -29,10 +29,9 @@ static int node_shader_gpu_geometry(GPUMaterial *mat, if (out[5].hasoutput) { GPU_material_flag_set(mat, GPU_MATFLAG_BARYCENTRIC); } - /* Opti: don't request orco if not needed. */ + /* Optimization: don't request orco if not needed. */ const float val[4] = {0.0f, 0.0f, 0.0f, 0.0f}; - GPUNodeLink *orco_link = (!out[2].hasoutput) ? GPU_constant(val) : - GPU_attribute(mat, CD_ORCO, ""); + GPUNodeLink *orco_link = out[2].hasoutput ? GPU_attribute(mat, CD_ORCO, "") : GPU_constant(val); const bool success = GPU_stack_link(mat, node, "node_geometry", in, out, orco_link); diff --git a/source/blender/nodes/shader/nodes/node_shader_hair_info.cc b/source/blender/nodes/shader/nodes/node_shader_hair_info.cc index 11d23e47735..f46556291ce 100644 --- a/source/blender/nodes/shader/nodes/node_shader_hair_info.cc +++ b/source/blender/nodes/shader/nodes/node_shader_hair_info.cc @@ -23,8 +23,8 @@ static int node_shader_gpu_hair_info(GPUMaterial *mat, { /* Length: don't request length if not needed. */ static const float zero = 0; - GPUNodeLink *length_link = (!out[2].hasoutput) ? GPU_constant(&zero) : - GPU_attribute(mat, CD_HAIRLENGTH, ""); + GPUNodeLink *length_link = out[2].hasoutput ? GPU_attribute(mat, CD_HAIRLENGTH, "") : + GPU_constant(&zero); return GPU_stack_link(mat, node, "node_hair_info", in, out, length_link); } diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc b/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc index fb5971021fc..0a28b34902e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_coord.cc @@ -41,9 +41,9 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat, GPUNodeLink *inv_obmat = (ob != NULL) ? GPU_uniform(&ob->imat[0][0]) : GPU_uniform(&dummy_matrix[0][0]); - /* Opti: don't request orco if not needed. */ + /* Optimization: don't request orco if not needed. */ float4 zero(0.0f); - GPUNodeLink *orco = (!out[0].hasoutput) ? GPU_constant(zero) : GPU_attribute(mat, CD_ORCO, ""); + GPUNodeLink *orco = out[0].hasoutput ? GPU_attribute(mat, CD_ORCO, "") : GPU_constant(zero); GPUNodeLink *mtface = GPU_attribute(mat, CD_AUTO_FROM_NAME, ""); GPU_stack_link(mat, node, "node_tex_coord", in, out, inv_obmat, orco, mtface); |