Larger Features
- Add support for
KHR_materials_sheen
by @GSterbrant in #4460 - Add support for
KHR_materials_volume
by @GSterbrant in #4485 - Add support for
KHR_materials_variants
by @GSterbrant in #4528 - Add support for
KHR_materials_emissive_strength
by @GSterbrant in #4535 - Add HQ reflections by @slimbuck in #4513
- Initial very basic implementation of WebGPU by @mvaligursky in #4534
- Clustered lighting is enabled by default and public by @mvaligursky in #4586
What's new
- Add Korean language README file by @kangjung in #4479
- Append action function by @jath-git in #4469
- Remove negative mouse action requirement by @jath-git in #4458
- Added validation for the chunks with changed APIs by @GSterbrant in #4496
- Provide default textures for the new material textures. by @GSterbrant in #4523
- Unified standard + basic shader intro code by @mvaligursky in #4565
- Print a warning when resource loader is not registered by @mvaligursky in #4574
- Asset viewer example by @GSterbrant in #4583
- Moved lightmapper only chunks to separate module to allow for their tree-shaking by @mvaligursky in #4588
Bug Fixes
- Glb-parser morph target fix by @ellthompson in #4474
- Add missing material parameters by @GSterbrant in #4478
- Reproject fix by @slimbuck in #4488
- Fix Specularity Factor tint with map by @GSterbrant in #4506
- Split the reflection and light sheen calculations by @GSterbrant in #4500
- Fix to recently introduced issue with Basic shader generator by @mvaligursky in #4507
- When material is not set on mesh instance, warn and use default one. by @mvaligursky in #4524
- Morph target animation fix by @ellthompson in #4532
- Apply polygon offset for shadows with WebGL1 by @GSterbrant in #4538
- Fix biasing issues with WGL1 by @GSterbrant in #4544
- Animation resource with events fix by @ellthompson in #4545
- AnimBinder path resolution update by @ellthompson in #4548
- Return null if no variants are present by @GSterbrant in #4549
- Example controls fix by @ellthompson in #4550
- Fix AudioContext not resuming properly. by @jpauloruschel in #4462
- AssetListLoader fix by @ellthompson in #4561
- Dynamic refractions multiply albedo twice by @GSterbrant in #4563
- Handle default material for createModel by @GSterbrant in #4566
- Add layer check between Camera and Element when testing for input. by @jpauloruschel in #4210
- Fix material thickness and texture transforms by @GSterbrant in #4578
- Export AppOptions by @slimbuck in #4581
- Fix UI Element input events on multiple touches. by @jpauloruschel in #4562
- Avoid using null Batcher by @mvaligursky in #4590
- Register shader generators at the point of use instead of always by @mvaligursky in #4587
- Fix grab pass with downscaled render target by @GSterbrant in #4591
New Contributors
- @jath-git made their first contribution in #4469
- @Mintytorus made their first contribution in #4481
- @kangjung made their first contribution in #4479
Full Changelog: v1.55.0...v1.56.0
Notes
To enable the new dynamic refractions, a few modifications are required on the application side, first, you need to add this:
const depthLayer = app.scene.layers.getLayerById(pc.LAYERID_DEPTH);
app.scene.layers.remove(depthLayer);
app.scene.layers.insertOpaque(depthLayer, 2);
What this does is to rearrange the layers such that the skydome will be part of the grab pass. Then we need to make the camera actually perform the grab pass:
const camera = new pc.Entity();
camera.addComponent("camera", {
clearColor: new pc.Color(0.4, 0.45, 0.5)
});
camera.setLocalPosition(0, 5, 30);
camera.camera.requestSceneColorMap(true);
The last thing to do is to make sure you create the graphics device with the alpha option set to true
// Create the app and start the update loop
const app = new pc.Application(canvas, {
graphicsDeviceOptions: {
alpha: true
},
mouse: new pc.Mouse(document.body),
keyboard: new pc.Keyboard(document.body),
touch: new pc.TouchDevice(document.body)
});