Skip to content

Conversation

@kircher1
Copy link
Contributor

Introduces small set of wgsl shader functions and refactors existing glsl to ensure atmosphere shaders work in WebGPU.

Fixes an issue in the ShaderMaterialPlugin where the shader language was always forced to glsl.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

Snapshot stored with reference name:
refs/pull/17560/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17560/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17560/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/17560/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17560/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17560/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17560/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/17560/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 16, 2025

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

var<uniform> peakRayleighScattering : vec3<f32>;
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove this file, because it's used when ubos are not supported by the platform, but WebGPU always supports ubos.

@georginahalpern
Copy link
Contributor

hmm looks like several of the visualization tests are failing with this being the side by side
image

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 22, 2025

@bjsplat
Copy link
Collaborator

bjsplat commented Dec 22, 2025

1 similar comment
@bjsplat
Copy link
Collaborator

bjsplat commented Dec 23, 2025

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.

5 participants