From 72b73f8c01937b0005bd34b02a5d58ec3cd5194a Mon Sep 17 00:00:00 2001 From: Katajisto Date: Wed, 16 Jul 2025 23:45:02 +0300 Subject: [PATCH] materials --- src/editor/trile_editor.jai | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/editor/trile_editor.jai b/src/editor/trile_editor.jai index dd43dc9..176e26c 100644 --- a/src/editor/trile_editor.jai +++ b/src/editor/trile_editor.jai @@ -5,9 +5,9 @@ zoom : float = 3.0; brush_radius : int = 5; -roughness : int = 0; -metallic : int = 0; -emittance : int = 0; +roughness : u8 = 0; +metallic : u8 = 0; +emittance : u8 = 0; hovered_trixel_x : int = -1; hovered_trixel_y : int = -1; @@ -45,6 +45,9 @@ current_trile : *Trile; apply_tool_to_trixel :: (x: s64, y: s64, z: s64) { if current_tool == .PAINT { current_trile.trixels[x][y][z].material.color = current_color; + current_trile.trixels[x][y][z].material.metallic = metallic; + current_trile.trixels[x][y][z].material.roughness = roughness; + current_trile.trixels[x][y][z].material.emittance = emittance; } if current_tool == .ADD { current_trile.trixels[x][y][z].empty = false;