Shadow mapping on OpenGL


Around 2 – 3 months ago, I decided to learn OpenGL 3 / 4. Since previously I have just been using OpenGL 2, which uses API like this: glMatrixMode( GL_PROJECTION ), or like this: glLightfv( … ), etc.

Obviously those are outdated, so I decided to refresh myself and learn OpenGL 3 (and above), which heavily utilize shaders.

And here’s a (crappy) result. Basically the idea is to first render your objects’ depth into depth buffer first, and then render the shadow to the screen along with the 3D models

You can get those models from Stanford 3D Scanning Repository, and load them as vertices using assimp library.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s