magcius / noclip.website

A digital museum of video game levels
https://noclip.website/
Other
3.27k stars 259 forks source link

BFBB: Fix sky rendering bug #627

Closed seilweiss closed 9 months ago

seilweiss commented 9 months ago

This fixes a bug where all skydome entities were going into the main pass instead of the sky pass, causing them to draw over other objects in the scene. This was because EntRenderer would set the render inst list to the sky one but then it would get reset back to the main one when EntRenderer called prepareToRender on each of its models. The solution is to not reset the render inst list in BaseRenderer, but instead reset it once at the beginning of the scene and once after rendering each entity.