Skip to content

Examples: Improve water demo. #31291

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

Merged
merged 1 commit into from
Jun 20, 2025
Merged

Examples: Improve water demo. #31291

merged 1 commit into from
Jun 20, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 20, 2025

Related issue: -

Description

The Water2 demos always looked a bit boring so webgpu_water has been updated with a new asset and a basic bloom post processing setup. The old WebGLRenderer demos are removed with this PR.

@Mugen87 Mugen87 added this to the r178 milestone Jun 20, 2025
@Mugen87 Mugen87 merged commit eabdf24 into mrdoob:dev Jun 20, 2025
11 checks passed
@mrdoob
Copy link
Owner

mrdoob commented Jun 30, 2025

Is there any way to make the water reflection contribute to the emissive pass?
It's weird that the screen blooms but its reflection doesn't.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Jul 2, 2025

This is tricky. reflector() and viewportSharedTexture() would have to extract the emissive portion which is done differently. reflector() must render its view via MRT and the provide the emissive data for Water2Mesh and viewportSharedTexture() must extract the emissive from the default framebuffer. Only then Water2Mesh can extract the emissive and write it as a result in its shader. That would introduce a noticeable complexity. AFAIC, even Sketchfab does not support this use case. One workaround is to not rely on emissive but apply bloom on the entire luminosity of the scene however that will noticeably brighten the scene in unexpected ways.

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.

2 participants