summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp')
-rw-r--r--3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
index 274e5f40469..ae125ea98ab 100644
--- a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
+++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
@@ -200,7 +200,7 @@ int _main_(int _argc, char** _argv)
bx::mtxLookAt(view, eye, at);
const float aspect = float(int32_t(width) ) / float(int32_t(height) );
- bx::mtxProj(proj, 60.0f, aspect, 0.1f, 1000.0f, flipV);
+ bx::mtxProj(proj, 60.0f, aspect, 0.1f, 1000.0f, bgfx::getCaps()->homogeneousDepth);
// Time acumulators.
float timeAccumulatorLight = 0.0f;
@@ -230,9 +230,9 @@ int _main_(int _argc, char** _argv)
// Setup lights.
float lightPos[4];
- lightPos[0] = -cosf(timeAccumulatorLight);
+ lightPos[0] = -bx::fcos(timeAccumulatorLight);
lightPos[1] = -1.0f;
- lightPos[2] = -sinf(timeAccumulatorLight);
+ lightPos[2] = -bx::fsin(timeAccumulatorLight);
lightPos[3] = 0.0f;
bgfx::setUniform(u_lightPos, lightPos);
@@ -287,7 +287,7 @@ int _main_(int _argc, char** _argv)
bgfx::setViewFrameBuffer(RENDER_SHADOW_PASS_ID, shadowMapFB);
bgfx::setViewTransform(RENDER_SHADOW_PASS_ID, lightView, lightProj);
- bgfx::setViewRect(RENDER_SCENE_PASS_ID, 0, 0, width, height);
+ bgfx::setViewRect(RENDER_SCENE_PASS_ID, 0, 0, uint16_t(width), uint16_t(height) );
bgfx::setViewTransform(RENDER_SCENE_PASS_ID, view, proj);
// Clear backbuffer and shadowmap framebuffer at beginning.