From 0b820e19c15ec986dfafb08eeb79c503ff47d160 Mon Sep 17 00:00:00 2001 From: Katajisto Date: Sat, 4 Oct 2025 23:44:52 +0300 Subject: [PATCH] solve issue with world TLAS being formed wrong --- src/editor/tacoma.jai | 6 +++++- src/world.jai | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/editor/tacoma.jai b/src/editor/tacoma.jai index 1206f59..231a061 100644 --- a/src/editor/tacoma.jai +++ b/src/editor/tacoma.jai @@ -54,6 +54,7 @@ gen_reference :: (w: s32, h: s32, postprocess: Post_Process, conf: Tacoma.Gen_Co world_triles.allocator = temp; for world.positions { + print("World positions for: %\n", it.trileName); trile := get_trile(it.trileName); ttrile : Tacoma.Trile_Data; for x: 0..15 { @@ -72,7 +73,7 @@ gen_reference :: (w: s32, h: s32, postprocess: Post_Process, conf: Tacoma.Gen_Co ttrile.vertexCount = cast(s32) (gfx.vertices.count / 3); array_add(*trile_list, ttrile); - for pos: it.positions { + for pos, posi: it.positions { array_add(*world_triles, Tacoma.World_Trile.{cast(s32)it_index, pos.xyz}); } } @@ -91,6 +92,9 @@ gen_reference :: (w: s32, h: s32, postprocess: Post_Process, conf: Tacoma.Gen_Co sky.skyIntensity = world.conf.skyIntensity; blases : Tacoma.Trile_Set = .{trile_list.data, cast(s32)trile_list.count}; + for world_triles { + print("World trile %\n", it); + } tlas : Tacoma.World = .{world_triles.data, cast(s32)world_triles.count}; ptr := Tacoma.do_gen("./modules/Tacoma/", w, h, sky, blases, tlas, conf); diff --git a/src/world.jai b/src/world.jai index 59f3cf1..9b66b2c 100644 --- a/src/world.jai +++ b/src/world.jai @@ -8,7 +8,7 @@ World_Config :: struct { sunLightColor : Vector3 = .{1.0, 1.0, 1.0}; @Color sunPosition : Vector3 = #run normalize(Vector3.{0.2, 0.3, 0.4}); sunIntensity : float = 2.0; @Slider,0,100,0.5 - skyIntensity : float = 2.0; @Slider,0,10,0.5 + skyIntensity : float = 1.0; @Slider,0,10,0.5 hasClouds : s32 = 1; @Slider,0,1,1