Skip to content

Use a proper equirectilinear milky way image in the web sky demo#9882

Merged
pixelflinger merged 2 commits into
google:mainfrom
Nemi26:main
Apr 13, 2026
Merged

Use a proper equirectilinear milky way image in the web sky demo#9882
pixelflinger merged 2 commits into
google:mainfrom
Nemi26:main

Conversation

@Nemi26
Copy link
Copy Markdown
Contributor

@Nemi26 Nemi26 commented Apr 5, 2026

The current one uses a hammer projection version of the milky way, while the shader samples it as an equirect. This leads to part of the sky being black where there is no milky way.

@Nemi26
Copy link
Copy Markdown
Contributor Author

Nemi26 commented Apr 6, 2026

Btw now that I'm here, I can't actually get the milky way to show up in the web sample anymore. I remember playing with it a few commits ago where it worked just fine.

There's this line mwIntensity * this.sunIntensity * 1.5e-8. The comment above says that sunIntensity is 100,000, but it's actually multiplied by the camera exposure so it's more in the 1 digit range.
Should the 1.5e-8 be changed to 1.5e-3 instead?

@romainguy
Copy link
Copy Markdown
Contributor

@Nemi26 Camera exposure is not necessarily in the 1 digit range. The default exposure is ~0.0001 if I remember correctly.

@romainguy
Copy link
Copy Markdown
Contributor

@pixelflinger

@Nemi26
Copy link
Copy Markdown
Contributor Author

Nemi26 commented Apr 8, 2026

@Nemi26 Camera exposure is not necessarily in the 1 digit range. The default exposure is ~0.0001 if I remember correctly.

I meant that after you multiply the exposure and the sun intensity together, you get a number around the 1 digit range (at least in the sample as it is now). Then that number is multiplied by the milkyway intensity (0-100) and then scaled by 1.5e-8, which is way too small for anything to become visible. this.sunIntensity is not the actual sun intensity here, it's pre-exposed.

@pixelflinger pixelflinger self-requested a review April 13, 2026 17:44
@pixelflinger
Copy link
Copy Markdown
Collaborator

Btw now that I'm here, I can't actually get the milky way to show up in the web sample anymore. I remember playing with it a few commits ago where it worked just fine.

There's this line mwIntensity * this.sunIntensity * 1.5e-8. The comment above says that sunIntensity is 100,000, but it's actually multiplied by the camera exposure so it's more in the 1 digit range. Should the 1.5e-8 be changed to 1.5e-3 instead?

Let's discuss this in a separate issue. Thanks!

@pixelflinger pixelflinger added the internal Issue/PR does not affect clients label Apr 13, 2026
@pixelflinger pixelflinger merged commit defba15 into google:main Apr 13, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Issue/PR does not affect clients

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants