Skip to content

fix: migrate deprecated PCFSoftShadowMap to PCFShadowMap - #11

Merged
tnb1j merged 2 commits into
mainfrom
fix/pcfsoft-shadowmap-deprecation
Aug 19, 2026
Merged

fix: migrate deprecated PCFSoftShadowMap to PCFShadowMap#11
tnb1j merged 2 commits into
mainfrom
fix/pcfsoft-shadowmap-deprecation

Conversation

@tnb1j

@tnb1j tnb1j commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

PCFSoftShadowMap (2) is deprecated in favor of PCFShadowMap (1), which now applies the same soft shadow filtering. This removes the runtime WebGLShadowMap: PCFSoftShadowMap has been deprecated warning at every source.

Changes

  • Editor config migration (editor/js/Config.js): rewrite stale shadowType: 2 saved in localStorage to 1 on load.
  • Player / image render (editor/js/libs/app.js, editor/js/Menubar.Render.js): new getShadowMapType() helper migrates 2 → 1 before applying it to a renderer, covering old/published project JSONs.
  • Examples: replace FOUR.PCFSoftShadowMap with FOUR.PCFShadowMap in the WebGL manual example and 9 WebGPU examples.
  • Tests: add editor QUnit suite (test/unit/editor/app.tests.js, test/unit/four.editor.unit.js, test/unit/UnitTestsEditor.html) plus test-unit-editor npm scripts.

Verification

  • npm run test-unit-editor → 2 passed, 0 failed
  • npx eslint passes on all changed files

PCFSoftShadowMap (2) was deprecated in favor of PCFShadowMap (1), which now
applies the same soft filtering. Migrate stale editor configs and project JSONs,
update the examples, and add a regression test so old scenes stop emitting the
WebGLShadowMap deprecation warning.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@github-actions

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.64
86.89
365.64
86.89
+0 B
+0 B
WebGPU 679.61
188.59
679.61
188.59
+0 B
+0 B
WebGPU Nodes 677.65
188.27
677.65
188.27
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 507.69
123.44
507.69
123.44
+0 B
+0 B
WebGPU 747.13
201.45
747.13
201.45
+0 B
+0 B
WebGPU Nodes 697.48
189.04
697.48
189.04
+0 B
+0 B

Software WebGL can take longer than a fixed 1s to draw the first frame for an
OffscreenCanvas worker, which made the manual-security suite intermittently
fail with a blank-canvas assertion on CI. Poll the screenshot until the scene
is visibly rendered before asserting.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@tnb1j
tnb1j merged commit 781a0ef into main Aug 19, 2026
6 checks passed
@tnb1j
tnb1j deleted the fix/pcfsoft-shadowmap-deprecation branch August 19, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant