POINT_SIZE
does not work in canvas item shader (Godot 3 to 4 regression)
#80291
Labels
Milestone
POINT_SIZE
does not work in canvas item shader (Godot 3 to 4 regression)
#80291
Godot version
v4.1.1.stable.official [bd6af8e]
System information
Godot v4.1.1.stable - Ubuntu 22.04.2 LTS 22.04 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 980 (nvidia; 535.54.03) - Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz (4 Threads)
Issue description
I'm trying to migrate a project from Godot 3 to 4, but I'm running into an apparent showstopper: The project relies on some fancy 2d shaders based on
PRIMITIVE_POINTS
meshes in combination with adjusting thePOINT_SIZE
in the vertex shader (amongst other things, see the nice Antialiased 2D Grid, Marker, and Arrow Shaders paper for motivation).This used to work well under Godot 3, but unfortunately it looks like it is no longer possible in Godot 4. The approach relies on being able to set the
POINT_SIZE
in the vertex shader. Reduced to its minimal form:Using this minimal bootstrap code:
the output in Godot 4 is:
Notice that the three points are just single pixels.
Doing the same in Godot 3 (of course replacing
PackedVector2Array
byPoolVector2Array
) has the expected outcome, i.e., settingPOINT_SIZE
is not ignored:Steps to reproduce
Basically as already described above.
Minimal reproduction project
ShaderPointSize.zip
Or on GitHub:
The text was updated successfully, but these errors were encountered: