File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ by 2, you need to change the anchor of the sprite (which is at the center by
18
18
default), or it will not be pixel aligned.
19
19
20
20
Also note that Bevy uses linear sampling by default for textures, which is
21
- not what you want for pixel art. The easiest way to change this is to insert the
22
- following resource on you app :
21
+ not what you want for pixel art. The easiest way to change this is to set the
22
+ default_sampler on the ImagePlugin :
23
23
``` rust
24
24
App :: new ()
25
- . insert_resource ( bevy :: render :: texture :: ImageSettings :: default_nearest ())
25
+ . add_plugins ( DefaultPlugins . set ( ImagePlugin :: default_nearest () ))
26
26
...
27
27
```
28
28
@@ -59,8 +59,7 @@ use bevy_pixel_camera::{
59
59
60
60
fn main () {
61
61
App :: new ()
62
- . insert_resource (bevy :: render :: texture :: ImageSettings :: default_nearest ())
63
- . add_plugins (DefaultPlugins )
62
+ . add_plugins (DefaultPlugins . set (ImagePlugin :: default_nearest ()))
64
63
. add_plugin (PixelCameraPlugin )
65
64
. add_plugin (PixelBorderPlugin {
66
65
color : Color :: rgb (0.1 , 0.1 , 0.1 ),
You can’t perform that action at this time.
0 commit comments