Improve bake quality

This commit is contained in:
luboslenco
2025-01-16 20:28:53 +01:00
parent a82959a73c
commit 7344cd4062
3 changed files with 8 additions and 2 deletions
+7
View File
@@ -689,8 +689,15 @@ function render_path_paint_draw() {
}
if (context_raw.tool == workspace_tool_t.BAKE) {
if (context_raw.bake_type == bake_type_t.NORMAL || context_raw.bake_type == bake_type_t.HEIGHT || context_raw.bake_type == bake_type_t.DERIVATIVE) {
if (!render_path_paint_baking && context_raw.pdirty > 0) {
// Use RGBA128 texture format for high poly to low poly baking to prevent artifacts
// Existing undo layers are used during the baking process for now
base_bits_handle.position = texture_bits_t.BITS32;
layers_set_bits();
render_path_paint_baking = true;
_render_path_paint_bake_type = context_raw.bake_type;
context_raw.bake_type = context_raw.bake_type == bake_type_t.NORMAL ? bake_type_t.NORMAL_OBJECT : bake_type_t.POSITION; // Bake high poly data
-1
View File
@@ -522,7 +522,6 @@ function history_apply_mask() {
history_push(tr("Apply Mask"));
}
function history_invert_mask() {
history_push(tr("Invert Mask"));
}
+1 -1
View File
@@ -377,7 +377,7 @@ function slot_layer_resize_and_set_bits(raw: slot_layer_t) {
let format: tex_format_t =
base_bits_handle.position == texture_bits_t.BITS8 ? tex_format_t.RGBA32 :
base_bits_handle.position == texture_bits_t.BITS16 ? tex_format_t.RGBA64 :
tex_format_t.RGBA128;
tex_format_t.RGBA128;
///if is_sculpt
format = tex_format_t.RGBA128;