diff --git a/src/shaders/main.wesl b/src/shaders/main.wesl index 20d3c28..089e7c3 100644 --- a/src/shaders/main.wesl +++ b/src/shaders/main.wesl @@ -81,6 +81,15 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4 { } } +/// Fragment shader for transform gizmo lines. +/// Outputs `world_normal` directly as the RGB color — the vertex data encodes +/// axis color (X=red, Y=green, Z=blue) in the normal attribute rather than +/// storing a true geometric normal. +@fragment +fn fs_gizmo(in: VertexOutput) -> @location(0) vec4 { + return vec4(in.world_normal, 1.0); +} + @group(1) @binding(0) var heightmap_texture: texture_2d;