Extended materials not applying when spawned off camera or when visibility settings change. #20150
Replies: 3 comments 2 replies
-
My only guess would have been with this, but if that didn't work I feel it has to be something in your shader. That's the only thing I can think of that would be in the hands of bevy itself. Also, I'm a bit confused what you mean when you say things like "walking towards the camera". Isn't the camera pointing in the movement direction? |
Beta Was this translation helpful? Give feedback.
-
I've woken up with a clearer head and I've made a short video - when I hit space, I can flush every chunk and force it to respawn. I added a fragment shader that colours everything pink to test my logic, and you can see that the material isn't being applied to anything that spawns behind the camera. 2025-07-16.08-34-43.mp4 |
Beta Was this translation helpful? Give feedback.
-
I've added this as a bevy bug because I've observed the same behaviour if you edit the vanilla extended material examples: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've updated this post to be a bit more specific:
I have a system that searches for entities with a specific flag on them, and then replaces the material they have with an extended material, simplified in this example to the following implementation and shader (for the purposes of this example the shader just turns the object pink):
and
When I update the material on these objects:
It only applies to objects within the view frustum of the camera:
2025-07-16.09-33-27.mp4
Not only that, if I change the visibility of the root object they all inherent their visibility from, when they are made visible again, the extended shader is no longer working on any of them:
2025-07-17.10-41-08.mp4
Does anybody have any idea why this might be occuring?
Beta Was this translation helpful? Give feedback.
All reactions