+2 votes

I'm using a ViewportTexture to render a UI scene to a Mesh's texture. This works fine, however, the colors on the Mesh look washed out, while everything looks as expected in the UI scene. Doing some searches, I've tried changing SRGB/Linear settings and HDR on both the Viewport and the ViewportTexture, but nothing has worked. I've encountered this problem with a few other Godot Nodes, particularly Sprite3D, but I've never managed to solve it.

If it's relevant, the material on the Mesh is using a local ViewportTexture for its albedo texture.

Godot version 3.2.3
in Engine by (17 points)

1 Answer

+1 vote
Best answer

From https://docs.godotengine.org/pt_BR/latest/tutorials/misc/gles2_gles3_differences.html

In GLES2, SCREEN_TEXTURE (accessed via a ShaderMaterial) does not have
computed mip-maps. So when accessing at a different LOD, the texture
will not appear blurry.

If renderer is GLES2 try GLES3

You may want to study https://godotengine.org/asset-library/asset/127

by (886 points)
selected by

I am using GLES3, but from the example project linked, I was able to find out that my problem was that I didn't have albedo_tex_force_srgb enabled in the flags for the SpatialMaterial my mesh was using. Enabling this flag fixed the issue.

Thank you!

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.