Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was over-simplifying. Where there's a will, there is a way. If you have a matrix that's got a 0 for the Z term in each column, you will squash the model onto the XY plane, as it is here. What you can not do with a last row being the unit W vector is shearing, perspective transformations, that sort of thing. Notice in that Star Fox game that the shadow isn't changing in size as the character jumps up and down relative to the light - also where is the light? It looks like shadows are cast by some virtual directional in the middle of the level. You could not do this for a point light.

You can totally fake this by shearing the model sideways and squashing one coordinate to zero. You render it twice, once as a shadow, once the normal way. Sometimes, you even build a separate shadow model that's much simpler. There's a lot of special case trickery that goes on in games. I was thinking of the little round circles since it's really cheap to compute, but yes, you could do shadows in limited cases.

What the 4th row being a unit W vector really prevents is projections. What Star Fox shows are non-projective shadows. Anyhow, this is some graphics nerdery here that is no longer relevant, and people faked it well enough.



Thanks for taking the time to elaborate; it really helped me understand better and contextualize my childhood a little more!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: