0beqz / realism-effects

SSGI, Motion Blur, TRAA - Effects to enhance your three.js scene's realism
https://realism-effects-obeqz.vercel.app/
MIT License
1.43k stars 67 forks source link

Support multiple materials per mesh #18

Closed benzsuankularb closed 1 year ago

benzsuankularb commented 1 year ago

While the GLTFLoader always guaranteed only single material per mesh.

Multiple materials per mesh are natively supported by three.js.

It'd be nice if we cloud add this support. :)

0beqz commented 1 year ago

I see, it's unfortunately not so easy to address as SSGI converts the three.js materials to its own format (called "MRTMaterial") to render out all the important data like diffuse, normals, emissive, alpha and so on. I'd have to check how three.js handles that and how multi-materials generally work as I don't use them often to find an idea on how to implement it in SSGI.

benzsuankularb commented 1 year ago

Since the realism effect itself doesn't require MeshStandardMaterial. I think this should be close seems it's a bit out of scope.