Commit 32b1046b authored by AL's avatar AL

better? ambient smoke and sand

parent 3d69412f
......@@ -145,14 +145,14 @@ int CombatManager::ProcessInput(Keyboard::Event in_event) //why does it return
{
HudOverlay::BoostOverlay(5.5f);
}
//if (in_event.GetCode() == 'T') //for testing
//{
// CM::PendScenario(CM::Scenario::Strike);
//}
//if (in_event.GetCode() == 'Y') //for testing
//{
// CM::PendScenario(CM::Scenario::GhoulAttack);
//}
if (in_event.GetCode() == 'T') //for testing
{
EH::AddEffect3D(EH::Effect::PlayerSandStorm);
}
if (in_event.GetCode() == 'Y') //for testing
{
EH::AddEffect3D(EH::Effect::PlayerSandThrow);
}
//if (in_event.GetCode() == 'U') //for testing
//{
// CM::PendScenario(CM::Scenario::GhoulAttackMiss);
......
......@@ -290,6 +290,8 @@ void EffectHandler::AddEffect3D(PositionData posData, Effect e)
{ -1.9f, -0.01f, -0.0f},
{ -1.0f, 0.01f, 0.0f} };
ParticleBurstData pbd{ 1u, posData, 0.1f, 0.3f, 9999999999.0f, 0.99f };
//smoke in the back of the room
pbd.origin.pos.z -= 1.8f;
pbd.origin.pos.y -= 0.8f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\Player_SandStorm.obj", *gfx));
......@@ -309,6 +311,58 @@ void EffectHandler::AddEffect3D(PositionData posData, Effect e)
pbd.origin.pos.y += 0.5f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\Player_SandStorm.obj", *gfx));
//smoke on the floor (middle)
psd.minRollPitchYaw.x -= (PI*0.4f);
psd.maxRollPitchYaw.x -= (PI*0.4f);
pbd.origin.pos.y = 0.2f;
pbd.origin.pos.x = 1.5f;
pbd.origin.pos.z = 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
//pbd.origin.pos.x -= 1.5f;
//e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
//pbd.origin.pos.z += 1.3f;
//e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
//pbd.origin.pos.x -= 1.5f;
//e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
//floor smoke(left)
psd.minRollPitchYaw.z -= (PI * 0.3f);
psd.maxRollPitchYaw.z -= (PI * 0.3f);
pbd.origin.pos.y = 0.35f;
pbd.origin.pos.x = 1.5f;
pbd.origin.pos.z = 2.1f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
//floor smoke(right)
psd.minRollPitchYaw.z += (PI * 0.6f);
psd.maxRollPitchYaw.z += (PI * 0.6f);
pbd.origin.pos.x = 1.5f;
pbd.origin.pos.z = -0.1f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
pbd.origin.pos.x += 1.0f;
e3df.push_back(std::make_unique<Effect3DPhysics>(pbd, psd, L"Media\\Models\\WhiteSmoke.obj", *gfx));
break;
}
default:
......
......@@ -11,7 +11,7 @@ void FrameCommander::Execute(DXGraphics& gfx, float dt) noxnd
if (blurMod == 0.0f)
{
passes[0].Execute(gfx); //most models
Stencil::Resolve(gfx, Stencil::Mode::ReadOnly)->Bind(gfx); //::HUD
Stencil::Resolve(gfx, Stencil::Mode::HUD)->Bind(gfx);
passes[1].Execute(gfx);
}
else
......@@ -20,7 +20,7 @@ void FrameCommander::Execute(DXGraphics& gfx, float dt) noxnd
bp.SetKernelGauss(gfx, kernelSize, 10.0f * blurMod);
rt1.BindAsTarget(gfx, ds);
passes[0].Execute(gfx); //most models
Stencil::Resolve(gfx, Stencil::Mode::ReadOnly)->Bind(gfx); //::HUD
Stencil::Resolve(gfx, Stencil::Mode::HUD)->Bind(gfx);
passes[1].Execute(gfx);
// fullscreen blur h-pass
......
......@@ -2,10 +2,10 @@
# www.blender.org
mtllib Player_SandThrow.mtl
o Plane
v -0.25000 0.000000 0.25000
v 0.25000 0.000000 0.25000
v -0.25000 0.000000 -0.25000
v 0.25000 0.000000 -0.25000
v -0.55000 0.000000 0.55000
v 0.55000 0.000000 0.55000
v -0.55000 0.000000 -0.55000
v 0.55000 0.000000 -0.55000
vt 0.999900 0.999900
vt 0.000100 0.000100
vt 0.999900 0.000100
......
......@@ -4,7 +4,7 @@
newmtl Player_SandThrowIndicator
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 0.900000 2.200000 6.300000
Kd 5.900000 6.200000 8.300000
Ks 1.300000 0.700000 0.200000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
......
# Blender MTL File: 'None'
# Material Count: 1
newmtl WhiteSmoke
Ns 49.300000
Ka 1.000000 1.000000 1.000000
Kd 0.265000 0.577000 2.760000
Ks 0.010000 0.010000 0.010000
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd Player_SandStorm.png
\ No newline at end of file
# Blender v2.81 (sub 16) OBJ File: ''
# www.blender.org
mtllib WhiteSmoke.mtl
o Plane
v -1.55000 0.000000 1.55000
v 1.55000 0.000000 1.55000
v -1.55000 0.000000 -1.55000
v 1.55000 0.000000 -1.55000
vt 0.999900 0.999900
vt 0.000100 0.000100
vt 0.999900 0.000100
vt 0.000100 0.999900
vn 0.0000 1.0000 0.0000
usemtl WhiteSmoke
s off
f 2/1/1 3/2/1 1/3/1
f 2/1/1 4/4/1 3/2/1
......@@ -26,12 +26,7 @@ float4 main(float3 viewFragPos : Position, float3 viewNormal : Normal, float3 vi
{
float4 dtex = tex.Sample(splr, tc);
// normalize the mesh normal
viewNormal = normalize(viewNormal);
#ifdef MASK_BOI
// bail if highly translucent
clip(dtex.a < 0.1f ? -1 : 1);
#endif
viewNormal = normalize(viewNormal);
// replace normal with mapped if normal mapping enabled
if (normalMapEnabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment