Skip to content

Commit d097498

Browse files
committed
paint: shader fixes
1 parent 1af0a16 commit d097498

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

paint/sources/render/make_sculpt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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");

paint/sources/render/render_path_paint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ void render_path_paint_bind_layers() {
11271127
}
11281128
}
11291129

1130-
if (g_context->colorid_picked && g_context->colorid_viewport_mask) {
1130+
if (g_context->colorid_viewport_mask) {
11311131
render_path_bind_target("texpaint_colorid", "texpaint_colorid");
11321132
}
11331133
}

0 commit comments

Comments
 (0)