JKSunny / EternalJK

Effort to maintain and improve OpenJK
GNU General Public License v2.0
11 stars 1 forks source link

Vulkan: Shadow gridlines with external lightmap and higher >24(?) lightmapscale/q3map_lightmapSampleSize #13

Closed videoP closed 7 months ago

videoP commented 7 months ago

This has happened to me on several maps where I have used higher lightmap (worldspawn) and q3map_lightmapsamplesize (shader) values. It did not happen when using 8, it has happened when using 24. I'm still testing to find the exact cutoff and if this is the actual cause. The behavior does not happen on rd-default. MJT mentioned it might be something related to mipmapping the external lightmap image. I confirmed it happens to at least two other people as well. This is my lightmap compile: [light] -lightanglehl 1 -style -faster -fastgrid -cheap -cheapgrid -dirty -dirtgain 0.875 -dirtdepth 2 -dirtmode 0 -dirtscale 2 -bounce 3 -bouncescale 1.5 -fastbounce -bouncegrid -nobouncestore -samplescale 1 -super 2 -filter -patchshadows -nocollapse -nolightmapsearch -lightmapsize 4096 -debugsamplesize "[MapFile]"

I've attached a stripped down version of the map that shows the issue: mapBuggedLightmap.zip

Operating system and version: W10 22H2

Description of the bug (and if possible, steps to reproduce the bug): shot2024-01-30_23-39-52 image

What did you expect to happen instead? Expected same behavior as default renderer (no shadow lines)

JKSunny commented 7 months ago

@videoP, Thanks for detailed information and map, I'll look into it when I've got the time.

JKSunny commented 7 months ago

@videoP

Just commited a possible fix, please test

videoP commented 7 months ago

Seems fixed, awesome!

JKSunny commented 7 months ago

Nice, thanks for the bug report. Closing this now