History

Some tricks to avoid shadow artifacts: render back faces to shadow buffer, use polygon offset.

Andrzej Kapolka committed 12 years ago

Commit 70ab33b1 parent d63374f2 files · +12 −0Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+5−0
@@ -2325,10 +2325,15 @@ void Application::updateShadowMap() { · 2324 unmodified lines
2325 // store view matrix without translation, which we'll use for precision-sensitive objects2325 // store view matrix without translation, which we'll use for precision-sensitive objects
2326 updateUntranslatedViewMatrix();2326 updateUntranslatedViewMatrix();
2327 2327
2328 glEnable(GL_POLYGON_OFFSET_FILL);
2329 glPolygonOffset(1.1f, 4.0f);
2330
2328 _avatarManager.renderAvatars(Avatar::SHADOW_RENDER_MODE);2331 _avatarManager.renderAvatars(Avatar::SHADOW_RENDER_MODE);
2329 _particles.render(OctreeRenderer::SHADOW_RENDER_MODE);2332 _particles.render(OctreeRenderer::SHADOW_RENDER_MODE);
2330 _models.render(OctreeRenderer::SHADOW_RENDER_MODE);2333 _models.render(OctreeRenderer::SHADOW_RENDER_MODE);
2331 2334
2335 glDisable(GL_POLYGON_OFFSET_FILL);
2336
2332 glPopMatrix();2337 glPopMatrix();
2333 2338
2334 glMatrixMode(GL_PROJECTION);2339 glMatrixMode(GL_PROJECTION);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t