threejs-materials
>-
>-
ALWAYS use this skill when the user mentions:
envMapalphaTest, depthWrite, blending modes, side/double-sided renderingShaderMaterial / RawShaderMaterial uniforms, includes, and compatibility with lights pipelineIMPORTANT: classic materials vs node-tsl
| Need | Skill |
|------|--------|
| Standard PBR with maps, physical clearcoat/sheen | threejs-materials |
| TSL nodes, NodeMaterial, WebGPU-first shading, compute-style graph | threejs-node-tsl |
| Migrating ShaderMaterial → TSL | threejs-node-tsl (conceptual), keep ShaderMaterial here until cutover |
Trigger phrases include:
MeshBasic (unlit), Lambert/Phong (legacy lit), Standard/Physical (PBR).envMap from cube or equirect; align metalness/roughness; consider MeshPhysicalMaterial for transmission/IOR when needed.alphaTest/depthWrite trade-offs; mention sorting limitations.lights: true flag behavior per version docs.skinning/morphTargets where applicable—mesh side in threejs-objects.See examples/workflow-pbr-transparent.md.
| Docs section | Representative links | |--------------|----------------------| | Materials (core) | https://threejs.org/docs/Material.html | | PBR | https://threejs.org/docs/MeshStandardMaterial.html | | Physical | https://threejs.org/docs/MeshPhysicalMaterial.html | | Custom GLSL | https://threejs.org/docs/ShaderMaterial.html |
*NodeMaterial).normalMapType or tangent space breaks lighting; verify geometry has tangents or use appropriate mode.MeshPhysicalMaterial transmission needs thickness and good env—combine with threejs-textures / PMREM.PBR and ShaderMaterial behavior track the Materials section in three.js docs. Color management and default envMap handling changed in modern releases—always pair material answers with renderer/output settings from threejs-renderers when colors look wrong.
When answering under this skill, prefer responses that:
MeshStandardMaterial, MeshPhysicalMaterial, or ShaderMaterial pages as appropriate.colorSpace expectations with threejs-textures.depthWrite trade-offs for sorted rendering.*NodeMaterial types belong to the node skill, not this one.English: meshstandardmaterial, meshphysicalmaterial, shadermaterial, pbr, transparency, envmap, materials, three.js
中文: 材质、PBR、MeshStandardMaterial、物理材质、透明、环境贴图、ShaderMaterial、three.js
确保开发环境已安装必要的依赖和工具。
根据项目需求进行基础配置。
按照示例代码实现核心功能。
运行测试确保功能正常。
完成开发后进行部署和监控。