EEVEE-Next: Fix Pointshader Requirements

The Metal and Vulkan backend checks if the vertex shader uses
`gl_PointSize` in order to set the correct parameters for point
rendering. The `eevee_deferred_tile_compact` shader uses point
rendering, but is only used as dummy geometry. The vertex
shader ignored the incoming input data, but didn't set the
`gl_PointSize` which generated incorrect shader pipelines.

It was detected on Vulkan, but Metal uses a similar workaround.

Pull Request: https://projects.blender.org/blender/blender/pulls/116463
This commit is contained in:
Jeroen Bakker 2023-12-22 11:48:47 +01:00
parent 248d7d8340
commit 45582662a1
1 changed files with 3 additions and 1 deletions

View File

@ -11,8 +11,10 @@
void main()
{
/* Doesn't matter. Doesn't get rasterized. */
/* Doesn't matter. Doesn't get rasterized.
* gl_PointSize set for Metal/Vulkan backend compatibility. */
gl_Position = vec4(0.0);
gl_PointSize = 0.0;
int tile_per_row = textureSize(tile_mask_tx, 0).x;
ivec2 tile_coord = ivec2(gl_VertexID % tile_per_row, gl_VertexID / tile_per_row);