Cleanup.
This commit is contained in:
Родитель
fb8a82a5fd
Коммит
e28e458173
|
@ -1123,13 +1123,12 @@ public:
|
||||||
mtxReflected(reflectMtx, { 0.0f, 0.01f, 0.0f }, { 0.0f, 1.0f, 0.0f });
|
mtxReflected(reflectMtx, { 0.0f, 0.01f, 0.0f }, { 0.0f, 1.0f, 0.0f });
|
||||||
|
|
||||||
// Reflect lights.
|
// Reflect lights.
|
||||||
float reflectedLights[MAX_NUM_LIGHTS][4];
|
|
||||||
for (uint8_t ii = 0; ii < numLights; ++ii)
|
for (uint8_t ii = 0; ii < numLights; ++ii)
|
||||||
{
|
{
|
||||||
bx::vec3MulMtx(reflectedLights[ii], lightPosRadius[ii], reflectMtx);
|
bx::Vec3 reflected = bx::mul(bx::load<bx::Vec3>(lightPosRadius[ii]), reflectMtx);
|
||||||
reflectedLights[ii][3] = lightPosRadius[ii][3];
|
bx::store(&s_uniforms.m_lightPosRadius[ii], reflected);
|
||||||
|
s_uniforms.m_lightPosRadius[ii][3] = lightPosRadius[ii][3];
|
||||||
}
|
}
|
||||||
bx::memCopy(s_uniforms.m_lightPosRadius, reflectedLights, numLights * 4*sizeof(float) );
|
|
||||||
|
|
||||||
// Reflect and submit bunny.
|
// Reflect and submit bunny.
|
||||||
float mtxReflectedBunny[16];
|
float mtxReflectedBunny[16];
|
||||||
|
|
|
@ -818,8 +818,7 @@ public:
|
||||||
1.0f
|
1.0f
|
||||||
};
|
};
|
||||||
|
|
||||||
float up[3] = { 0.0f, 4.0f, 0.0f };
|
cylinder.m_end = bx::mul({ 0.0f, 4.0f, 0.0f }, mtx);
|
||||||
bx::vec3MulMtx(&cylinder.m_end.x, up, mtx);
|
|
||||||
dde.setColor(intersect(&dde, ray, cylinder) ? selected : 0xffffffff);
|
dde.setColor(intersect(&dde, ray, cylinder) ? selected : 0xffffffff);
|
||||||
dde.draw(cylinder);
|
dde.draw(cylinder);
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ public:
|
||||||
const uint32_t abgr = m_mwc.gen();
|
const uint32_t abgr = m_mwc.gen();
|
||||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_cubeVertices); ++ii)
|
for (uint32_t ii = 0; ii < BX_COUNTOF(s_cubeVertices); ++ii)
|
||||||
{
|
{
|
||||||
bx::vec3MulMtx(&vertex[ii].m_x, &s_cubeVertices[ii].m_x, mtx);
|
bx::store(&vertex[ii].m_x, bx::mul(bx::load<bx::Vec3>(&s_cubeVertices[ii].m_x), mtx) );
|
||||||
vertex[ii].m_abgr = abgr;
|
vertex[ii].m_abgr = abgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче