Changing the visible material for each camera

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By huny

A scene has one object and two cameras.
When the object is viewed by the first camera, it is displayed with a red material, but by the second camera, it is displayed with a blue material.

In my previous used of Three.js, there was a MaterialOverride parameter for each renderer that allowed me to temporarily switch the material of all objects.
Is it possible to do something similar?

What we would like to do in the end is to render the normal data of the map in the first rendering and determine the edges from the normal data in the second rendering.
To do this, I would like to display different materials for the two cameras.

Is it correct that it is impossible?

huny | 2022-04-15 15:31