You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem does this solve or what need does it fill?
I've made a new shader for bevy_sprite that improves texture filtering.
This improves:
jitter/distortion when scaling
aliased edges when rotating
fixes the edge bleeding present in texture atlases
I'm changing the texture sampler manually, but how do I change the default texture sampler for sprites/ColorMaterial? I need to set mag_filter to linear, but this is difficult to do because samplers are tied to textures.
What solution would you like?
Textures and samplers should be decoupled. While textures are only useful when paired with a sampler, this assumes that entities sharing the same texture also want to share the same sampler.
This also allows for sampler reuse (#5), when a sampler isn't present we can use the default default sampler.
What alternative(s) have you considered?
The demo below uses a system to modify sprite entity textures when they are created. However, this is not ideal because entities have different textures. Two copies of the same texture and texture atlas assets are required just to change their sampler!
Additional context
Demo for texture atlas scaling. (my implementation is on the left)
scale-demo.mp4
Sprite rotation aliasing:
The text was updated successfully, but these errors were encountered:
What problem does this solve or what need does it fill?
I've made a new shader for bevy_sprite that improves texture filtering.
This improves:
I'm changing the texture sampler manually, but how do I change the default texture sampler for sprites/ColorMaterial? I need to set mag_filter to linear, but this is difficult to do because samplers are tied to textures.
What solution would you like?
Textures and samplers should be decoupled. While textures are only useful when paired with a sampler, this assumes that entities sharing the same texture also want to share the same sampler.
This also allows for sampler reuse (#5), when a sampler isn't present we can use the default default sampler.
What alternative(s) have you considered?
The demo below uses a system to modify sprite entity textures when they are created. However, this is not ideal because entities have different textures. Two copies of the same texture and texture atlas assets are required just to change their sampler!
Additional context
Demo for texture atlas scaling. (my implementation is on the left)
scale-demo.mp4
Sprite rotation aliasing:
The text was updated successfully, but these errors were encountered: