I would like to do exactly what’s done with the cube mesh in the ocean shader example. It refllects the light (of the sun) position, but also its colours.
As I see in the example (ocean shader), the cube is loaded and reflects the light of the sun, but it seems it does not come from the code shown in the example as it does that when I use it on my local installation :
That’s not what I aim to do but I studied a lot the code of this example and I now assume that there’s no answer to my question in it : I don’t find anything related to mirror effect, cube camera, material metalness, or anything that could give me a clue.
Although i did not manage to reflet sun color on a solid, I did manage to display it’s shinyness a “dynamic way”, as in the ocean shader example.
What do I need to learn ? Do I need to have a look at the RectangleLight example (that does what I want to do),
And a more simple question :
Why does this cube reflects the sun color and luminosity, and how does it works (Mirror effect ? Cube camera ? Opacity reflection effect ? EnvMap ?)? Is it related to this topic by any mean : SkyShader example, get light color
And last but not least :
Why should it work on github and not on my local installation ?
I’m trying to update / upgrade node dependencies, and not load anything that should be deprecated, that may change something… that would be quite logical, I’ll try to import dependencies directly from the three.js online repository. Edit : I’ll try to set up a new local installation as made in Looeee’s tutorial, that might help me.