@@ -162,7 +162,10 @@ node_shader_context_t *sculpt_make_sculpt_run(material_t *data, material_context
162162 bool particle = g_context -> tool == TOOL_TYPE_PARTICLE ;
163163 // Decal fill layer: displacement must be confined to the decal box projection
164164 bool decal_layer = g_context -> layer -> fill_material != NULL && g_context -> layer -> uv_type == UV_TYPE_PROJECT && g_context -> tool == TOOL_TYPE_FILL ;
165- bool sculpt_triplanar = !decal && !decal_layer && g_context -> tool != TOOL_TYPE_BLUR ;
165+
166+ bool has_wposition = g_context -> tool == TOOL_TYPE_BRUSH || g_context -> tool == TOOL_TYPE_ERASER || g_context -> tool == TOOL_TYPE_CLONE ||
167+ g_context -> tool == TOOL_TYPE_BLUR || g_context -> tool == TOOL_TYPE_PARTICLE || g_context -> tool == TOOL_TYPE_FILL || decal ;
168+ bool sculpt_triplanar = has_wposition && !decal && !decal_layer && g_context -> tool != TOOL_TYPE_BLUR ;
166169 node_shader_add_out (kong , "tex_coord: float2" );
167170 node_shader_write_vert (kong , "var madd: float2 = float2(0.5, 0.5);" );
168171 node_shader_write_vert (kong , "output.tex_coord = input.pos.xy * madd + madd;" );
@@ -503,9 +506,6 @@ node_shader_context_t *sculpt_make_sculpt_run(material_t *data, material_context
503506 }
504507 }
505508
506- bool has_wposition = g_context -> tool == TOOL_TYPE_BRUSH || g_context -> tool == TOOL_TYPE_ERASER || g_context -> tool == TOOL_TYPE_CLONE ||
507- g_context -> tool == TOOL_TYPE_BLUR || g_context -> tool == TOOL_TYPE_PARTICLE || g_context -> tool == TOOL_TYPE_FILL || decal ;
508-
509509 if (g_context -> select_active && has_wposition ) {
510510 node_shader_add_constant (kong , "VP: float4x4" , "_view_proj_matrix" );
511511 node_shader_add_constant (kong , "select_mask: float4" , "_select_mask" );
0 commit comments