mirror of https://github.com/AxioDL/metaforce.git
Invert sphere texture values
This commit is contained in:
parent
05a52c00be
commit
13f0726c40
|
@ -75,7 +75,6 @@ void ViewManager::ParticleView::draw(boo::IGraphicsCommandQueue *gfxQ)
|
||||||
if (m_vm.m_modelTest.IsLoaded())
|
if (m_vm.m_modelTest.IsLoaded())
|
||||||
{
|
{
|
||||||
CModelFlags flags;
|
CModelFlags flags;
|
||||||
flags.addColor.r = 0.0f;
|
|
||||||
|
|
||||||
flags.m_extendedShaderIdx = 2;
|
flags.m_extendedShaderIdx = 2;
|
||||||
if (std::fmod(m_theta, M_PIF) < M_PIF / 2.f)
|
if (std::fmod(m_theta, M_PIF) < M_PIF / 2.f)
|
||||||
|
|
|
@ -270,7 +270,7 @@ void CBooRenderer::GenerateSphereRampTex(boo::IGraphicsDataFactory::Context& ctx
|
||||||
for (int x=0 ; x<SPHERE_RAMP_RES ; ++x)
|
for (int x=0 ; x<SPHERE_RAMP_RES ; ++x)
|
||||||
{
|
{
|
||||||
zeus::CVector2f vec((x - halfRes) / halfRes, (y - halfRes) / halfRes);
|
zeus::CVector2f vec((x - halfRes) / halfRes, (y - halfRes) / halfRes);
|
||||||
data[y][x] = zeus::clamp(0.f, vec.canBeNormalized() ? vec.magnitude() : 0.f, 1.f) * 255;
|
data[y][x] = 255 - zeus::clamp(0.f, vec.canBeNormalized() ? vec.magnitude() : 0.f, 1.f) * 255;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x220_sphereRamp = ctx.newStaticTexture(SPHERE_RAMP_RES, SPHERE_RAMP_RES, 1,
|
x220_sphereRamp = ctx.newStaticTexture(SPHERE_RAMP_RES, SPHERE_RAMP_RES, 1,
|
||||||
|
|
Loading…
Reference in New Issue