0 votes

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.
https://github.com/meowyih/CubeViewTexture/blob/main/bad.png

Here is the screenshot if I use image texture
https://github.com/meowyih/CubeViewTexture/blob/main/good.png

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 README.md.

https://github.com/meowyih/CubeViewTexture

Is it a bug?

Godot version v3.3 stable-official_win64
in Engine by (12 points)

1 Answer

0 votes

ViewportTextures cannot be set to be repeating, so you have to emulate repetition using a custom shader instead. See https://github.com/godotengine/godot/issues/36820 for details.

by (11,347 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.