Skip to content

fix: avoid camera_params redefinition in pickPS#8640

Merged
mvaligursky merged 1 commit into
playcanvas:mainfrom
gameatp:fix/camera_params-redefinition-pickPS
Apr 23, 2026
Merged

fix: avoid camera_params redefinition in pickPS#8640
mvaligursky merged 1 commit into
playcanvas:mainfrom
gameatp:fix/camera_params-redefinition-pickPS

Conversation

@gameatp

@gameatp gameatp commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a CAMERAPLANES include guard around the camera_params uniform in pickPS.glsl, preventing duplicate definition errors when multiple shader chunks that declare camera_params are included together.

The pattern matches the existing guard used in other engine shaders (e.g. depthPS.glsl).

Checklist

  • I have read the contributing guidelines
  • My code follows the project's coding standards
  • This PR focuses on a single change

@mvaligursky mvaligursky added the area: graphics Graphics related issue label Apr 23, 2026

@mvaligursky mvaligursky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks!

@mvaligursky mvaligursky merged commit 7375b59 into playcanvas:main Apr 23, 2026
0 of 2 checks passed
mvaligursky added a commit that referenced this pull request Apr 23, 2026
Adds a CAMERAPLANES include guard around the camera_params uniform in
the WGSL pickPS chunk, mirroring the fix applied to the GLSL version
in #8640. Prevents duplicate definition errors when combined with other
chunks that declare camera_params (e.g. linearizeDepth, screenDepth).

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
@gameatp gameatp deleted the fix/camera_params-redefinition-pickPS branch May 18, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants