Skip to content

Commit 2dadc86

Browse files
authored
Change CullMode to none for sprites (bevyengine#241)
With `CullMode::Back`, a sprite image that is rotated in x,y plane won't display properly Co-authored-by: kaflu <kaflu@users.noreply.github.com>
1 parent 47f3a0b commit 2dadc86

File tree

1 file changed

+2
-2
lines changed
  • crates/bevy_sprite/src/render

1 file changed

+2
-2
lines changed

crates/bevy_sprite/src/render/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub fn build_sprite_sheet_pipeline(shaders: &mut Assets<Shader>) -> PipelineDesc
2222
PipelineDescriptor {
2323
rasterization_state: Some(RasterizationStateDescriptor {
2424
front_face: FrontFace::Ccw,
25-
cull_mode: CullMode::Back,
25+
cull_mode: CullMode::None,
2626
depth_bias: 0,
2727
depth_bias_slope_scale: 0.0,
2828
depth_bias_clamp: 0.0,
@@ -70,7 +70,7 @@ pub fn build_sprite_pipeline(shaders: &mut Assets<Shader>) -> PipelineDescriptor
7070
PipelineDescriptor {
7171
rasterization_state: Some(RasterizationStateDescriptor {
7272
front_face: FrontFace::Ccw,
73-
cull_mode: CullMode::Back,
73+
cull_mode: CullMode::None,
7474
depth_bias: 0,
7575
depth_bias_slope_scale: 0.0,
7676
depth_bias_clamp: 0.0,

0 commit comments

Comments
 (0)