Explorar o código

WebGPU: fix frontFace (#23965)

sunag %!s(int64=3) %!d(string=hai) anos
pai
achega
c654ba73b7
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  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;