Replies: 1 comment
-
|
After playing around with it a lot more i found the issue: the fact that the AABB component is not updated when I add an updated version of the mesh. This culls it if the original location of the mesh isn't in view anymore. so just updating the aabb component or adding the NoFrustumCulling component solved it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
Background:
I'm currently writing my first bevy shader since I have a mesh in world space coordinates but parented it to an object that is moved around so it moves around with it. While there might be also alternative solutions such as changing the object order I wanted to use this opportunity to write my first shader since it seemed like a fairly easy task.
I started with the mesh2d shader and copied basically everything as well as a custom Material2D implementation.
This (similar to the colormaterial of the library) without any modification works as before - which is to be expected since it re-uses the existing code.
The Change
Since the mesh is in worldspace I assumed that I can simply skip the local to world transformation here
and replace this with just
This seems to work but only sometimes - since the mesh is updated somewhat frequently (every 0.5-2 sec) one can see the mesh sometimes render properly but also sometimes not. without this change it's always perfectly visible.
Is there something I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions