gizmo shader
This commit is contained in:
@@ -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>;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user