-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebGPURenderer: Iridescence (#26489)
* LightingModel: New class struct * cleanup * cleanup * AONode: Fix float value * SpriteNodeMaterial: Force float type in rotation * PhysicalLightingModel: Add iridescence * Add webgpu_loader_gltf_iridescence example
- Loading branch information
Showing
12 changed files
with
355 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { tslFn, vec3 } from '../../shadernode/ShaderNode.js'; | ||
|
||
const Schlick_to_F0 = tslFn( ( { f, f90, dotVH } ) => { | ||
|
||
const x = dotVH.oneMinus().saturate(); | ||
const x2 = x.mul( x ); | ||
const x5 = x.mul( x2, x2 ).clamp( 0, .9999 ); | ||
|
||
return f.sub( vec3( f90 ).mul( x5 ) ).div( x5.oneMinus() ); | ||
|
||
} ); | ||
|
||
export default Schlick_to_F0; |
Oops, something went wrong.