Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.9.0 #95

Merged
merged 36 commits into from
Dec 16, 2024
Merged

v0.9.0 #95

merged 36 commits into from
Dec 16, 2024

Conversation

martinlaxenaire
Copy link
Owner

MAJOR UPDATE (includes a few breaking changes)

Summary of the new features and improvements:

RAYCASTER

  • Added a Raycaster extra class.
  • Removed deprecated Plane class mouseToPlaneCoords method.
  • Added test and example, fixed previous examples to use the Raycaster class over the mouseToPlaneCoords method.
  • Fixed ProjectedMeshBaseMixin bounding sphere wrong radius.
  • Added a clipSpaceBoundingRect to DOMFrustum class.
  • Fixed Geometry class getAttributeByName method.

RENDER BUNDLES

  • Added a BufferBindingOffsetChild class to create a buffer binding child using another buffer binding parent GPU buffer with an offset (allows to handle multiple transformations buffers into a single large buffer).
  • Added a RenderBundle class. This class can create a parent binding buffer, therefore introducing major performances optimizations (up to +150% CPU perf gain in some edge cases).
  • Updated the Scene and GPURenderer classes to handle the new RenderBundle class.
  • Fixed the Light classes not working when passing a GPUCurtains instance to the constructor.

IMPROVED RUNTIME RENDERER SWITCHING

  • added a setRenderer method for lights and shadows to allow to change renderer at runtime
  • added a setRenderer method to ComputePass as well.
  • added a new setRenderer method to the material classes (materials must have their renderer updated as well, especially RenderMaterial that use the GPUCameraRenderer camera bind groups!)
  • better renderer and renderer lights and shadows bindings management
  • fixed non working / buggy max light overflow on the GPUCameraRenderer
  • fixed PointShadow rendering bug where the GPUCameraRenderer light bind group was not always already created
  • fixed updating the projected meshes camera when setting a new renderer
  • added a useCamera method to the OrbitControls class to allow to change the current camera at runtime
  • updated shadows shaders to use if statements instead of select in order to potentially improve performance
  • improved WebGPU push / pop debug groups for a better debugging / error logs

BUFFER BINDING

  • handle parent binding in BufferBinding
  • refactored BufferBinding: changed bindings param to childrenBindings
  • fixed BufferBinding clone() method to handle childrenBindings and clone struct objects
  • BufferBinding now handle childrenBindings bufferElements when it has a parent

ENVIRONMENT MAP

  • New EnvironmentMap class that uses a HDRLoader to load .hdr files and generate LUT, diffuse and specular textures using compute shaders
  • Cleaned up HDRLoader class
  • Refactored IBL buildShaders helper to use an EnvironmentMap instance
  • Refactored ComputeMaterial, PipelineManager, PipelineEntry and ComputePipelineEntry to cache compute pipelines
  • Updated tests and examples accordingly

RENDERERS

  • Added a new context parameter to the GPURenderer and other renderers parameters, and removed deprecated alphaMode and preferredFormat parameters

VERSION

  • v0.9.0

martinlaxenaire and others added 30 commits November 15, 2024 12:12
- Removed deprecated `Plane` class `mouseToPlaneCoords` method.
- Added test and example, fixed previous examples to use the `Raycaster` class over the `mouseToPlaneCoords` method.
- Fixed `ProjectedMeshBaseMixin` bounding sphere wrong radius.
- Added a `clipSpaceBoundingRect` to `DOMFrustum` class.
- Fixed `Geometry` class `getAttributeByName` method.
- removed unnecessary `MeshBaseMixin` `super.render` call
- added a `setRenderer` method for lights and shadows to allow to change renderer at runtime
- better renderer and renderer binding lights and shadows management
- fixed non working / buggy max light overlflow on the `GPUCameraRenderer`
- fixed `PointShadow` rendering bug where the `GPUCameraRenderer` light bind group was not always already created
- fixed updating the projected meshes `camera` when setting a new renderer
- added a `useCamera` method to the `OrbitControls` class to allow to change the current camera at runtime
- added a test for all those cases
… must have their renderer updated as well, especially `RenderMaterial` that use the `GPUCameraRenderer` camera bind groups!)

- fixed lights and shadows various reseting issues
- added Suzanne glTF model as asset
…in order to potentially improve performance

- updated fullscreen plane example to use a basic `GPURenderer`
Improved renderer switching for materials, compute passes, lights and shadows
…ndings`

- fixed `BufferBinding` `clone()` method to handle `childrenBindings` and clone `struct` objects
- updated `GPUCameraRenderer` and shadow classes to reflect changes
- fixed `setRenderBundle()` method for projected mesh to better handle buffers
- better `GPUCameraRenderer` camera and lights bind group update and reset management
- better `GPUCameraRenderer` light overflowing that could potentially handle missing light binding if its max were set to 0
- `RenderMaterial` can now handle the case where the `GPUCameraRenderer` need to flush the pipeline
- moved `ProjectedMeshBaseMixin` receiving shadow fragment shader patch into `setShaders()`
- `BufferBinding` now handle `childrenBindings` `bufferElements` when it has a parent
… and generate LUT, diffuse and specular textures using compute shaders

- Cleaned up `HDRLoader` class
- Refactored IBL `buildShaders` helper to use `EnvironmentMap` instances
- Refactored `ComputeMaterial`, `PipelineManager`, `PipelineEntry` and `ComputePipelineEntry` to cache compute pipelines
- updated tests and examples accordingly
@martinlaxenaire martinlaxenaire merged commit c13e2d2 into main Dec 16, 2024
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