Archive 17/01/2023.

Water material automatically assign diffuse map

ucupumar

From Water.xml material, I found this:

[code]

[/code]

After trying to use the material, it looks like diffuse map only assigned if there is object using skybox material in scene.
And after investigated some more, assigned diffuse map is actually just viewport texture.
Is this supposed behavior?
Why not use already assigned viewport texture? Refract pass always use viewport texture as environment map anyway.

cadaver

To work properly, a reflection texture needs to use a different camera for rendering, so it’s not the same as the viewport texture. The reflection texture is created by the application, the engine cannot know about it automatically.

ucupumar

Ohh, my bad. I don’t know if there’s sample project for water setup already.
So, I need to setup reflection camera first, then use render texture result from that camera to water diffuse map.
Before looking the sample, I thought that diffuse map probably is used to something kind of screen space reflection technique. :unamused:
Thanks for the answer anyway. :slight_smile:

cadaver

Reflective water is example number 23.

ucupumar

Thanks, already checked on it. :slight_smile: