mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Cleanup.
This commit is contained in:
parent
4770831b11
commit
3cabe28c6e
1 changed files with 5 additions and 5 deletions
|
@ -313,11 +313,11 @@ class Terrain : public entry::AppI
|
||||||
|
|
||||||
// Raise/Lower and scale by brush power.
|
// Raise/Lower and scale by brush power.
|
||||||
height += (bx::fclamp(brushAttn * m_brush.m_power, 0.0, m_brush.m_power) * m_brush.m_raise)
|
height += (bx::fclamp(brushAttn * m_brush.m_power, 0.0, m_brush.m_power) * m_brush.m_raise)
|
||||||
? 1.0
|
? 1.0f
|
||||||
: -1.0
|
: -1.0f
|
||||||
;
|
;
|
||||||
|
|
||||||
m_terrain.m_heightMap[heightMapPos] = (uint8_t)bx::fclamp(height, 0.0, 255.0);
|
m_terrain.m_heightMap[heightMapPos] = (uint8_t)bx::fclamp(height, 0.0f, 255.0f);
|
||||||
m_terrain.m_dirty = true;
|
m_terrain.m_dirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,8 +328,8 @@ class Terrain : public entry::AppI
|
||||||
float ray_clip[4];
|
float ray_clip[4];
|
||||||
ray_clip[0] = ( (2.0f * m_mouseState.m_mx) / m_width - 1.0f) * -1.0f;
|
ray_clip[0] = ( (2.0f * m_mouseState.m_mx) / m_width - 1.0f) * -1.0f;
|
||||||
ray_clip[1] = ( (1.0f - (2.0f * m_mouseState.m_my) / m_height) ) * -1.0f;
|
ray_clip[1] = ( (1.0f - (2.0f * m_mouseState.m_my) / m_height) ) * -1.0f;
|
||||||
ray_clip[2] = -1.0;
|
ray_clip[2] = -1.0f;
|
||||||
ray_clip[3] = 1.0;
|
ray_clip[3] = 1.0f;
|
||||||
|
|
||||||
float invProjMtx[16];
|
float invProjMtx[16];
|
||||||
bx::mtxInverse(invProjMtx, m_projMtx);
|
bx::mtxInverse(invProjMtx, m_projMtx);
|
||||||
|
|
Loading…
Reference in a new issue