Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MikeMikeMike |
Hi…,
is there a way to have two panorama pictures in WorldEnvironment, one for the background, and one for reflections?
Thanks
Mike
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MikeMikeMike |
Hi…,
is there a way to have two panorama pictures in WorldEnvironment, one for the background, and one for reflections?
Thanks
Mike
Reply From: | MikeMikeMike |
Hi…,
this seams to work only from Godot 4.0 on with a Sky shader:
shader_type sky;
uniform sampler2D panorama_reflections : filter_linear, source_color, hint_default_black;
uniform sampler2D panorama_background : filter_linear, source_color, hint_default_black;
void sky() {
if (AT_CUBEMAP_PASS) {
// reflection
COLOR = texture(panorama_reflections, SKY_COORDS).rgb;
}
else {
// background
COLOR = texture(panorama_background, SKY_COORDS).rgb;
}
}
Thanks
Mike