First of all: I'm new to shaders, but not new to coding.
I'm porting a "portal effect" prototype, and I'm having different results (in light) in Godot 3.5.1 and Godot 4.0 beta 15.
This portal works like a mirror but using a camera in another place.
This difference is breaking the illusion of "naturally teleport by just walking through a door" and is more like "touch the mirror and get teleported immediately" :S
This is the shader (took it from a youtube video, sorry can't remember the source)
render_mode unshaded;
uniform sampler2D refl_tx;
void fragment() {
ALBEDO = texture(refl_tx, vec2(SCREEN_UV.x, SCREEN_UV.y)).rgb;
}
I use it as the Material Override in a MeshInstance (PlaneMesh), and for the refl_tx
variable I set a SubViewport which has a camera child which has no Environment set.
Render from Godot 3.5.1
Render from Godot 4.0 beta 15
So, is it a bug in new Godot 4.0? If not, how can I solve it?
Thanks!