CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 811 forks source link

Game crashes when the camera is above the cloud height and fast rendering is used #2646

Closed jellysquid3 closed 2 months ago

jellysquid3 commented 2 months ago

The code responsible for culling back faces in cloud geometry is not exactly right. Since the fast-mode rendering does not use back-face culling, it incorrectly culls the bottom most faces and causes a crash due to the geometry buffer being empty.

We should fix this by skipping the face-cull logic when using fast-mode rendering. If the geometry buffer is empty after the meshing step, don't attempt to finalize it into a GPU vertex buffer.

douira commented 2 months ago

I might look into this if nobody else has their eyes on it already