Depth buffer cleanup
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user