Skip to content

Commit a6d04f1

Browse files
authored
Merge pull request #2539 from theMinka/theMinka_Fix-for-RenderState
Fixed stencil reference handling in RenderState #2538
2 parents b0ea539 + 5c1fbcc commit a6d04f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jme3-core/src/main/java/com/jme3/material/RenderState.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,9 +1629,9 @@ public RenderState copyMergedTo(RenderState additionalState, RenderState state)
16291629
state.backStencilFunction = additionalState.backStencilFunction;
16301630

16311631
state.frontStencilMask = additionalState.frontStencilMask;
1632-
state.frontStencilReference = additionalState.frontStencilMask;
1632+
state.frontStencilReference = additionalState.frontStencilReference;
16331633
state.backStencilMask = additionalState.backStencilMask;
1634-
state.backStencilReference = additionalState.backStencilMask;
1634+
state.backStencilReference = additionalState.backStencilReference;
16351635
} else {
16361636
state.stencilTest = stencilTest;
16371637

@@ -1647,9 +1647,9 @@ public RenderState copyMergedTo(RenderState additionalState, RenderState state)
16471647
state.backStencilFunction = backStencilFunction;
16481648

16491649
state.frontStencilMask = frontStencilMask;
1650-
state.frontStencilReference = frontStencilMask;
1650+
state.frontStencilReference = frontStencilReference;
16511651
state.backStencilMask = backStencilMask;
1652-
state.backStencilReference = backStencilMask;
1652+
state.backStencilReference = backStencilReference;
16531653
}
16541654
if (additionalState.applyLineWidth) {
16551655
state.lineWidth = additionalState.lineWidth;

0 commit comments

Comments
 (0)