Skip to content

Conversation

@slimbuck
Copy link
Member

Description

The table introduced in #8030 results in performance regression so use exp instead.

This PR reverts the calc to using build-in exp.

@slimbuck slimbuck requested review from a team and Copilot October 10, 2025 12:52
@slimbuck slimbuck self-assigned this Oct 10, 2025
@slimbuck slimbuck added bug Something isn't working area: graphics Graphics related issue labels Oct 10, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts a performance optimization that used a lookup table for exponential calculations in Gaussian splat rendering back to using built-in exponential functions. The change addresses a performance regression introduced in PR #8030.

  • Replaced texture-based exponential lookup table with direct exponential calculations
  • Added normExp function to both WGSL and GLSL shader chunks for normalized exponential computation
  • Removed exponential table texture creation and management code from the renderer

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/scene/shader-lib/wgsl/chunks/gsplat/frag/gsplat.js Replaced texture lookup with normExp function for alpha calculation
src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplat.js Added normExp function and replaced texture lookup with direct calculation
src/scene/renderer/renderer.js Removed exponential table texture creation, management, and cleanup code

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@slimbuck slimbuck merged commit ea32f5a into playcanvas:main Oct 10, 2025
6 of 7 checks passed
@slimbuck slimbuck deleted the exp-fix branch October 10, 2025 13:04
slimbuck added a commit that referenced this pull request Oct 10, 2025
@Maksims
Copy link
Collaborator

Maksims commented Oct 11, 2025

Please add to names of PR's a bit more context. "Perf regression" of what?
There is a lot of GS's PR's, would be good to name them with "GS", so it is not confused with other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants