File tree Expand file tree Collapse file tree 5 files changed +6
-10
lines changed Expand file tree Collapse file tree 5 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -28,20 +28,20 @@ cross = ["wgc/cross"]
2828[target .'cfg(not(target_arch = "wasm32"))' .dependencies .wgc ]
2929package = " wgpu-core"
3030git = " https://github.com/gfx-rs/wgpu"
31- rev = " eef478fc5d4de9c114084a4f8a7a3d434697fdba "
31+ rev = " e430cf4bcc10aea447f637067fe81c75c80f0e46 "
3232features = [" raw-window-handle" ]
3333
3434[target .'cfg(target_arch = "wasm32")' .dependencies .wgc ]
3535package = " wgpu-core"
3636git = " https://github.com/gfx-rs/wgpu"
37- rev = " eef478fc5d4de9c114084a4f8a7a3d434697fdba "
37+ rev = " e430cf4bcc10aea447f637067fe81c75c80f0e46 "
3838features = [" raw-window-handle" ]
3939optional = true
4040
4141[dependencies .wgt ]
4242package = " wgpu-types"
4343git = " https://github.com/gfx-rs/wgpu"
44- rev = " eef478fc5d4de9c114084a4f8a7a3d434697fdba "
44+ rev = " e430cf4bcc10aea447f637067fe81c75c80f0e46 "
4545
4646[dependencies ]
4747arrayvec = " 0.5"
Original file line number Diff line number Diff line change @@ -507,6 +507,7 @@ impl framework::Example for Example {
507507 topology : wgpu:: PrimitiveTopology :: TriangleList ,
508508 front_face : wgpu:: FrontFace :: Ccw ,
509509 cull_mode : Some ( wgpu:: Face :: Back ) ,
510+ clamp_depth : device. features ( ) . contains ( wgpu:: Features :: DEPTH_CLAMPING ) ,
510511 ..Default :: default ( )
511512 } ,
512513 depth_stencil : Some ( wgpu:: DepthStencilState {
@@ -519,7 +520,6 @@ impl framework::Example for Example {
519520 slope_scale : 2.0 ,
520521 clamp : 0.0 ,
521522 } ,
522- clamp_depth : device. features ( ) . contains ( wgpu:: Features :: DEPTH_CLAMPING ) ,
523523 } ) ,
524524 multisample : wgpu:: MultisampleState :: default ( ) ,
525525 } ) ;
@@ -646,7 +646,6 @@ impl framework::Example for Example {
646646 depth_compare : wgpu:: CompareFunction :: Less ,
647647 stencil : wgpu:: StencilState :: default ( ) ,
648648 bias : wgpu:: DepthBiasState :: default ( ) ,
649- clamp_depth : false ,
650649 } ) ,
651650 multisample : wgpu:: MultisampleState :: default ( ) ,
652651 } ) ;
Original file line number Diff line number Diff line change @@ -232,7 +232,6 @@ impl framework::Example for Skybox {
232232 depth_compare : wgpu:: CompareFunction :: LessEqual ,
233233 stencil : wgpu:: StencilState :: default ( ) ,
234234 bias : wgpu:: DepthBiasState :: default ( ) ,
235- clamp_depth : false ,
236235 } ) ,
237236 multisample : wgpu:: MultisampleState :: default ( ) ,
238237 } ) ;
@@ -263,7 +262,6 @@ impl framework::Example for Skybox {
263262 depth_compare : wgpu:: CompareFunction :: LessEqual ,
264263 stencil : wgpu:: StencilState :: default ( ) ,
265264 bias : wgpu:: DepthBiasState :: default ( ) ,
266- clamp_depth : false ,
267265 } ) ,
268266 multisample : wgpu:: MultisampleState :: default ( ) ,
269267 } ) ;
Original file line number Diff line number Diff line change @@ -570,7 +570,6 @@ impl framework::Example for Example {
570570 depth_compare : wgpu:: CompareFunction :: Less ,
571571 stencil : wgpu:: StencilState :: default ( ) ,
572572 bias : wgpu:: DepthBiasState :: default ( ) ,
573- clamp_depth : false ,
574573 } ) ,
575574 // No multisampling is used.
576575 multisample : wgpu:: MultisampleState :: default ( ) ,
@@ -605,7 +604,6 @@ impl framework::Example for Example {
605604 depth_compare : wgpu:: CompareFunction :: Less ,
606605 stencil : wgpu:: StencilState :: default ( ) ,
607606 bias : wgpu:: DepthBiasState :: default ( ) ,
608- clamp_depth : false ,
609607 } ) ,
610608 multisample : wgpu:: MultisampleState :: default ( ) ,
611609 } ) ;
Original file line number Diff line number Diff line change @@ -603,6 +603,8 @@ fn map_primitive_state(primitive: &wgt::PrimitiveState) -> web_sys::GpuPrimitive
603603 PrimitiveTopology :: TriangleStrip => pt:: TriangleStrip ,
604604 } ) ;
605605
606+ //mapped.clamp_depth(primitive.clamp_depth);
607+
606608 mapped
607609}
608610
@@ -647,7 +649,6 @@ fn map_stencil_state_face(desc: &wgt::StencilFaceState) -> web_sys::GpuStencilFa
647649
648650fn map_depth_stencil_state ( desc : & wgt:: DepthStencilState ) -> web_sys:: GpuDepthStencilState {
649651 let mut mapped = web_sys:: GpuDepthStencilState :: new ( map_texture_format ( desc. format ) ) ;
650- mapped. clamp_depth ( desc. clamp_depth ) ;
651652 mapped. depth_bias ( desc. bias . constant ) ;
652653 mapped. depth_bias_clamp ( desc. bias . clamp ) ;
653654 mapped. depth_bias_slope_scale ( desc. bias . slope_scale ) ;
You can’t perform that action at this time.
0 commit comments