Closed Ben-Mack closed 3 months ago
I can make it so an object can't receive AO but can cast it - I can't, however, stop an object from casting AO (without dramatically hurting performance) - so what you could do here is have the torus not receive AO - but I can't help you w/ the floor - as if you want it to receive AO from the torus it can also receive AO from the walls. Your best bet would be making the walls transparent w/out depthwrite so they don't cast AO. Anything that touches the depth buffer, however, casts AO.
Next release of N8AO will have a way to disable AO receiving.
This has been added in release 1.8.4:
You can also simply have an object not receive AO at all (this requires rendering it twice, so it is not recommended for performance-critical applications) by setting cannotReceiveAO to true in the object's userData:
mesh.userData.cannotReceiveAO = false;
Wow! Did not expect you would add it this quick. And thank you for these suggestions, it really helps a lot!
Thank you for creating this powerful lib!
For example in your official example, I want to enable AO for the torus only, not the building, but torus should be able to cast AO to the building, not just on itself. (It is like the building only receive AO, but not casting)
Please give me some guidance if you have any idea, I'd much appreciate your response!