Depth buffer cleanup

This commit is contained in:
luboslenco
2025-07-01 14:46:40 +02:00
parent 38b59ca7fb
commit 2f007eabde
51 changed files with 269 additions and 613 deletions
+3 -3
View File
@@ -245,7 +245,7 @@ function slot_layer_swap(raw: slot_layer_t, other: slot_layer_t) {
function slot_layer_clear(raw: slot_layer_t, base_color: i32 = 0x00000000, base_image: gpu_texture_t = null, occlusion: f32 = 1.0, roughness: f32 = layers_default_rough, metallic: f32 = 0.0) {
// Base
_gpu_begin(raw.texpaint, null, clear_flag_t.COLOR, base_color);
_gpu_begin(raw.texpaint, null, null, clear_flag_t.COLOR, base_color);
gpu_end();
if (base_image != null) {
draw_begin(raw.texpaint);
@@ -255,10 +255,10 @@ function slot_layer_clear(raw: slot_layer_t, base_color: i32 = 0x00000000, base_
if (slot_layer_is_layer(raw)) {
// Nor
_gpu_begin(raw.texpaint_nor, null, clear_flag_t.COLOR, color_from_floats(0.5, 0.5, 1.0, 0.0));
_gpu_begin(raw.texpaint_nor, null, null, clear_flag_t.COLOR, color_from_floats(0.5, 0.5, 1.0, 0.0));
gpu_end();
// Occ, rough, met
_gpu_begin(raw.texpaint_pack, null, clear_flag_t.COLOR, color_from_floats(occlusion, roughness, metallic, 0.0));
_gpu_begin(raw.texpaint_pack, null, null, clear_flag_t.COLOR, color_from_floats(occlusion, roughness, metallic, 0.0));
gpu_end();
}