Skip to content

Commit

Permalink
convert incidentRadiance to irradiance
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubidumdu committed May 16, 2024
1 parent dc3e63f commit 2342581
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/pbr/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ const init = async () => {
const [root, ...restMeshes] = await importMeshes(modelPath);
const customMaterial = makeShaderMaterial();

envTexture.sphericalPolynomial?.preScaledHarmonics.convertIncidentRadianceToIrradiance();

customMaterial.setArray3(
'sphericalHarmonics',
[
Expand Down

0 comments on commit 2342581

Please sign in to comment.