Strange behavior when I apply the viewport texture on all faces of CubeMesh

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

According to the docs, I set UV1 to (3,2,1) for CubeMesh node and tried to apply the same texture on all 6 faces. It has no problem if I use image texture, but if I use Viewport texture, the behavior is strange.

Here is the screenshot when I use viewport texture. The viewport contains a ColorRect and painting with a single line canvas shader code.

Here is the screenshot if I use image texture

Since I only change the texture, I expects to see the similar result (same texture on all faces). But it is not the case.

Here is a simple Godot project shows how to reproduce the problem. I also wrote some detail steps for how to reproduce it in

Is it a bug?

:bust_in_silhouette: Reply From: Calinou

ViewportTextures cannot be set to be repeating, so you have to emulate repetition using a custom shader instead. See ViewportTexture repeat flag has no effect · Issue #36820 · godotengine/godot · GitHub for details.