mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 17:17:58 +02:00
Fix the broken shadows by simply calling the needed setViewTransform which is used for rendering the ENitites and avatars
This commit is contained in:
parent
8617c319d4
commit
01c13cd6f1
1 changed files with 7 additions and 2 deletions
|
@ -2874,8 +2874,13 @@ void Application::updateShadowMap() {
|
||||||
|
|
||||||
// store view matrix without translation, which we'll use for precision-sensitive objects
|
// store view matrix without translation, which we'll use for precision-sensitive objects
|
||||||
updateUntranslatedViewMatrix();
|
updateUntranslatedViewMatrix();
|
||||||
// TODO: assign an equivalent viewTransform object to the application to match the current path which uses glMatrixStack
|
|
||||||
// setViewTransform(viewTransform);
|
// Equivalent to what is happening with _untranslatedViewMatrix and the _viewMatrixTranslation
|
||||||
|
// the viewTransofmr object is updatded with the correct values and saved,
|
||||||
|
// this is what is used for rendering the Entities and avatars
|
||||||
|
Transform viewTransform;
|
||||||
|
viewTransform.setRotation(rotation);
|
||||||
|
setViewTransform(viewTransform);
|
||||||
|
|
||||||
glEnable(GL_POLYGON_OFFSET_FILL);
|
glEnable(GL_POLYGON_OFFSET_FILL);
|
||||||
glPolygonOffset(1.1f, 4.0f); // magic numbers courtesy http://www.eecs.berkeley.edu/~ravir/6160/papers/shadowmaps.ppt
|
glPolygonOffset(1.1f, 4.0f); // magic numbers courtesy http://www.eecs.berkeley.edu/~ravir/6160/papers/shadowmaps.ppt
|
||||||
|
|
Loading…
Reference in a new issue