diff --git a/packages/core/src/RenderPipeline/RenderQueue.ts b/packages/core/src/RenderPipeline/RenderQueue.ts index fedfadf825..8c23ba65c8 100644 --- a/packages/core/src/RenderPipeline/RenderQueue.ts +++ b/packages/core/src/RenderPipeline/RenderQueue.ts @@ -137,7 +137,7 @@ export class RenderQueue { program.uploadUngroupTextures(); } } - material.renderState._apply(camera.engine,element.component.entity.transform._isFrontFaceInvert()); + material.renderState._apply(camera.engine, renderer.entity.transform._isFrontFaceInvert()); rhi.drawPrimitive(element.mesh, element.subMesh, program); } else { diff --git a/packages/core/src/shader/state/RasterState.ts b/packages/core/src/shader/state/RasterState.ts index 4c53588a2e..04672267f4 100644 --- a/packages/core/src/shader/state/RasterState.ts +++ b/packages/core/src/shader/state/RasterState.ts @@ -57,7 +57,7 @@ export class RasterState { } else { gl.frontFace(gl.CCW); } - lastState._frontFaceInvert == frontFaceInvert; + lastState._frontFaceInvert = frontFaceInvert; } // apply polygonOffset.