-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: Migrate TSL functions from
three/webgpu
to three/tsl
mrdoob/three.js#29644 moves TSL functions into `three/tsl` The users have to modify the import map or bundler config because of this change See: #1548 (comment)
- Loading branch information
Showing
10 changed files
with
107 additions
and
88 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
15 changes: 8 additions & 7 deletions
15
packages/three-vrm-materials-mtoon/src/nodes/immutableNodes.ts
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import * as THREE from 'three/webgpu'; | ||
import { nodeImmutable } from 'three/tsl'; | ||
|
||
export const shadeColor = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ShadeColor'); | ||
export const shadingShift = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingShift'); | ||
export const shadingToony = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingToony'); | ||
export const rimLightingMix = THREE.nodeImmutable(THREE.PropertyNode, 'float').toVar('RimLightingMix'); | ||
export const rimMultiply = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('RimMultiply'); | ||
export const matcap = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('matcap'); | ||
export const parametricRim = THREE.nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ParametricRim'); | ||
export const shadeColor = nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ShadeColor'); | ||
export const shadingShift = nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingShift'); | ||
export const shadingToony = nodeImmutable(THREE.PropertyNode, 'float').toVar('ShadingToony'); | ||
export const rimLightingMix = nodeImmutable(THREE.PropertyNode, 'float').toVar('RimLightingMix'); | ||
export const rimMultiply = nodeImmutable(THREE.PropertyNode, 'vec3').toVar('RimMultiply'); | ||
export const matcap = nodeImmutable(THREE.PropertyNode, 'vec3').toVar('matcap'); | ||
export const parametricRim = nodeImmutable(THREE.PropertyNode, 'vec3').toVar('ParametricRim'); |
56 changes: 28 additions & 28 deletions
56
packages/three-vrm-materials-mtoon/src/nodes/materialReferences.ts
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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
import * as THREE from 'three/webgpu'; | ||
import { materialReference } from 'three/tsl'; | ||
|
||
export const refColor = THREE.materialReference('color', 'color'); | ||
export const refMap = THREE.materialReference('map', 'texture'); | ||
export const refNormalMap = THREE.materialReference('normalMap', 'texture'); | ||
export const refNormalScale = THREE.materialReference('normalScale', 'vec2'); | ||
export const refEmissive = THREE.materialReference('emissive', 'color'); | ||
export const refEmissiveIntensity = THREE.materialReference('emissiveIntensity', 'float'); | ||
export const refEmissiveMap = THREE.materialReference('emissiveMap', 'texture'); | ||
export const refColor = materialReference('color', 'color'); | ||
export const refMap = materialReference('map', 'texture'); | ||
export const refNormalMap = materialReference('normalMap', 'texture'); | ||
export const refNormalScale = materialReference('normalScale', 'vec2'); | ||
export const refEmissive = materialReference('emissive', 'color'); | ||
export const refEmissiveIntensity = materialReference('emissiveIntensity', 'float'); | ||
export const refEmissiveMap = materialReference('emissiveMap', 'texture'); | ||
|
||
export const refShadeColorFactor = THREE.materialReference('shadeColorFactor', 'color'); | ||
export const refShadingShiftFactor = THREE.materialReference('shadingShiftFactor', 'float'); | ||
export const refShadeMultiplyTexture = THREE.materialReference('shadeMultiplyTexture', 'texture'); | ||
export const refShadeMultiplyTextureScale = THREE.materialReference('shadeMultiplyTextureScale', 'float'); | ||
export const refShadingToonyFactor = THREE.materialReference('shadingToonyFactor', 'float'); | ||
export const refRimLightingMixFactor = THREE.materialReference('rimLightingMixFactor', 'float'); | ||
export const refRimMultiplyTexture = THREE.materialReference('rimMultiplyTexture', 'texture'); | ||
export const refMatcapFactor = THREE.materialReference('matcapFactor', 'color'); | ||
export const refMatcapTexture = THREE.materialReference('matcapTexture', 'texture'); | ||
export const refParametricRimColorFactor = THREE.materialReference('parametricRimColorFactor', 'color'); | ||
export const refParametricRimLiftFactor = THREE.materialReference('parametricRimLiftFactor', 'float'); | ||
export const refParametricRimFresnelPowerFactor = THREE.materialReference('parametricRimFresnelPowerFactor', 'float'); | ||
export const refOutlineWidthMultiplyTexture = THREE.materialReference('outlineWidthMultiplyTexture', 'texture'); | ||
export const refOutlineWidthFactor = THREE.materialReference('outlineWidthFactor', 'float'); | ||
export const refOutlineColorFactor = THREE.materialReference('outlineColorFactor', 'color'); | ||
export const refOutlineLightingMixFactor = THREE.materialReference('outlineLightingMixFactor', 'float'); | ||
export const refUVAnimationMaskTexture = THREE.materialReference('uvAnimationMaskTexture', 'texture'); | ||
export const refShadeColorFactor = materialReference('shadeColorFactor', 'color'); | ||
export const refShadingShiftFactor = materialReference('shadingShiftFactor', 'float'); | ||
export const refShadeMultiplyTexture = materialReference('shadeMultiplyTexture', 'texture'); | ||
export const refShadeMultiplyTextureScale = materialReference('shadeMultiplyTextureScale', 'float'); | ||
export const refShadingToonyFactor = materialReference('shadingToonyFactor', 'float'); | ||
export const refRimLightingMixFactor = materialReference('rimLightingMixFactor', 'float'); | ||
export const refRimMultiplyTexture = materialReference('rimMultiplyTexture', 'texture'); | ||
export const refMatcapFactor = materialReference('matcapFactor', 'color'); | ||
export const refMatcapTexture = materialReference('matcapTexture', 'texture'); | ||
export const refParametricRimColorFactor = materialReference('parametricRimColorFactor', 'color'); | ||
export const refParametricRimLiftFactor = materialReference('parametricRimLiftFactor', 'float'); | ||
export const refParametricRimFresnelPowerFactor = materialReference('parametricRimFresnelPowerFactor', 'float'); | ||
export const refOutlineWidthMultiplyTexture = materialReference('outlineWidthMultiplyTexture', 'texture'); | ||
export const refOutlineWidthFactor = materialReference('outlineWidthFactor', 'float'); | ||
export const refOutlineColorFactor = materialReference('outlineColorFactor', 'color'); | ||
export const refOutlineLightingMixFactor = materialReference('outlineLightingMixFactor', 'float'); | ||
export const refUVAnimationMaskTexture = materialReference('uvAnimationMaskTexture', 'texture'); | ||
|
||
export const refUVAnimationScrollXOffset = THREE.materialReference('uvAnimationScrollXOffset', 'float'); | ||
export const refUVAnimationScrollYOffset = THREE.materialReference('uvAnimationScrollYOffset', 'float'); | ||
export const refUVAnimationRotationPhase = THREE.materialReference('uvAnimationRotationPhase', 'float'); | ||
export const refUVAnimationScrollXOffset = materialReference('uvAnimationScrollXOffset', 'float'); | ||
export const refUVAnimationScrollYOffset = materialReference('uvAnimationScrollYOffset', 'float'); | ||
export const refUVAnimationRotationPhase = materialReference('uvAnimationRotationPhase', 'float'); |
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
Oops, something went wrong.