pmndrs / lamina

🍰 An extensible, layer based shader material for ThreeJS
MIT License
1.01k stars 41 forks source link

How can I apply different shading on LayerMaterial ? #7

Closed bufffun closed 2 years ago

FarazzShaikh commented 2 years ago

Please elaborate on what you mean by shading

bufffun commented 2 years ago

Excuse my wording, maybe Lighting is more appropriate, just like Spline, it is Lighting Layer like Phong, Physic, Toon...

FarazzShaikh commented 2 years ago

Lighting is quite complex, I’d like to add those layers in a future update

As it stands you can use other TheeeJS materials or my Custom Shader Material to get those shading effects.

bufffun commented 2 years ago

Thanks for your reply! Is there a way to mix those made layer or effect into ThreeJS materials, for example, MeshPhysicalMaterial + Fresnel Layer effect(in this repo). Anyway, looking forward to your future update, great Job!!!!

FarazzShaikh commented 2 years ago

Thanks!

You should in theory be able to just copy and paste the physical material shader code into your own custom layer, after making a few modifications based on the way Lamina expects custom layers to behave, it should work.

I’ll probably do the same thing when we do bring the shading layers to Lamina.