Implement filled gizmos (#70)
CI / production-build (push) Canceled after 0s
CI / build-and-test (push) Canceled after 1m57s

Reviewed-on: #70
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #70.
This commit is contained in:
2026-09-26 17:55:35 +00:00
committed by EIREXE
parent 90412fa80d
commit 0d1b98d406
4 changed files with 492 additions and 23 deletions
+30
View File
@@ -0,0 +1,30 @@
#import bevy_pbr::mesh_functions::{get_world_from_local, mesh_position_local_to_clip}
@group(#{MATERIAL_BIND_GROUP}) @binding(0) var<uniform> material_color: vec4<f32>;
struct Vertex {
@builtin(instance_index) instance_index: u32,
@location(0) position: vec3<f32>,
@location(1) color: vec4<f32>,
};
struct VertexOutput {
@builtin(position) clip_position: vec4<f32>,
@location(0) color: vec4<f32>,
};
@vertex
fn vertex(vertex: Vertex) -> VertexOutput {
var output: VertexOutput;
output.clip_position = mesh_position_local_to_clip(
get_world_from_local(vertex.instance_index),
vec4<f32>(vertex.position, 1.0),
);
output.color = vertex.color;
return output;
}
@fragment
fn fragment(input: VertexOutput) -> @location(0) vec4<f32> {
return material_color * input.color;
}