Comments (2)
I'm wondering how this even works. I'm 99% sure that graphics APIs don't let you bind the same image as render attachment and another input image in the same pass, unless working with storage images in compute.
Does bevy implicitly copy the texture in the background? Otherwise you could try rendering to a separate texture (essentially double buffering) to see if that resolves the issue. Though I'm not positive that this is the source of the problem.
from bevy.
I did a bunch of testing and I'm still not completely sure what the issue is. Here's what I found though:
On WASM/WebGL:
- Draw image STRAIGHT to the screen
- On frame 0+, the initial image is drawn clearly to the screen
- Draw image via custom material to the SCREEN
- On frame 0-4, the image is not drawn (?) but there IS clear color from the camera
- On frame 4+, the image is drawn to the screen
- Pass image through custom shader/material and render to ITSELF, then draw the image to the screen
- On frame 0+, a solid rectangle of red (#2A0000) is drawn to the screen
On native:
- Draw image STRAIGHT to the screen
- On frame 0, nothing is drawn. The screen is black.
- On frame 1+, the image is drawn to the screen
- Draw image via custom material to the SCREEN
- On frame 0, nothing is drawn. The screen is black.
- On frame 1+, the image is drawn to the screen
- Pass image through custom shader/material and render to ITSELF, then draw the image to the screen
- On frame 0, nothing is drawn. The screen is black.
- On frame 1+, the image is drawn to the screen normally (correct behavior)
I conducted the tests by putting a stop point after RenderApp::Cleanup
.
Is it byte alignment? Code execution speed? The backend/drivers? The difference in behavior between wasm and native is very confusing.
Attached is the red rectangle of despair.
from bevy.
Related Issues (20)
- Follow-up: Make `bevy_math`'s `ops` public (and document the methods)
- Genenerate doc comments from Required Components HOT 3
- Expose Required Component Info Through Reflection
- Consider Enabling `apply_clones` Lint
- Retrying a trigger
- Inputs clash in 3d_gizmos example HOT 1
- Use ThinColumn for both resources and sparse sets
- Make toggling visibility easier HOT 3
- Add support for auxiliary/fragment nodes in ui layouts and scenes
- Add `filter_map_unchanged()` to `Mut<T>`
- TrackedRenderPass::set_vertex_buffer does not update if the size of sliced buffer changed
- Allow Events to opt out of being targeted or untargeted for Observers
- Implement Reflect for std::ops::Bound
- `Slab not found` error when running the `loading_screen` example. HOT 2
- Better `Dynamic*` mutable iteration HOT 1
- Easy reflection type traversal utils HOT 2
- Update/change fields of a reflected/dynamic type HOT 1
- `AnimationPlayer` doesn't explain how it is created
- Improve ergonomics for single-section `Text`s HOT 1
- `FromWorld` should mention how it works with `Default`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.