You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unlike Godot 3, Godot 4 clamps alpha values before blending. I'm not sure where in the rendering pipeline this happens, or if it's even controllable, but it makes it impossible to do certain types of blending trickery that are common in 2d games. For example, in Godot 3, you can render 50% gray with 200% alpha over anything to invert its colors. In Godot 4, this is impossible; 200% alpha acts like 100% alpha.
For context on where I ran into this: I'm making a voxel level editing tool, and when configuring some kinds of materials, I have to display a grid over them. In Godot 3 I was rendering that grid with this technique, but it no longer works properly.
Inversion works in 3D:
Alpha blending happens before anything is written to the underlying buffer, and this technique is used by a fair number of old games without HDR, so at the very least, having LDR buffers wouldn't prevent this from being fixed. This is a good pointer in the right direction, though.
Godot version
4.0.3
System information
Windows 10, amd rx 480 gpu
Issue description
Unlike Godot 3, Godot 4 clamps alpha values before blending. I'm not sure where in the rendering pipeline this happens, or if it's even controllable, but it makes it impossible to do certain types of blending trickery that are common in 2d games. For example, in Godot 3, you can render 50% gray with 200% alpha over anything to invert its colors. In Godot 4, this is impossible; 200% alpha acts like 100% alpha.
Godot 3:
Godot 4:
Steps to reproduce
Add a ColorRect with the following shader:
Minimal reproduction project
ClampedAlphaRepro.zip
The text was updated successfully, but these errors were encountered: