-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Add an example for stochastic texture sampling #17527
New issue
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
base: main
Are you sure you want to change the base?
Add an example for stochastic texture sampling #17527
Conversation
The generated |
I personally don't like that kind of example because it doesn't really show any bevy api that isn't already documented in another example. I think for an example like that to be included it would need to show something that requires a lot of complexe use of bevy apis, but this just shows a simple use of the mesh and material api. Most of the complexity is in the shader. If people want it despite that I won't push back more, but I just wanted to voice this. |
I think I agree. Would we want to support this kind of behaviour in-tree or let external crates provide this kind of stuff? |
I think the broader question here is "is it the job of Bevy documentation to teach people game development in addition to how to use Bevy?" I would argue the answer is "yes," due in part to Bevy's popularity, but perhaps it's valuable to introduce some kind of organizational structure here, or provide this kind of thing in a "recipe book," as opposed to an example that directly demonstrates use of the engine. Because I agree, this is the kind of content that is Bevy-agnostic and could apply to pretty much any game engine. |
I personally disagree, but that's only my personal opinion. The bevy community has decided to start merging tutorials that are aimed at more general game development in the context of bevy and not just teaching bevy itself. bevyengine/bevy-website#2131 |
Objective
This PR adds an example that showcases how a custom material can be used to repeat a texture stochastically while avoiding repetition artifacts.
It is related to #13682.
It doesn't provide a seamless solution for users but at least it can provide an example.
I don't think it's the best implementation out there (it's my first time writing a shader and I mostly glued external code) but it seems to be working!
StochasticSampling.mov