-
-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
I think these can be removed now?
three-gpu-pathtracer/README.md
Lines 808 to 816 in 0b9ffc9
| ### .threeCompatibilityTransforms | |
| ```js | |
| threeCompatibilityTransforms = false : Boolean | |
| ``` | |
| Three.js materials support only a single set of UV transforms in a certain fallback priority while the pathtracer supports a unique set of transforms per texture. Set this field to true in order to use the same uv transform handling as three.js materials. | |
| See fallback order documentation [here](https://threejs.org/docs/#api/en/textures/Texture.offset). |
three-gpu-pathtracer/src/uniforms/MaterialsTexture.js
Lines 120 to 160 in 0b9ffc9
| function getUVTransformTexture( material ) { | |
| // https://github.com/mrdoob/three.js/blob/f3a832e637c98a404c64dae8174625958455e038/src/renderers/webgl/WebGLMaterials.js#L204-L306 | |
| // https://threejs.org/docs/#api/en/textures/Texture.offset | |
| // fallback order of textures to use as a common uv transform | |
| return material.map || | |
| material.specularMap || | |
| material.displacementMap || | |
| material.normalMap || | |
| material.bumpMap || | |
| material.roughnessMap || | |
| material.metalnessMap || | |
| material.alphaMap || | |
| material.emissiveMap || | |
| material.clearcoatMap || | |
| material.clearcoatNormalMap || | |
| material.clearcoatRoughnessMap || | |
| material.iridescenceMap || | |
| material.iridescenceThicknessMap || | |
| material.specularIntensityMap || | |
| material.specularColorMap || | |
| material.transmissionMap || | |
| material.thicknessMap || | |
| material.sheenColorMap || | |
| material.sheenRoughnessMap || | |
| null; | |
| } | |
| function writeTextureMatrixToArray( material, textureKey, array, offset ) { | |
| let texture; | |
| if ( threeCompatibilityTransforms ) { | |
| texture = getUVTransformTexture( material ); | |
| } else { | |
| texture = material[ textureKey ] && material[ textureKey ].isTexture ? material[ textureKey ] : null; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request