Selaa lähdekoodia

WebGPU: fix frontFace (#23965)

sunag 3 vuotta sitten
vanhempi
commit
c654ba73b7
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      examples/jsm/renderers/webgpu/WebGPURenderPipeline.js

+ 3 - 3
examples/jsm/renderers/webgpu/WebGPURenderPipeline.js

@@ -448,8 +448,8 @@ class WebGPURenderPipeline {
 		switch ( material.side ) {
 
 			case FrontSide:
-				descriptor.frontFace = GPUFrontFace.CCW;
-				descriptor.cullMode = GPUCullMode.Back;
+				descriptor.frontFace = GPUFrontFace.CW;
+				descriptor.cullMode = GPUCullMode.Front;
 				break;
 
 			case BackSide:
@@ -458,7 +458,7 @@ class WebGPURenderPipeline {
 				break;
 
 			case DoubleSide:
-				descriptor.frontFace = GPUFrontFace.CCW;
+				descriptor.frontFace = GPUFrontFace.CW;
 				descriptor.cullMode = GPUCullMode.None;
 				break;