v2.7.0
playcanvas/enginev2.7.0Apr 16, 2025by mvaligursky
AI Summary
A major update focusing on WebGL2/WebGPU shader refactoring and Gsplat improvements.
Key Highlights
- Refactored StandardMaterial shader chunks
- Added WebGPU support for indexed rendering and WGSL
- Added Gsplat shadow casting support
- Removed WebGL1 support from clustered lighting
Breaking Changes
- Shader chunk format changes for StandardMaterial textures/uniforms (diffusePS, emissivePS, etc.)
- WebGL1 compatibility removed from clustered lighting
New Features
- WebGPU indexed rendering support
- Gsplat shadow casting support
- Simplified ShaderMaterial API for GLSL and WGSL
- AA (Anti-aliasing) rendering support
- Sogs support
Full Release Notes
## Breaking changes If you override shader chunks dealing with reading StandardMaterial textures / uniforms, for example `diffusePS`, `emissivePS`, `opacityPS` and similar, you need to update them to new format. For details see https://developer.playcanvas.com/user-manual/graphics/shader-chunk-migrations/#engine-v27 * [BREAKING] Refactor standard material chunks dealing with texture channels by @mvaligursky in https://github.com/playcanvas/engine/pull/7487 * [BREAKING][FIX] Specular and sheen texture correctly handle sRGB encoding by @mvaligursky in https://github.com/playcanvas/engine/pull/7572 ## Changes * WebGL shader error reporting marks the line containing the error by @mvaligursky in https://github.com/playcanvas/engine/pull/7457 * Shadow casting support for gsplat by @mvaligursky in https://github.com/playcanvas/engine/pull/7461 * Updated spine script to the latest release by @mvaligursky in https://github.com/playcanvas/engine/pull/7470 * Clustered lighting optimisations - removed WebGL1 compatibility solutions by @mvaligursky in https://github.com/playcanvas/engine/pull/7459 * Gsplat sorting update by @slimbuck in https://github.com/playcanvas/engine/pull/7472 * WebGPU support for indexed rendering using triangle or line strips by @mvaligursky in https://github.com/playcanvas/engine/pull/7478 * Instantiate GLB's with correct AppBase instance by @marklundin in https://github.com/playcanvas/engine/pull/7479 * Refactor GSplat handling to use AppBase instance by @marklundin in https://github.com/playcanvas/engine/pull/7482 * GSplat shaders can output depth during Depth Prepass by @mvaligursky in https://github.com/playcanvas/engine/pull/7483 * Set ‘data-engine’ parameter of the canvas to PlayCanvas by @mvaligursky in https://github.com/playcanvas/engine/pull/7489 * Refactor the way diffuse, opacity and parallax code is generated for Standard frontend by @mvaligursky in https://github.com/playcanvas/engine/pull/7508 * Refactored the normal maps code generation for Standard frontend by @mvaligursky in https://github.com/playcanvas/engine/pull/7509 * Refactored standard material refraction / transmission + example by @mvaligursky in https://github.com/playcanvas/engine/pull/7513 * Support sogs by @slimbuck in https://github.com/playcanvas/engine/pull/7510 * Refactor shader generator for Iridescence + bug fix by @mvaligursky in https://github.com/playcanvas/engine/pull/7515 * Refactored dealing with specular chunks / textures in standard shader generator by @mvaligursky in https://github.com/playcanvas/engine/pull/7519 * Refactor AO standard material shader generation by @mvaligursky in https://github.com/playcanvas/engine/pull/7521 * Refactor the use of emissive data during shader generation by @mvaligursky in https://github.com/playcanvas/engine/pull/7522 * Refactored clearCoat shader generation by @mvaligursky in https://github.com/playcanvas/engine/pull/7524 * Ply fetch by @slimbuck in https://github.com/playcanvas/engine/pull/7518 * Refactor lightmap part of shader generation by the standard materials by @mvaligursky in https://github.com/playcanvas/engine/pull/7527 * Final refactor of standard shader generator - shader code moved to chunks by @mvaligursky in https://github.com/playcanvas/engine/pull/7531 * Convert JS based particle shader generator to define based by @mvaligursky in https://github.com/playcanvas/engine/pull/7535 * Created a particle simulation shader chunk by @mvaligursky in https://github.com/playcanvas/engine/pull/7541 * Cookie texture blit shaders used by clustered lighting are in WGSL by @mvaligursky in https://github.com/playcanvas/engine/pull/7542 * Simplified the ShaderMaterial API to better support GLSL and WGSL shaders by @mvaligursky in https://github.com/playcanvas/engine/pull/7543 * Do not add textures to view level bind groups by @mvaligursky in https://github.com/playcanvas/engine/pull/7546 * WGSL versions of code vertex shader funcionality by @mvaligursky in https://github.com/playcanvas/engine/pull/7550 * WGSL shaders expose inputs as globals + fog fix by @mvaligursky in https://github.com/playcanvas/engine/pull/7554 * Only validate shader vertex attributes when vertex buffers are set by @mrxz in https://github.com/playcanvas/engine/pull/7561 * Rename TRACE_ID_ELEMENT to TRACEID_ELEMENT by @willeastcott in https://github.com/playcanvas/engine/pull/7569 * Add aa rendering support by @slimbuck in https://github.com/playcanvas/engine/pull/7567 * A way to force linear encoded spec textures by @mvaligursky in https://github.com/playcanvas/engine/pull/7574 * Partial WGSL support for LitMaterial by @mvaligursky in https://github.com/playcanvas/engine/pull/7575 ## Bug fixes * [Fix] Fix to StandardMaterial.useFog being ignored by @mvaligursky in https://github.com/playcanvas/engine/pull/7465 * [Fix] Clarified the docs for the sort order of drawBucket by @mvaligursky in https://github.com/playcanvas/engine/pull/7464 * GS culling fix by @slimbuck in https://github.com/playcanvas/engine/pull/7466 * [Fix] Fix the high quality morph option on WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7468 * [Fix] Fix soft shadows on iOS devices by @mvaligursky in https://github.com/playcanvas/engine/pull/7469 * [Fix] Fixed part of the image being upside down on WebGPU with DOF and TAA by @mvaligursky in https://github.com/playcanvas/engine/pull/7474 * Remove console log by @slimbuck in https://github.com/playcanvas/engine/pull/7475 * [Fix] Clear index buffer when the draw call is skipped by @mvaligursky in https://github.com/playcanvas/engine/pull/7476 * [Fix] Fixed hanling of texture.type by @mvaligursky in https://github.com/playcanvas/engine/pull/7488 * [Fix] Fixed issue where clustered light color is over half-float range by @mvaligursky in https://github.com/playcanvas/engine/pull/7486 * [Fix] Fixed manual loading of .hdr files using incorrect type / encoding by @mvaligursky in https://github.com/playcanvas/engine/pull/7507 * [Fix] Color and Depth Grab Pass would in some cases ignore being enabled by @mvaligursky in https://github.com/playcanvas/engine/pull/7512 * [Fix] Fixed to clear coat normal map being ignored by @mvaligursky in https://github.com/playcanvas/engine/pull/7523 * Fix for GS in XR by @slimbuck in https://github.com/playcanvas/engine/pull/7529 * [Fix] Update to disk/sphere area lights to avoid NaN values by @mvaligursky in https://github.com/playcanvas/engine/pull/7539 * WebGPU texture read fix by @slimbuck in https://github.com/playcanvas/engine/pull/7538 * [Fix] Fix CameraComponent.fog behavior by @mvaligursky in https://github.com/playcanvas/engine/pull/7540 * Fix to Nan handling in area lights for WebGPU by @mvaligursky in https://github.com/playcanvas/engine/pull/7544 * Fix: Updated picker ID decoding to handle sign bit by @mvaligursky in https://github.com/playcanvas/engine/pull/7545 * Fix assignment of clustered lighting cells by @mrxz in https://github.com/playcanvas/engine/pull/7558 * Small gsplat fix by @slimbuck in https://github.com/playcanvas/engine/pull/7566 ## Examples * Simple graphics tests for parallax and detail maps tests by @mvaligursky in https://github.com/playcanvas/engine/pull/7503 * Moved the contact hadening shadow example to tests / hidden from published builds by @mvaligursky in https://github.com/playcanvas/engine/pull/7511 * [ImgBot] Optimize images by @imgbot in https://github.com/playcanvas/engine/pull/7505 * Updated examples to reflect the API changes by @mvaligursky in https://github.com/playcanvas/engine/pull/7576 ## Docs * Update API reference manual to match published version by @willeastcott in https://github.com/playcanvas/engine/pull/7485 * Move CameraFrame to the Graphics category by @willeastcott in https://github.com/playcanvas/engine/pull/7490 * Restore missing StandardMaterial properties from API reference by @willeastcott in https://github.com/playcanvas/engine/pull/7491 * Restore @ignore tags for classes that should not be in the API reference by @willeastcott in https://github.com/playcanvas/engine/pull/7494 * API Reference improvements and fixes by @willeastcott in https://github.com/playcanvas/engine/pull/7499 * [FIX] [WebGL2] Use correct internal format for WebGL 565/5551/RGBA4 formats by @liamdon in https://github.com/playcanvas/engine/pull/7493 * Refactor MiniStats options types by @willeastcott in https://github.com/playcanvas/engine/pull/7500 * Tweak Script class API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7501 * Add API reference overview by @willeastcott in https://github.com/playcanvas/engine/pull/7502 * Hide RenderPassPicker and fix 2 link warnings by @willeastcott in https://github.com/playcanvas/engine/pull/7504 * Improve API docs for ModelComponent and RenderComponent by @willeastcott in https://github.com/playcanvas/engine/pull/7506 * Improve Euler-related docs by @willeastcott in https://github.com/playcanvas/engine/pull/7516 * Refactor Asset class by @willeastcott in https://github.com/playcanvas/engine/pull/7517 * Tweaks to Anim API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7520 * Assign some missing category JSDoc tags by @willeastcott in https://github.com/playcanvas/engine/pull/7528 * Improve JSDoc for Standard Material by @marklundin in https://github.com/playcanvas/engine/pull/7532 * Removed obsolete jsdocs part from Layer class by @mvaligursky in https://github.com/playcanvas/engine/pull/7547 * [FIX] Address Anim API related TypeDoc warnings by @willeastcott in https://github.com/playcanvas/engine/pull/7549 * [FIX] Address some TypeDoc warnings related to TextureParser by @willeastcott in https://github.com/playcanvas/engine/pull/7551 * Refactor CurveSet constructor by @willeastcott in https://github.com/playcanvas/engine/pull/7552 * Improve physics API docs by @willeastcott in https://github.com/playcanvas/engine/pull/7553 * Remove redundant @type tags from constants by @willeastcott in https://github.com/playcanvas/engine/pull/7557 * [FIX] 2 more TypeDoc warnings by @willeastcott in https://github.com/playcanvas/engine/pull/7559 * Deprecate all remaining global event constants by @willeastcott in https://github.com/playcanvas/engine/pull/7562 * Document gsplat asset type by @slimbuck in https://github.com/playcanvas/engine/pull/7571 * Improve typing for XrManager#session by @willeastcott in https://github.com/playcanvas/engine/pull/7573 * Use function overloads for better typing and docs by @willeastcott in https://github.com/playcanvas/engine/pull/7570 ## New Contributors * @mrxz made their first contribution in https://github.com/playcanvas/engine/pull/7558 **Full Changelog**: https://github.com/playcanvas/engine/compare/v2.6.2...v2.7.0