Grass disapear around camera

Walan Brousseau shared this bug 6 months ago
Investigating

I got a bug where the grass disappear around the camera in what it look like a volume around it. It doesn't mater what graphic setting I use, this append. I attach a video to show what the bug is. The bug appear no matter if we are in 3rd or 1st person view.


My PC is powerful enough to play SE1 in 4k at max graphic but this still append. I would like some help to fix this because it is quite distracting.

Replies (1)

photo
1

Found the cause (on Linux with Proton/DXVK + NVIDIA): in Foliage.hlsl, the table in GetSkip() starts with 0 (int skips[16] = {0,4,4,2,...}), and the code then divides by that value (id % numSkips). Dividing by zero is undefined: Windows seems to give "don't skip", but DXVK gives "skip", so no grass grows within about 9 m of the camera.


Fix: change the first entry from 0 to -1, or return early when it is 0. I patched the shader live and the grass came back

Leave a Comment
 
Attach a file
Access denied
Access denied
Access denied
Access denied
Access denied