Open marshauf opened 2 years ago
I'm not sure what's that (I don't have it locally, probably I need to install something to get the validation layers). I suspect it's because currently we always output a mesh with UVs, but if there no image/texture we don't use those attributes. We should definitely optimize this though, even if that's not related to the current warning.
Ah yes I remember, this is commented out currently because we use a fixed ParticleVertex
layout for convenience, but would otherwise need to dynamically populate a buffer either with or without those UVs, which makes the vertex buffer a bit less convenient to manipulate (the type of vertices is not known at compile time anymore).
Note: found how to enable validation layers, and confirming I can repro. However I'm less sure why this happens now that I've looked quickly at it. But with a repro it should be easier to fix.
Ok this is actually a limitation of the current design, notes for self:
ParticlesRenderPipeline
unconditionally adds the vertex_uv
to VertexBufferLayout::attributes
, which is where the validation warning is coming from when not using textures, because the render shader then never reads that attributeParticleVertex
is defined with unconditional UV coordinates, matching the attribute layout, and would need to become a runtime-sized "struct"EffectsMeta
contains a BufferVec<ParticleVertex>
with an element size fixed at build time
Hello,
when running 2D or 3D examples (0e1df4d9f712907e1c1ae10f77478221247f7f72), bevy warns about a performance problem: