History

Merge pull request #4361 from samcake/temp0

evolve the Transform stack away from the legacy GL to the brand new shader way

Brad Hefta-Gaub committed 11 years ago

Commit b1189122 parents 128eb1c cad218464 files · +530 −135Browse files

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

Unified · Split

interface/src/Application.cpp+5−1
@@ -2547,7 +2547,9 @@ void Application::updateShadowMap() { · 2546 unmodified lines
2547 glm::ortho(minima.x, maxima.x, minima.y, maxima.y, -maxima.z, -minima.z) * glm::mat4_cast(inverseRotation));2547 glm::ortho(minima.x, maxima.x, minima.y, maxima.y, -maxima.z, -minima.z) * glm::mat4_cast(inverseRotation));
2548 2548
2549 // update the shadow view frustum2549 // update the shadow view frustum
2550 _shadowViewFrustum.setPosition(rotation * ((minima + maxima) * 0.5f));2550 // glm::vec3 shadowFrustumCenter = glm::vec3((minima.x + maxima.x) * 0.5f, (minima.y + maxima.y) * 0.5f, (minima.z + maxima.z) * 0.5f);
2551 glm::vec3 shadowFrustumCenter = rotation * ((minima + maxima) * 0.5f);
2552 _shadowViewFrustum.setPosition(shadowFrustumCenter);
2551 _shadowViewFrustum.setOrientation(rotation);2553 _shadowViewFrustum.setOrientation(rotation);
2552 _shadowViewFrustum.setOrthographic(true);2554 _shadowViewFrustum.setOrthographic(true);
2553 _shadowViewFrustum.setWidth(maxima.x - minima.x);2555 _shadowViewFrustum.setWidth(maxima.x - minima.x);
@@ -2577,8 +2579,10 @@ void Application::updateShadowMap() { · 23 unmodified lines
2577 // this is what is used for rendering the Entities and avatars2579 // this is what is used for rendering the Entities and avatars
2578 Transform viewTransform;2580 Transform viewTransform;
2579 viewTransform.setRotation(rotation);2581 viewTransform.setRotation(rotation);
2582 // viewTransform.postTranslate(shadowFrustumCenter);
2580 setViewTransform(viewTransform);2583 setViewTransform(viewTransform);
2581 2584
2585
2582 glEnable(GL_POLYGON_OFFSET_FILL);2586 glEnable(GL_POLYGON_OFFSET_FILL);
2583 glPolygonOffset(1.1f, 4.0f); // magic numbers courtesy http://www.eecs.berkeley.edu/~ravir/6160/papers/shadowmaps.ppt2587 glPolygonOffset(1.1f, 4.0f); // magic numbers courtesy http://www.eecs.berkeley.edu/~ravir/6160/papers/shadowmaps.ppt
2584 2588

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