-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
MSAA for textures #3254
Labels
Comments
As per discussion on discord, this should be supported in bevy (as per information provided by cwfitzgerald). We may need to add an example, happy to look into this & add an example. |
FWIW, I'm hitting the same with Vulkan:
|
kurtkuehnert
pushed a commit
to kurtkuehnert/bevy
that referenced
this issue
Mar 6, 2022
# Objective Will fix bevyengine#3377 and bevyengine#3254 ## Solution Use an enum to represent either a `WindowId` or `Handle<Image>` in place of `Camera::window`. Co-authored-by: Carter Anderson <mcanders1@gmail.com>
Closing due to #3412. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What problem does this solve or what need does it fill?
MSAA is implemented when rendering to a window, but not when rendering to a texture.
What solution would you like?
To be able to render to a texture with MSAA enabled.
What alternative(s) have you considered?
I tried following the
render_to_texture
example to render a second camera to a texture, but it failed due to MSAA being enabled in my app.Adding
.insert_resource(Msaa { samples: 4 })
to the example will cause this error:I tried to mimic render graph setup code elsewhere that inserts a resolve target node, but have been unsuccessful, because Bevy doesn't seem to support multisampled textures:
https://github.com/bevyengine/bevy/blob/main/crates/bevy_render/src/shader/shader_reflect.rs#L135
which will cause this validation failure:
https://github.com/gfx-rs/wgpu/blob/master/wgpu-core/src/device/mod.rs#L1793-L1799
Additional context
In addition to the texture not being antialiased, I can't find a good way to use MSAA at all when rendering to a texture.
The text was updated successfully, but these errors were encountered: