ssloy / tinyrenderer

A brief computer graphics / rendering course

Home Page:https://github.com/ssloy/tinyrenderer/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lesson 5 suggestion

Buzzefall opened this issue · comments

I've found a bit confusing the fact that at master branch in triangle(..) there is bc_clip argument which is assuming we have already performed clipping. But the course Wiki says it is projection that helps us to clip vertices. And in the code we see Projection applied to bc_clip (already clipped?) vertices. Maybe I miss something..

But I think it may be useful to note that if we know parameter r=1/D where D is screen-plane-to-camera distance and planes Z=0, Z=farthest_distance, we can clip vertices before applying Projection matrix and that will bring meaning to bc_clip argument name.

What do you think?