Skip to content

Conversation

@cptbtptpbcptdtptp
Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp commented Sep 16, 2025

galacean/engine#2807
1.6 这个 PR 更新了 common.glsl ,导致 camera_ProjectionParams 声明多次

Summary by CodeRabbit

  • Refactor
    • Updated grid rendering shader internals to streamline parameters and improve consistency.
    • No user-facing behavior changes are expected; grid visuals and performance should remain the same.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Removed the uniform declaration camera_ProjectionParams from the grid vertex shader in GridMaterial.ts, while the shader code still references camera_ProjectionParams.x. No other files or logic were changed.

Changes

Cohort / File(s) Summary of Changes
Grid shader uniform removal
packages/custom-material/src/grid/GridMaterial.ts
Deleted vertex-shader uniform declaration uniform vec4 camera_ProjectionParams; while retaining references to camera_ProjectionParams.x in the shader code.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A nibble of code, a uniform gone,
I twitch my whiskers, hop along.
Shader stars blink—“where’s x?” they plea—
I thump: “Re-add or set it free!”
Under moonlit diffs I lightly tread,
Fix the link, then off to bed. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Fix grid material error" succinctly and accurately reflects the primary intent of the changeset, which addresses a shader-related bug in packages/custom-material/src/grid/GridMaterial.ts (the removed uniform leads to a compilation/runtime error). It is short, focused on the main problem, and clearly signals a bug fix to reviewers. The phrasing is specific enough for a teammate scanning history to understand the PR's purpose without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 571ac66 and a161691.

📒 Files selected for processing (1)
  • packages/custom-material/src/grid/GridMaterial.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • packages/custom-material/src/grid/GridMaterial.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cptbtptpbcptdtptp cptbtptpbcptdtptp self-assigned this Sep 16, 2025
@cptbtptpbcptdtptp cptbtptpbcptdtptp added the bug Something isn't working label Sep 16, 2025
@cptbtptpbcptdtptp cptbtptpbcptdtptp merged commit 108bfd1 into galacean:main Sep 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant