v2.8.0

playcanvas/enginev2.8.0Jun 13, 2025by mvaligursky

AI Summary

A major architectural shift focusing on WebGPU migration (WGSL), GSplat enhancements, and new material features like anisotropy.

Key Highlights

  • WebGPU migration (WGSL)
  • KHR_materials_anisotropy support
  • GSplat updates
  • Shader chunk customization API

Breaking Changes

  • Deprecated `pc.createShader` and `pc.createShaderFromCode`
  • Updated gsplat component material API
  • New public API to customize shader chunks (Material and global)
  • Removing non-functional depth pass

New Features

  • KHR_materials_anisotropy support
  • GSplat histogram sort for uncompressed
  • GSplat resource cleanup
  • WebGPU support for batching
  • WebGPU clustered cookies
  • WebGPU support for picker pass
  • WebGPU VSM shadows implementation
  • WebGPU soft shadows implementation
  • Built-in instancing works with WGSL
  • Particle system internal shaders use WGSL
  • Quat `fromArray` and `toArray` methods
  • Quat dot product and `lerp`
  • Camera frame handles layer changes on the camera
  • Color correction using LUT texture to CameraFrame postprocessing
  • Mesh-based Skydome can write depth during prepass

Full Release Notes

https://github.com/user-attachments/assets/52d5fa49-a0d8-45fb-bc4d-97fe54856c77

## Breaking Changes
* [BREAKING] Deprecated `pc.createShader` and `pc.createShaderFromCode` by @mvaligursky in https://github.com/playcanvas/engine/pull/7657
* [BREAKING] Update gsplat component material API by @slimbuck in https://github.com/playcanvas/engine/pull/7749
* [BREAKING] New public API to customize shader chunks (Material and global) by @mvaligursky in https://github.com/playcanvas/engine/pull/7665
* [BREAKING] Removing non-functional depth pass by @mvaligursky in https://github.com/playcanvas/engine/pull/7597
* [BREAKING] Feature: `KHR_materials_anisotropy` by @emadurandal in https://github.com/playcanvas/engine/pull/7668

## Changes
* Envmap and partial lighting works using WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7581
* Enable debug warning if the required uniform is null or undefined by @mvaligursky in https://github.com/playcanvas/engine/pull/7582
* Convert many `StandardMaterial` front end and required backend chunks to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7583
* Morphing uses texture array to store morph targets by @mvaligursky in https://github.com/playcanvas/engine/pull/7584
* WGSL shaders support PCF shadows by @mvaligursky in https://github.com/playcanvas/engine/pull/7586
* WGSL support for batching by @mvaligursky in https://github.com/playcanvas/engine/pull/7590
* WGSL clustered cookies by @mvaligursky in https://github.com/playcanvas/engine/pull/7591
* More gsplat inf checks by @slimbuck in https://github.com/playcanvas/engine/pull/7592
* WGSL support for picker pass by @mvaligursky in https://github.com/playcanvas/engine/pull/7594
* Improve Texture JSDocs (and some others) by @willeastcott in https://github.com/playcanvas/engine/pull/7595
* Adds Script `scriptName` field by @marklundin in https://github.com/playcanvas/engine/pull/7593
* Histogram sort for uncompressed gsplat by @slimbuck in https://github.com/playcanvas/engine/pull/7596
* WGSL implementation of VSM shadows by @mvaligursky in https://github.com/playcanvas/engine/pull/7599
* Removed unused `fullscreenQuadPS` chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7600
* Revert recent types by @slimbuck in https://github.com/playcanvas/engine/pull/7601
* WGSL implementation of soft shadows by @mvaligursky in https://github.com/playcanvas/engine/pull/7602
* The built-in instancing works with WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7603
* WGSL version of remaining reflection chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7606
* WGSL chunks for msdf and nine-sliced UI rendering by @mvaligursky in https://github.com/playcanvas/engine/pull/7608
* WGSL version of few internal chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7610
* IridescenceDiffraction chunk converted to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7611
* WGSL version of `screenDepth` chunk and debug texture shaders by @mvaligursky in https://github.com/playcanvas/engine/pull/7612
* WGSL version of `outputTex2DPS` chunk used by outline-renderer by @mvaligursky in https://github.com/playcanvas/engine/pull/7613
* Use arrow functions in all example code by @willeastcott in https://github.com/playcanvas/engine/pull/7615
* Improve JSDocs for `Geometry` classes by @willeastcott in https://github.com/playcanvas/engine/pull/7617
* More incremental improvements to JSDocs by @willeastcott in https://github.com/playcanvas/engine/pull/7619
* Improve `Gizmo` API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7620
* Improve `SoundSlot` API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7621
* Improve `ScreenComponent` API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7622
* `CoreExporter` image transformation uses WGSL shader on WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7623
* Applied fresnel-schlick Inf value fix to WGSL chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7624
* WGSL version of LTC shader chunk used to evaluate area lights by @mvaligursky in https://github.com/playcanvas/engine/pull/7625
* Lightmapping WGSL chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7627
* Update NPM dependencies by @willeastcott in https://github.com/playcanvas/engine/pull/7626
* Strip comments from the chunk before the validation by @mvaligursky in https://github.com/playcanvas/engine/pull/7629
* WGSL version of an internal `floatAsUintPS` shader chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7631
* Custom user chunks to customize lit / standard shaders by @mvaligursky in https://github.com/playcanvas/engine/pull/7632
* Add static `scriptName` property to multiple script classes by @marklundin in https://github.com/playcanvas/engine/pull/7633
* Update SWC options to target ES5 for UMD builds by @marklundin in https://github.com/playcanvas/engine/pull/7635
* Fixed typo in shader ifdef from yesterday by @mvaligursky in https://github.com/playcanvas/engine/pull/7637
* Add missing docs for `SoundSlot.EVENT_END` by @willeastcott in https://github.com/playcanvas/engine/pull/7634
* Adds missing license header back into builds by @marklundin in https://github.com/playcanvas/engine/pull/7646
* Particle system internal shaders use WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7647
* First few gsplat chunks converted to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7648
* Converted remaining Gsplat shader chunks to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7650
* Shader creation no longer supplies dummy shader in none is specified by @mvaligursky in https://github.com/playcanvas/engine/pull/7651
* Renamed internal class `ShaderUtils` to `ShaderDefinitionUtils` by @mvaligursky in https://github.com/playcanvas/engine/pull/7652
* Support for unfilterable texture in WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7655
* Renamed folder ‘chunks’ to ‘chunks-glsl’ by @mvaligursky in https://github.com/playcanvas/engine/pull/7660
* Sogs updates by @slimbuck in https://github.com/playcanvas/engine/pull/7662
* Wgsl GS chunk updates by @slimbuck in https://github.com/playcanvas/engine/pull/7664
* Sogs load tweaks by @slimbuck in https://github.com/playcanvas/engine/pull/7667
* docs: Document i18n's `change` event by @Christopher-Hayes in https://github.com/playcanvas/engine/pull/7661
* Rename Key and Node classes by @willeastcott in https://github.com/playcanvas/engine/pull/7653
* Speed up sogs centers calc by @slimbuck in https://github.com/playcanvas/engine/pull/7669
* Release script update by @kpal81xd in https://github.com/playcanvas/engine/pull/7663
* Strip comments from WGSL chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7671
* Refactor entity rotation script: renamed class from EntityRotator to … by @marklundin in https://github.com/playcanvas/engine/pull/7676
* Improved docs for the physical camera properties by @mvaligursky in https://github.com/playcanvas/engine/pull/7680
* Improved docs for `Material.setDefine` by @mvaligursky in https://github.com/playcanvas/engine/pull/7679
* SOGS chunks in WGSL format by @mvaligursky in https://github.com/playcanvas/engine/pull/7681
* Sogs SH fix by @slimbuck in https://github.com/playcanvas/engine/pull/7684
* Release script updates by @kpal81xd in https://github.com/playcanvas/engine/pull/7685
* Sogs load fix by @slimbuck in https://github.com/playcanvas/engine/pull/7687
* Render passes use WGSL chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7690
* Publish workflow repo restriction by @kpal81xd in https://github.com/playcanvas/engine/pull/7691
* Moved multiple examples from Graphics to Materials or Shaders folders by @mvaligursky in https://github.com/playcanvas/engine/pull/7692
* Quad vertex chunk cleanup by @mvaligursky in https://github.com/playcanvas/engine/pull/7693
* Using more recent addition to `createShader` API from chunks where possible by @mvaligursky in https://github.com/playcanvas/engine/pull/7694
* Reorganized folders for chunks and their collections by @mvaligursky in https://github.com/playcanvas/engine/pull/7695
* Gsplat fix by @slimbuck in https://github.com/playcanvas/engine/pull/7696
* Some tiny cleanup by @mvaligursky in https://github.com/playcanvas/engine/pull/7699
* Small tweaks to anisotropy examples by @mvaligursky in https://github.com/playcanvas/engine/pull/7700
* Build visualizer output fix by @kpal81xd in https://github.com/playcanvas/engine/pull/7701
* Break compose shader to chunks for easier customization + convert to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7702
* Better version of `nearestPowerOfTwo` function by @mvaligursky in https://github.com/playcanvas/engine/pull/7714
* Improved point rendering on WebGL2 by @mvaligursky in https://github.com/playcanvas/engine/pull/7706
* Use camera inertia for anisotropy examples to match other examples by @mvaligursky in https://github.com/playcanvas/engine/pull/7707
* Handling anisotropy material properties deprecation for the Editor / validations by @mvaligursky in https://github.com/playcanvas/engine/pull/7708
* Internal `MapUtils.merge` to merge maps by @mvaligursky in https://github.com/playcanvas/engine/pull/7709
* `WorldClusterDebug` compatibility with WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7710
* Support for treeflame (Flamegraph) build size visualisation by @mvaligursky in https://github.com/playcanvas/engine/pull/7711
* Small chunks cleanup related to opacity by @mvaligursky in https://github.com/playcanvas/engine/pull/7721
* Shader transpilers are optional now for WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7722
* Quat `fromArray` and `toArray` methods by @kpal81xd in https://github.com/playcanvas/engine/pull/7724
* Quat dot product and `lerp` by @kpal81xd in https://github.com/playcanvas/engine/pull/7725
* Removed optional precision specifier by @mvaligursky in https://github.com/playcanvas/engine/pull/7728
* Camera frame handles layer changes on the camera by @mvaligursky in https://github.com/playcanvas/engine/pull/7719
* Added color correction using LUT texture to CameraFrame postprocessing by @mvaligursky in https://github.com/playcanvas/engine/pull/7720
* Mesh-based Skydome can write depth during prepass, to be comparible with DOF by @mvaligursky in https://github.com/playcanvas/engine/pull/7729
* Bump tar-fs from 2.1.2 to 2.1.3 by @dependabot in https://github.com/playcanvas/engine/pull/7731
* Bump tar-fs from 3.0.6 to 3.0.9 in /examples by @dependabot in https://github.com/playcanvas/engine/pull/7732
* Optimize shader generation with many clustered lights by @mvaligursky in https://github.com/playcanvas/engine/pull/7735
* GSplat resource cleanup by @slimbuck in https://github.com/playcanvas/engine/pull/7734
* Hiding test only examples by @mvaligursky in https://github.com/playcanvas/engine/pull/7738
* Small update to `OutlineRenderer` to avoid runtime uniform warning by @mvaligursky in https://github.com/playcanvas/engine/pull/7740
* Moved `matrix_normal` uniform declaration to more appropriate chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7746
* Small changes to aid in headless WebGPU rendering by @slimbuck in https://github.com/playcanvas/engine/pull/7748
* Use GLSL transpilation to WGSL if only GLSL chunks were overriden by @mvaligursky in https://github.com/playcanvas/engine/pull/7751
* Basic parameters to create device & xr session compatible with WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7737
* WebGPU supports internal multi-view rendering used by WebXR by @mvaligursky in https://github.com/playcanvas/engine/pull/7747
* Update to gsplatting examples by @mvaligursky in https://github.com/playcanvas/engine/pull/7752
* Convert internal `configureMaterial` function to use options by @mvaligursky in https://github.com/playcanvas/engine/pull/7756
* Various small gsplat fixes by @slimbuck in https://github.com/playcanvas/engine/pull/7761
* Handle passing null entity to `OutlineRenderer` by @mvaligursky in https://github.com/playcanvas/engine/pull/7762
* Fix sogs reorder during device lost by @slimbuck in https://github.com/playcanvas/engine/pull/7763
* Clone gsplat material by @slimbuck in https://github.com/playcanvas/engine/pull/7764
* Small jsdocs update regarding wasm transpilation requirements by @mvaligursky in https://github.com/playcanvas/engine/pull/7767

## Examples
* Example to demonstrate standard material chunk overrides by @mvaligursky in https://github.com/playcanvas/engine/pull/7638
* Converted example shader from ColorGrabPass to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7682
* Converted TextureArray and ShaderToon example to use WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7683
* Convert GLSL shaders in multiple examples to WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7686
* Improve positional audio example by @LeXXik in https://github.com/playcanvas/engine/pull/7739
* Example - demonstrate how to regenerate skydome textures from HDRI when device was lost by @mvaligursky in https://github.com/playcanvas/engine/pull/7759

## Fixes
* [Fix] Fix to asset class refactor by @mvaligursky in https://github.com/playcanvas/engine/pull/7577
* Minor fixes to various `toArray` function docs by @willeastcott in https://github.com/playcanvas/engine/pull/7578
* Fix texture type type by @slimbuck in https://github.com/playcanvas/engine/pull/7579
* Gsplat rotation fix by @slimbuck in https://github.com/playcanvas/engine/pull/7587
* [Fix] Fix shader passes order by @mvaligursky in https://github.com/playcanvas/engine/pull/7598
* [FIX] Restore callback descriptions by @willeastcott in https://github.com/playcanvas/engine/pull/7607
* Gsplat render fix for wgpu by @slimbuck in https://github.com/playcanvas/engine/pull/7609
* Fix bloom artifacts appearing due to bad specular data by @Christopher-Hayes in https://github.com/playcanvas/engine/pull/7605
* Misc types fixes by @willeastcott in https://github.com/playcanvas/engine/pull/7618
* [Fix] More flexible Preprocessor handling of include directive by @mvaligursky in https://github.com/playcanvas/engine/pull/7628
* [Fix] Fixes tags for assets by @mvaligursky in https://github.com/playcanvas/engine/pull/7636
* [Fix] UV-coordinates debug rendering fix by @mvaligursky in https://github.com/playcanvas/engine/pull/7642
* [Fix] Fix uniform access in a new WGSL shader chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7670
* [Fix] FIx to regex collecting global (bindable) resources from WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7672
* [Fix] Fixed particles update speed on high refresh screens by @mvaligursky in https://github.com/playcanvas/engine/pull/7675
* Fix SOGS rendering scenes with SH 1 or 2 by @vincentwoo in https://github.com/playcanvas/engine/pull/7703
* [Fix] Remove Nans from scene texture when downscaling for bloom / dof to avoid artifacts by @mvaligursky in https://github.com/playcanvas/engine/pull/7717
* [Fix] DepthBias is only supported for triangles on WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7715
* Added missing import statement in the Rotator example. by @marklundin in https://github.com/playcanvas/engine/pull/7677
* Fix to dispersion related WGSL chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7712
* Fix: Dynamic batching now uses skinning normal for lighting by @mvaligursky in https://github.com/playcanvas/engine/pull/7713
* Fixed simTime check for ParticleSystem by @AlexAPPi in https://github.com/playcanvas/engine/pull/7742
* Fix to no shadows from clustered lights in a specific case by @mvaligursky in https://github.com/playcanvas/engine/pull/7745
* [Fix] Re-render all shadows when the device context is restored by @mvaligursky in https://github.com/playcanvas/engine/pull/7757
* [Fix] Re-render cookie atlas use by clustered lighting when the device context is restored by @mvaligursky in https://github.com/playcanvas/engine/pull/7758

## New Contributors
* @emadurandal made their first contribution in https://github.com/playcanvas/engine/pull/7668

**Full Changelog**: https://github.com/playcanvas/engine/compare/v2.7.7...v2.8.0