mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
Fix contact shadows growing across modes
Armor left gl.autoClear off after its frame, so ContactShadows accumulated onto an uncleared target. Restore it at the end of the frame.
This commit is contained in:
1 parent
763ecf22b0
commit
73975a5d83
1 file changed
+2
-2
@@ -27,8 +27,6 @@ export const Armor = memo(() => {
|
||||
const newRenderSize = new Vector2();
|
||||
|
||||
useFrame(({ gl, camera, scene }) => {
|
||||
gl.autoClear = true;
|
||||
|
||||
gl.getSize(newRenderSize).multiplyScalar(gl.getPixelRatio());
|
||||
|
||||
if (!newRenderSize.equals(renderSize)) {
|
||||
@@ -50,6 +48,8 @@ export const Armor = memo(() => {
|
||||
|
||||
gl.clearDepth();
|
||||
gl.render(primaryArmorScene, camera);
|
||||
|
||||
gl.autoClear = true;
|
||||
}, 1);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user