gizmo shader

This commit is contained in:
Jonas H
2026-04-02 19:57:31 +02:00
parent d37a3c87e3
commit b0022ad17b

View File

@@ -81,6 +81,15 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
} }
} }
/// 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<f32> {
return vec4(in.world_normal, 1.0);
}
@group(1) @binding(0) @group(1) @binding(0)
var heightmap_texture: texture_2d<f32>; var heightmap_texture: texture_2d<f32>;