Skip to content

Commit

Permalink
Fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
tychedelia committed Sep 7, 2024
1 parent b97adf9 commit ac65416
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions examples/assets/shaders/particle_mouse_material.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,14 @@ struct VertexOutput {
fn vertex(vertex: Vertex) -> VertexOutput {
let particle = particles[vertex.instance_index];
var out: VertexOutput;

if (vertex.instance_index == 100) {
out.clip_position = vec4(particle.position, 0.0, 1.0);
out.color = vec4(1.0, 0.0, 0.0, 1.0); // Red color for visibility
} else {
out.clip_position = mesh_position_local_to_clip(
get_world_from_local(vertex.instance_index),
vec4(vertex.position, 1.0)
) + vec4(particle.position, 0.0, 0.0);
out.color = particle.color;
}

out.clip_position = mesh_position_local_to_clip(
get_world_from_local(vertex.instance_index),
vec4(vertex.position, 1.0)
) + vec4(particle.position, 0.0, 0.0);
out.color = particle.color;
return out;
}



@fragment
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
return in.color;
Expand Down

0 comments on commit ac65416

Please sign in to comment.