Reflective shadow maps

I’m playing with some features that I’ve missed out on because I haven’t worked with three much lately. I wanted to use MRT and revisit an old paper that I never got around to implementing properly. I don’t think I’ve quite done it yet, but I got pretty far.

Demo.

It won’t work without this, but i just added that one line in the same file and the MRT shared the buffer.

Github

Any ideas on sampling this are welcome, or any other insight.

3 Likes

This is really nice! This could be really cool in it’s own class as a clone or extension of shadows, including all of its methods and flags eg…

light.castReflections = true
light.reflectionMapSize.set()
light.reflectionCam...

mesh.castReflection
mesh.recieveReflection

renderer.castReflection = true

// etc etc etc... 

This of course would take a huge overhaul of core three.js & respective jsm / addons modules but would allow complete independence between shadowMap and reflectionMap. This is awesome nonetheless!

1 Like