I'm currently working on an HTML project that involves integrating ThreeJs. I have successfully created 4 spheres, with one emitting light and the other three forming a wall. However, I am facing an issue where the spheres behind the wall are still reflecting light. Can anyone suggest a solution to prevent this reflection?
So far, I have experimented with changing the materials of the spheres behind the wall to Lambert and Phong, as well as setting castShadow to true and recieveShadow to false.
(function onLoad() {
// code for initializing camera, scene, lights, and geometries
})();
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/103/three.min.js"></script>
<script src="https://threejs.org/examples/js/controls/OrbitControls.js"></script>
I am looking for a solution where the spheres behind the wall do not reflect any light when they are out of sight, but only show reflections when they are in front of the wall.