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

CSMShadowNode: Remove name collision. #29811

Merged
merged 1 commit into from
Nov 5, 2024
Merged

CSMShadowNode: Remove name collision. #29811

merged 1 commit into from
Nov 5, 2024

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 5, 2024

Fixed #29810.

Description

The PR fixes a naming collision which occurs in CSMShadowNode when using logarithmic depth buffer. The name cameraNear is a reserved uniform name in nodes/accessors/Camera.js.

I consider this PR as a quick fix. Ideally, the node system can detect such collisions and fix them automatically (e.g. by using a number suffix like cameraNear_1).

@Mugen87 Mugen87 added this to the r171 milestone Nov 5, 2024
@Mugen87 Mugen87 merged commit b54d466 into mrdoob:dev Nov 5, 2024
11 checks passed
@ligaofeng0901
Copy link
Contributor

ligaofeng0901 commented Nov 5, 2024

I consider this PR as a quick fix. Ideally, the node system can detect such collisions and fix them automatically (e.g. by using a number suffix like cameraNear_1).

I really hope this feature will be implemented.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 5, 2024

@ligaofeng0901 Do you mind opening a new issue for this specific feature request? Something like:

TSL: Avoid naming collision when using label() or toVar().

The example with cameraNear is a good use case.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 5, 2024

Never mind, I've already filed #29813.

@ligaofeng0901
Copy link
Contributor

Never mind, I've already filed #29813.

You're incredibly efficient, thank you!

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.

WebGPU: CSM shadow example is broken if logarithmicDepthBuffer enabled
2 participants