Closed bufffun closed 2 years ago
This lib already uses CustomShaderMaterial
under the hood. Using the lighting
option you effectively can specify the base materials.
as you can see LayerMaterial is built on top of CSM https://github.com/pmndrs/lamina/blob/696ccc1dd0fa53ae9bd90086b1da69233f254af8/src/vanilla.ts#L36
If you want to use CSM but not lamina, then yes you can grab the underlying shader code and run it within CSM but you’ll have to correctly port it. The convinces of lamina’s Abstract class will not apply when using CSM.
Hello, I just wonder can I just copy this repo's Fragment Layers shader code to extend the three.js standard materials by your previous repo THREE-CustomShaderMaterial ?
For example, copy the glsl from Fresnel shader code , then use CustomShaderMaterial