How to use properly render_mode unshaded

Godot Version

4.2.2.stable

Question

The overall goal is to recreate a Portal effect.

I’m trying to copy part of the texture from a non-current camera (up-left corner in the example) to a Sprite3D (the portal), and I want it exactly unchanged. render_mode “unshaded” looked perfect for that, however, in the final result the image looks brighter than the original texture.


Why is that (unshaded looks affected by some sort of light ?), and how can I solve that ?

My scene contain DirectionalLight3Ds and an OmniLight3D, and here is my simple shader for the portal sprite:

I would try removing alpha =1; line. If that is written to the transparency pipeline is used.

The solution I found, based on unshaded mesh is brighter than albedo set in fragment shader with vulkan renderer · Issue #70797 · godotengine/godot · GitHub :
Add the hint “source_color” to the sampler2D:
“uniform sampler2D camera: source_color;”

1 Like

Didnt changed the color problem but very useful to know :pray:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.