You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently writing a tool for manipulating meshes and am using bevy to visualize the meshes. One problem though is it seems like bevy duplicates vertex data for each face that contains a single vertex. For example in https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/mesh/shape/mod.rs, a cube is specified with 24 pieces of vertex data instead of just having 6 in combination with a smaller index buffer.
I want to try a different approach with a custom shader that computes the face normal in the fragment shader instead of interpolating it from the vertices.
What's the easiest way to do this right now? I still want PBR shading, I basically just want to compute my surface normals differently.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently writing a tool for manipulating meshes and am using bevy to visualize the meshes. One problem though is it seems like bevy duplicates vertex data for each face that contains a single vertex. For example in https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/mesh/shape/mod.rs, a cube is specified with 24 pieces of vertex data instead of just having 6 in combination with a smaller index buffer.
I want to try a different approach with a custom shader that computes the face normal in the fragment shader instead of interpolating it from the vertices.
What's the easiest way to do this right now? I still want PBR shading, I basically just want to compute my surface normals differently.
Beta Was this translation helpful? Give feedback.
All reactions