From 8bdbe10de7d09dd4f8745d7180653a725045193e Mon Sep 17 00:00:00 2001 From: luboslenco Date: Tue, 23 Sep 2025 12:24:43 +0200 Subject: [PATCH] Compositor fixes --- paint/assets/shader_datas.arm | Bin 18078 -> 18163 bytes paint/shaders/compositor_pass.kong | 5 ++++- paint/shaders/world_pass.kong | 16 +++++++++++++++- paint/sources/box_preferences.ts | 5 ----- paint/sources/config.ts | 4 ---- paint/sources/context.ts | 7 ------- paint/sources/make_mesh.ts | 4 ---- paint/sources/uniforms_ext.ts | 11 +++++------ 8 files changed, 24 insertions(+), 28 deletions(-) diff --git a/paint/assets/shader_datas.arm b/paint/assets/shader_datas.arm index 50e310c607d845509cd00b52e503f082fc974d73..63e6248521ca4aac6b9087c38da841c1132de19f 100644 GIT binary patch delta 53 zcmbQ&%lNsMal>gQM&`+9m{w0#W9H`;U|?V<$= 0.0 ? n.xy : octahedron_wrap(n.xy);"); node_shader_write_frag(kong, "if (n.z < 0.0) { n.xy = octahedron_wrap(n.xy); }"); diff --git a/paint/sources/uniforms_ext.ts b/paint/sources/uniforms_ext.ts index 0af36528..ecbcef53 100644 --- a/paint/sources/uniforms_ext.ts +++ b/paint/sources/uniforms_ext.ts @@ -46,11 +46,9 @@ function uniforms_ext_f32_link(object: object_t, mat: material_data_t, link: str else if (link == "_grain_strength") { return config_raw.rp_grain; } - else if (link == "_cone_offset") { - return context_raw.vxao_offset; - } - else if (link == "_cone_aperture") { - return context_raw.vxao_aperture; + else if (link == "_tonemap_strength") { + let tonemap: bool = context_raw.viewport_mode == viewport_mode_t.LIT || context_raw.viewport_mode == viewport_mode_t.PATH_TRACE; + return tonemap ? 1.0 : 0.0; } else if (link == "_bloom_sample_scale") { return render_path_base_bloom_sample_scale; @@ -271,7 +269,8 @@ function uniforms_ext_vec4_link(object: object_t, mat: material_data_t, link: st return vec4_create(context_raw.envmap_angle, math_sin(-context_raw.envmap_angle), math_cos(-context_raw.envmap_angle), scene_world.strength * 1.5); } else if (link == "_envmap_data_world") { - return vec4_create(context_raw.envmap_angle, 0.0, 0.0, context_raw.show_envmap ? scene_world.strength : 1.0); + let tonemap: bool = context_raw.viewport_mode == viewport_mode_t.LIT || context_raw.viewport_mode == viewport_mode_t.PATH_TRACE; + return vec4_create(context_raw.envmap_angle, tonemap ? 0.0 : 1.0, 0.0, context_raw.show_envmap ? scene_world.strength : 1.0); } else if (link == "_stencil_transform") { let v: vec4_t = vec4_create(context_raw.brush_stencil_x, context_raw.brush_stencil_y, context_raw.brush_stencil_scale, context_raw.brush_stencil_angle);