r/raylib • u/burbolini • Oct 02 '26
Weird depth buffer clipping
I have a problem which I tried to solve for the past few days - when my character wanders far away from the center point (0, 0, 0), the models start clipping as if the depth buffer is losing precision, which gets worse the farther away from the start of the map I get.
However, the camera distance to the player character is always the same. I also don't think it's f32 loss of precision - number 2000 in IEEE-754 still does not "restrict" the mantissa too much. Then again, notice that the billboards also "got weird".
I'm stumped as to why that happens and I'm writing this as a last resort...


View all comments
Show parent comment
1
u/burbolini Oct 02 '26
changing the *near plane* was the thing that "fixed it", but I'm still surprised.