We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
master branch d9fb61d
Windows 10 / Fedora ~31
Define a material:
#[derive(Debug, Clone, Reflect, RenderResources, ShaderDefs)] #[reflect(Component)] pub struct Material { /// Enabled by default #[shader_def] #[render_resources(ignore)] pub lit: bool, }
and his respective shader
.... #ifndef MATERIAL_UNLIT // Unlit shader doesn't need normals layout(location = 3) in vec3 Vertex_Normal; layout(location = 2) out vec3 v_Normal; #endif ....
Tried to spawn a mesh without the Vertex_Normal attribute and with the Material::unlit = true
Vertex_Normal
Material::unlit = true
The mesh should be rendered just fine
Panic, with a complain about the mesh missing the Vertex_Normal attribute;
I mananged to fix this issue by making all defines off by default instead of on, so in this case I use #ifdef MATERIAL_LIT instead
#ifdef MATERIAL_LIT
The text was updated successfully, but these errors were encountered:
I can't repro this using the internal StandardMaterial using any permutation of:
# ifndef
# ifdef
Can you attach a minimal example that repros the issue?
Sorry, something went wrong.
You should be able to reproduce the error by runing cargo run --example showcase using the repo https://github.com/lassade/bevy_gizmos/tree/issue-1589 make sure to get the issue-1589 branch
cargo run --example showcase
issue-1589
Edit A quick and dirt update to 1e42de6 still panics
1e42de6
Closing this as both RenderResources and ShaderDefs are no longer present in the post-0.6 renderer.
RenderResources
ShaderDefs
No branches or pull requests
Bevy version
master branch d9fb61d
Operating system & version
Windows 10 / Fedora ~31
What you did
Define a material:
and his respective shader
Tried to spawn a mesh without the
Vertex_Normal
attribute and with theMaterial::unlit = true
What you expected to happen
The mesh should be rendered just fine
What actually happened
Panic, with a complain about the mesh missing the
Vertex_Normal
attribute;Additional information
I mananged to fix this issue by making all defines off by default instead of on, so in this case I use
#ifdef MATERIAL_LIT
insteadThe text was updated successfully, but these errors were encountered: