Conversation
examples/2d/mesh2d_manual.rs
Outdated
| @@ -264,7 +264,7 @@ fn vertex(vertex: Vertex) -> VertexOutput { | |||
| let model = mesh2d_functions::get_world_from_local(vertex.instance_index); | |||
| out.clip_position = mesh2d_functions::mesh2d_position_local_to_clip(model, vec4<f32>(vertex.position, 1.0)); | |||
| // Unpack the `u32` from the vertex buffer into the `vec4<f32>` used by the fragment shader | |||
There was a problem hiding this comment.
This comment is no longer needed
|
This looks good, but I'm curious about why we changed the vertex attribute format in that migration. I had the impression that we were intentionally using a custom vertex attribute in that example, but I could very easily be mistaken. |
|
Would like to know if the change away from the custom vertex attribute in #15847 was intentional or desired before approving. This fixes the issue, but it could also be fixed by switching back to the custom |
|
@rparrett It was half-intentional, but can be reverted. I originally changed it to fix a crash caused by conflicting vertex color formats with default mesh materials (see this) but then fixed it in a different way as per Cart's suggestion. I forgot to change it back and thought it was cleaner like that anyway, since it's the default format that My bad though! Didn't anticipate that it would break things or be particularly undesirable (I recall testing it and it worked like normal...) |
|
#15883 was selected over this PR because it better preserves the intent of the example. |
# Objective Fixes #15847 Alternative to #15862. Would appreciate a rendering person signaling preference for one or the other. ## Solution Partially revert the changes made to this example in #15524. Add comment explaining that the non-usage of the built-in color vertex attribute is intentional. ## Testing `cargo run --example mesh2d_manual`
Objective
mesh2d_manualexample doesn't render correctly #15847Solution
Testing