+1
-1
@@ -48,6 +48,6 @@
|
||||
|
||||
# lfs
|
||||
*.fbx filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs
|
||||
|
||||
*.png binary
|
||||
@@ -18,6 +18,7 @@ float g_fPI;
|
||||
float g_fFar;
|
||||
float g_fBlinkTime;
|
||||
float g_fTime;
|
||||
float g_fColorTime;
|
||||
float g_fFrame;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
@@ -93,7 +94,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
@@ -119,7 +120,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -130,7 +131,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_Texture_Color(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -144,7 +145,7 @@ PS_OUT PS_Texture_Color(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -165,7 +166,7 @@ PS_OUT PS_Logo(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo_Text(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -191,7 +192,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo_Glow(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -212,7 +213,7 @@ PS_OUT PS_Logo_Glow(PS_IN In)
|
||||
|
||||
PS_OUT PS_AlphaBlend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -227,7 +228,7 @@ PS_OUT PS_AlphaBlend(PS_IN In)
|
||||
|
||||
PS_OUT PS_Clamp(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -242,7 +243,7 @@ PS_OUT PS_Clamp(PS_IN In)
|
||||
|
||||
PS_OUT PS_Cursor(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -292,7 +293,7 @@ PS_OUT PS_Cursor(PS_IN In)
|
||||
|
||||
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -365,7 +366,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
|
||||
PS_OUT PS_Mission(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -387,7 +388,7 @@ PS_OUT PS_Mission(PS_IN In)
|
||||
|
||||
PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 UV = In.vTexcoord;
|
||||
@@ -422,7 +423,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
|
||||
PS_OUT PS_QuestType(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
|
||||
float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -443,7 +444,7 @@ PS_OUT PS_QuestType(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -455,10 +456,11 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
|
||||
float2 texlocal = (In.vTexcoord - texpos) / texsize;
|
||||
bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (inside)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, texlocal);
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
@@ -468,7 +470,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
|
||||
PS_OUT PS_NineSlice(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -532,7 +534,7 @@ PS_OUT PS_NineSlice(PS_IN In)
|
||||
|
||||
PS_OUT PS_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -560,7 +562,7 @@ PS_OUT PS_Rotation(PS_IN In)
|
||||
|
||||
PS_OUT PS_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
@@ -582,7 +584,7 @@ PS_OUT PS_Slot(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellAnim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
@@ -684,7 +686,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
|
||||
PS_OUT PS_HpBar(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -781,7 +783,7 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Meter(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
|
||||
|
||||
@@ -812,7 +814,7 @@ PS_OUT PS_Magic_Meter(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -848,7 +850,7 @@ PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
|
||||
PS_OUT PS_RemapUV(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -871,7 +873,7 @@ PS_OUT PS_RemapUV(PS_IN In)
|
||||
|
||||
PS_OUT PS_Revelio(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -910,7 +912,7 @@ PS_OUT PS_Revelio(PS_IN In)
|
||||
|
||||
PS_OUT PS_Potion(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f);
|
||||
|
||||
@@ -953,7 +955,7 @@ PS_OUT PS_Potion(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Item(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1077,7 +1079,7 @@ PS_OUT PS_Magic_Item(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Preview(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1152,7 +1154,7 @@ PS_OUT PS_Spell_Preview(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Header(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -1198,7 +1200,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1260,7 +1262,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1289,7 +1291,7 @@ PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
|
||||
PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1331,7 +1333,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
|
||||
PS_OUT PS_Loding_Screen(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1362,7 +1364,7 @@ PS_OUT PS_Loding_Screen(PS_IN In)
|
||||
|
||||
PS_OUT PS_Enemy_HpBer(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1448,7 +1450,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In)
|
||||
|
||||
PS_OUT PS_Boss_HpBer(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1520,7 +1522,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Border(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1587,7 +1589,7 @@ PS_OUT PS_Quest_Border(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Info(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1650,7 +1652,7 @@ PS_OUT PS_Quest_Info(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Status(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1721,7 +1723,7 @@ PS_OUT PS_Quest_Status(PS_IN In)
|
||||
|
||||
PS_OUT PS_Broomstick(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1771,9 +1773,10 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT PS_SpellLearn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1794,7 +1797,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1866,7 +1869,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1910,7 +1913,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
|
||||
PS_OUT PS_NPCInteraction(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1983,7 +1986,7 @@ PS_OUT PS_NPCInteraction(PS_IN In)
|
||||
|
||||
PS_OUT PS_CanvasFade(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
@@ -1997,6 +2000,72 @@ PS_OUT PS_CanvasFade(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_FlagWave(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
|
||||
float phase = uv.y * 1.5f;
|
||||
|
||||
float waveX =
|
||||
sin(uv.y * 20.f + g_fTime * 1.0f + phase) * 0.007f;
|
||||
|
||||
float waveY =
|
||||
sin(uv.x * 12.f + g_fTime * 0.8f) * 0.002f;
|
||||
|
||||
uv.x += waveX;
|
||||
uv.y += waveY;
|
||||
|
||||
float4 tex = g_Texture.Sample(ClampSampler, uv);
|
||||
|
||||
Color = tex;
|
||||
|
||||
if (Color.r <= 0.f)
|
||||
discard;
|
||||
|
||||
Color.a = Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_BroomCircle(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
float2 Rotation;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 tex = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
|
||||
color = tex;
|
||||
|
||||
float Diffuse = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
|
||||
|
||||
|
||||
if (g_iHover != 0)
|
||||
{
|
||||
if (g_fTime >= Diffuse)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2043,7 +2112,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
|
||||
|
||||
PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
@@ -2191,7 +2260,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
|
||||
|
||||
PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
@@ -2209,7 +2278,7 @@ PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
|
||||
PS_OUT PS_Interaction_Npc(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -2281,6 +2350,22 @@ PS_OUT PS_Interaction_Npc(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_BroomGateTarget(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color.a *= g_fAlpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -2691,6 +2776,26 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_CanvasFade();
|
||||
}
|
||||
|
||||
pass FlagWave
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_FlagWave();
|
||||
}
|
||||
|
||||
pass BroomCircle
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BroomCircle();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -2720,4 +2825,14 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Interaction_Npc();
|
||||
}
|
||||
|
||||
pass BroomGateTarget
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NONESIZE3D();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BroomGateTarget();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,10 +163,17 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\Public\Barral_Splesh.h" />
|
||||
<ClInclude Include="..\Public\Avadakedavra.h" />
|
||||
<ClInclude Include="..\Public\AvadakedavraSide.h" />
|
||||
<ClInclude Include="..\Public\Broom_Circle.h" />
|
||||
<ClInclude Include="..\Public\Broom_Exit.h" />
|
||||
<ClInclude Include="..\Public\Broom_Finish.h" />
|
||||
<ClInclude Include="..\Public\Broom_Flag.h" />
|
||||
<ClInclude Include="..\Public\Broom_Panel.h" />
|
||||
<ClInclude Include="..\Public\Broom_Record.h" />
|
||||
<ClInclude Include="..\Public\Broom_Scoreboard.h" />
|
||||
<ClInclude Include="..\public\Broom_TargetGate.h" />
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
|
||||
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
|
||||
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
|
||||
<ClInclude Include="..\Public\Camera_Model.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
|
||||
<ClInclude Include="..\Public\Goblin_Sword.h" />
|
||||
@@ -178,6 +185,7 @@ call Update_Resources.bat
|
||||
<ClInclude Include="..\public\Dialogue_Font.h" />
|
||||
<ClInclude Include="..\public\NPCInteraction.h" />
|
||||
<ClInclude Include="..\public\PointLight.h" />
|
||||
<ClInclude Include="..\Public\Ranrok_Point.h" />
|
||||
<ClInclude Include="..\Public\PlayerRobe.h" />
|
||||
<ClInclude Include="..\Public\Player_ENUM.h" />
|
||||
<ClInclude Include="..\Public\State_Dash.h" />
|
||||
@@ -412,10 +420,17 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Avadakedavra.cpp" />
|
||||
<ClCompile Include="..\Private\AvadakedavraSide.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Circle.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Exit.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Finish.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Flag.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Panel.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Record.cpp" />
|
||||
<ClCompile Include="..\Private\Broom_Scoreboard.cpp" />
|
||||
<ClCompile Include="..\private\Broom_TargetGate.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
|
||||
@@ -428,6 +443,7 @@ call Update_Resources.bat
|
||||
<ClCompile Include="..\private\Dialogue_Font.cpp" />
|
||||
<ClCompile Include="..\private\NPCInteraction.cpp" />
|
||||
<ClCompile Include="..\private\PointLight.cpp" />
|
||||
<ClCompile Include="..\Private\Ranrok_Point.cpp" />
|
||||
<ClCompile Include="..\Private\PlayerRobe.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dash.cpp" />
|
||||
<ClCompile Include="..\Private\State_Fall.cpp" />
|
||||
|
||||
@@ -740,15 +740,15 @@
|
||||
<ClInclude Include="..\public\Dialogue_Data.h">
|
||||
<Filter>04.Mechanic\Dialogue\Dialogue_Data</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Ranrok_Point.h">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Player_ENUM.h">
|
||||
<Filter>02.GameObjects\Player</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\PlayerRobe.h">
|
||||
<Filter>02.GameObjects\Player\Robe</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera_Model.h">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Goblin_Assassin.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
|
||||
</ClInclude>
|
||||
@@ -767,6 +767,30 @@
|
||||
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Panel.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Circle.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Circle</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Flag.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Flag</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Scoreboard.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Scoreboard</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Broom_TargetGate.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Finish.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Finish</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Exit.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Exit</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Broom_Record.h">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Record</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
@@ -1572,12 +1596,12 @@
|
||||
<Filter Include="04.Mechanic\Dialogue\Dialogue_Data">
|
||||
<UniqueIdentifier>{b03591a7-a14e-425a-8a3f-2a6a054c884a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point">
|
||||
<UniqueIdentifier>{a94e24d2-0f61-4263-b834-bfdf9f6c06ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Player\Robe">
|
||||
<UniqueIdentifier>{f3c7cf8d-2b83-49d3-85da-fe135e376a11}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\Cameras\Camera_Model">
|
||||
<UniqueIdentifier>{f8d55057-c0f8-4cac-8a6c-6f11345a83bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin">
|
||||
<UniqueIdentifier>{af9f5cf6-151a-49bc-9af4-28ba0bde1d37}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -1599,6 +1623,30 @@
|
||||
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector">
|
||||
<UniqueIdentifier>{bf7cf91b-742f-4913-8af2-39ed94d19e23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel">
|
||||
<UniqueIdentifier>{e5da4124-9936-46e7-981b-9d8ccc9590d9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Circle">
|
||||
<UniqueIdentifier>{b5b99876-ca87-4276-9276-5961625e06c3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Flag">
|
||||
<UniqueIdentifier>{8a87e6cb-ba54-45ee-866b-9098085f973b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Scoreboard">
|
||||
<UniqueIdentifier>{09fac7f5-d246-4860-a151-04c92c0677f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate">
|
||||
<UniqueIdentifier>{c61b7c21-0ea8-42c4-a535-8624ce17fc8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Exit">
|
||||
<UniqueIdentifier>{b585e3f0-93f7-4825-b049-5616a680d102}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Record">
|
||||
<UniqueIdentifier>{40d9d62b-f8cf-4a09-89cc-2f336f8052a2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Finish">
|
||||
<UniqueIdentifier>{2246ff16-d62c-4e16-a948-16e7968e0933}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Client.cpp">
|
||||
@@ -2286,6 +2334,9 @@
|
||||
<ClCompile Include="..\private\Dialogue_Data.cpp">
|
||||
<Filter>04.Mechanic\Dialogue\Dialogue_Data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Ranrok_Point.cpp">
|
||||
<Filter>02.GameObjects\Effect\MonsterEffect\Ranrok\Ranrok_Point</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Camera_Model.cpp">
|
||||
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
|
||||
</ClCompile>
|
||||
@@ -2313,6 +2364,30 @@
|
||||
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp">
|
||||
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Spector\Goblin_Assassin_Spector</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Panel.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Circle.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Circle</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Flag.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Flag</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Scoreboard.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Scoreboard</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Broom_TargetGate.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_TargetGate</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Finish.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Finish</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Exit.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Exit</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Broom_Record.cpp">
|
||||
<Filter>02.GameObjects\UI\GamePlay_Canvas\Broom_Panel\Broom_Record</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Goblin_States.cpp">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "BroomRacerAI.h"
|
||||
#include "Player.h"
|
||||
#include "Broom.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CBroomRaceManager::CBroomRaceManager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -14,7 +15,8 @@ CBroomRaceManager::CBroomRaceManager(ID3D11Device* pDevice, ID3D11DeviceContext*
|
||||
}
|
||||
|
||||
CBroomRaceManager::CBroomRaceManager(const CBroomRaceManager& Prototype)
|
||||
: CGameObject(Prototype)
|
||||
: CGameObject(Prototype),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -33,7 +35,6 @@ HRESULT CBroomRaceManager::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -56,6 +57,23 @@ void CBroomRaceManager::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
if (m_eRaceState == ENUM_CLASS(RACE_STATE::RACING))
|
||||
{
|
||||
if (m_iLastRing < m_pRaceRings.size())
|
||||
{
|
||||
m_fRacingTimer += fTimeDelta;
|
||||
m_pInfoInstance->Set_Broom_Timer(m_fRacingTimer);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fRacingTimer = 0.f;
|
||||
if (m_bRaceStart == true)
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("RaceEnd"));
|
||||
m_bRaceStart = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -72,8 +90,6 @@ void CBroomRaceManager::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CBroomRaceManager::Render()
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), ToolTip.c_str(), _float2(g_iWinSizeX*0.5f, g_iWinSizeY*0.5f),XMVectorSet(1.f,1.f,1.f,1.f),5.f);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -173,7 +189,7 @@ void CBroomRaceManager::Describe_Entity()
|
||||
CTransform* pTransform =
|
||||
racer.pRacer->Get_Component<CTransform>();
|
||||
spawnPos.m128_f32[1] -= 2.f;
|
||||
pTransform->Set_State(STATE::POSITION,spawnPos);
|
||||
pTransform->Set_State(STATE::POSITION, spawnPos);
|
||||
pTransform->LookAt(pRingTransform->Get_State(STATE::POSITION));
|
||||
racer.pRacer->Get_Component<CFSM>()->Change_State(FSMSTATE::BROOM_RIDE);
|
||||
racer.pRacer->Get_Broom()->Set_Move(false);
|
||||
@@ -184,6 +200,7 @@ void CBroomRaceManager::Describe_Entity()
|
||||
{
|
||||
if (GUI::Button("Countdown"))
|
||||
{
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Ready_Race"));
|
||||
m_eRaceState = ENUM_CLASS(RACE_STATE::COUNTDOWN);
|
||||
}
|
||||
}
|
||||
@@ -201,13 +218,15 @@ void CBroomRaceManager::Update_Countdown(_float fTimeDelta)
|
||||
m_fCountTimer = 0.f;
|
||||
--m_iCount;
|
||||
|
||||
if (m_iCount > 0)
|
||||
if (m_iPerCount != m_iCount)
|
||||
{
|
||||
ToolTip = to_wstring(m_iCount);
|
||||
m_iPerCount = m_iCount;
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Race_Count"), &m_iCount);
|
||||
}
|
||||
else
|
||||
if (m_iCount <= 0)
|
||||
{
|
||||
ToolTip = to_wstring(0);
|
||||
size_t MaxRing = m_pRaceRings.size();
|
||||
m_pInfoInstance->Event_CallBack(TEXT("Race_Start"), &MaxRing);
|
||||
StartRaceMove();
|
||||
}
|
||||
}
|
||||
@@ -228,6 +247,7 @@ void CBroomRaceManager::StartRaceMove()
|
||||
}
|
||||
|
||||
m_eRaceState = ENUM_CLASS(RACE_STATE::RACING);
|
||||
m_bRaceStart = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -275,8 +295,8 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
|
||||
if (dist <= PASS_RADIUS)
|
||||
{
|
||||
if(racer.pRacer){
|
||||
pRing->Set_Target(false);
|
||||
if (racer.pRacer) {
|
||||
pRing->Set_Target(false);
|
||||
}
|
||||
|
||||
racer.curRing = (racer.curRing + 1) % m_pRaceRings.size();
|
||||
@@ -284,7 +304,7 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
if (racer.pRacer) {
|
||||
m_pRaceRings[racer.curRing]->Set_Target(true);
|
||||
}
|
||||
|
||||
|
||||
racer.pAI ? SetTargetRing(racer.pAI) : SetTargetRing(racer.pRacer);
|
||||
}
|
||||
}
|
||||
@@ -294,8 +314,8 @@ void CBroomRaceManager::Check_RingPassed()
|
||||
}
|
||||
|
||||
|
||||
void CBroomRaceManager::SetTargetRing(CGameObject*pRacer)
|
||||
{
|
||||
void CBroomRaceManager::SetTargetRing(CGameObject* pRacer)
|
||||
{
|
||||
for (auto& racer : m_Racers)
|
||||
{
|
||||
if (racer.pAI)
|
||||
@@ -313,8 +333,10 @@ void CBroomRaceManager::SetTargetRing(CGameObject*pRacer)
|
||||
if (racer.pRacer == pRacer)
|
||||
{
|
||||
racer.pRacer->Set_RaceRing(m_pRaceRings[racer.curRing]);
|
||||
m_pInfoInstance->Event_CallBack(TEXT("CurrentRing"));
|
||||
}
|
||||
}
|
||||
m_iLastRing++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,9 +348,9 @@ void CBroomRaceManager::Push_BroomRacer(RacerInfo Info)
|
||||
info.curRing = Info.curRing;
|
||||
info.prevPos = Info.prevPos;
|
||||
|
||||
if(Info.pAI)
|
||||
if (Info.pAI)
|
||||
info.pAI->Set_RaceRing(m_pRaceRings[info.curRing]);
|
||||
else if(Info.pRacer)
|
||||
else if (Info.pRacer)
|
||||
info.pRacer->Set_RaceRing(m_pRaceRings[info.curRing]);
|
||||
|
||||
m_Racers.push_back(info);
|
||||
|
||||
@@ -174,15 +174,15 @@ HRESULT CBroomRacerAI::Render()
|
||||
}
|
||||
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
|
||||
{
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -0,0 +1,372 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Circle.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Circle::CBroom_Circle(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Circle::CBroom_Circle(const CBroom_Circle& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Circle::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Circle::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 120.f;
|
||||
Desc.fSizeX = 160.f;
|
||||
Desc.fSizeY = 160.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 150.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_iCount = 3;
|
||||
m_fFontX = 918.f;
|
||||
m_fFontY = 345.f;
|
||||
m_fFontAlpha = 1.f;
|
||||
m_fAngle = XMConvertToRadians(90.f);
|
||||
m_bTimer = false;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Circle::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Circle::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
//if (m_pGameInstance->Key_Down(DIK_K))
|
||||
//{
|
||||
// Race_Start();
|
||||
//}
|
||||
|
||||
if (m_iPerCount != m_iCount)
|
||||
{
|
||||
m_iPerCount = m_iCount;
|
||||
Start_Size_Lerp(fTimeDelta * m_fTimeMult);
|
||||
}
|
||||
|
||||
|
||||
if (m_fFontAlpha >= 0.f)
|
||||
{
|
||||
m_fFontAlpha -= fTimeDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fFontAlpha = 0.f;
|
||||
}
|
||||
|
||||
if (m_bHover == true)
|
||||
{
|
||||
if (m_fDissolve <= 1.f)
|
||||
m_fDissolve += fTimeDelta;
|
||||
else if (m_fDissolve >= 1.f)
|
||||
{
|
||||
m_bHover = false;
|
||||
Visible(false);
|
||||
}
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Circle::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Circle::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BROOMCIRCLE)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_wstring Count;
|
||||
_vector Color{};
|
||||
if (m_iCount > 0.f)
|
||||
{
|
||||
Count = to_wstring(m_iCount);
|
||||
Color = XMVectorSet(1.f * m_fFontAlpha, 1.f * m_fFontAlpha, 1.f * m_fFontAlpha, m_fFontAlpha);
|
||||
}
|
||||
|
||||
else if (m_iCount == 0)
|
||||
{
|
||||
Count = TEXT("GO");
|
||||
Color = XMVectorSet(0.f, 1.f * m_fFontAlpha, 0.f, m_fFontAlpha);
|
||||
}
|
||||
|
||||
_float OffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size70"), Count.c_str()) - 61.f) * 0.5f;
|
||||
m_pGameInstance->Render_Text(TEXT("UI_size70"), Count.c_str(), _float2(m_fFontX + m_fX - OffSet, m_fFontY - m_fY), Color);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Circle::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Circle::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fDissolve, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAngle", &m_fAngle, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Circle::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_AccioBallFrame_4K"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_VFX_T_Repairo_Wisp_04_D"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Circle::Start_Size_Lerp(_float fTimeDelta)
|
||||
{
|
||||
m_fFontAlpha = 1.f;
|
||||
if (m_bCountDown == true)
|
||||
{
|
||||
m_bCountDown = false;
|
||||
}
|
||||
|
||||
if (m_fSizeX >= 150.f && m_bSizeDown == false)
|
||||
{
|
||||
m_fSizeX -= fTimeDelta;
|
||||
m_fSizeY -= fTimeDelta;
|
||||
}
|
||||
|
||||
if (m_fSizeX <= 150.f)
|
||||
{
|
||||
m_bSizeDown = true;
|
||||
}
|
||||
|
||||
if (m_bSizeDown == true)
|
||||
{
|
||||
m_fSizeX += fTimeDelta;
|
||||
m_fSizeY += fTimeDelta;
|
||||
}
|
||||
|
||||
if (m_fSizeX >= 180.f && m_bSizeUp == false)
|
||||
{
|
||||
m_bSizeDown = false;
|
||||
m_bSizeUp = true;
|
||||
}
|
||||
|
||||
if (m_bSizeUp == true)
|
||||
{
|
||||
if (m_fSizeX >= 160.f)
|
||||
{
|
||||
m_fSizeX -= fTimeDelta;
|
||||
m_fSizeY -= fTimeDelta;
|
||||
}
|
||||
else if (m_fSizeX <= 160.f/* && m_bCountDown == false*/)
|
||||
{
|
||||
m_fSizeX = 160.f;
|
||||
m_fSizeY = 160.f;
|
||||
m_bSizeUp = false;
|
||||
/*m_fTime = 0.f;*/
|
||||
//m_bCountDown = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iCount <= 0)
|
||||
{
|
||||
//m_bTimer = false;
|
||||
m_bHover = true;
|
||||
//static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("BroomEnd"), &m_bHover);
|
||||
//Visible(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CBroom_Circle::Race_Start(_int iCount)
|
||||
{
|
||||
m_iCount = iCount;
|
||||
//m_bTimer = true;
|
||||
m_bCountDown = true;
|
||||
m_bHover = false;
|
||||
m_fTime = 0.f;
|
||||
m_fDissolve = 0.f;
|
||||
m_fFontAlpha = 1.f;
|
||||
}
|
||||
|
||||
void CBroom_Circle::Set_Count(_int Count)
|
||||
{
|
||||
m_iCount = Count;
|
||||
}
|
||||
|
||||
void CBroom_Circle::Rece_Results()
|
||||
{
|
||||
Visible(true);
|
||||
}
|
||||
|
||||
CBroom_Circle* CBroom_Circle::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Circle* pInstance = new CBroom_Circle(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Circle");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Circle::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Circle* pInstance = new CBroom_Circle(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Circle");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Circle::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Circle::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,252 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Exit.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Exit::CBroom_Exit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Exit::CBroom_Exit(const CBroom_Exit& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Exit::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Exit::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = -400.f;
|
||||
Desc.fSizeX = 180.f;
|
||||
Desc.fSizeY = 60.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fFontX = 940.f;
|
||||
m_fFontY = 385.f;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Exit::Rece_Results()
|
||||
{
|
||||
Visible(true);
|
||||
}
|
||||
|
||||
void CBroom_Exit::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Exit::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fImagePosi = _float4(35.f, 17.f, 32.f, 32.f);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Exit::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Exit::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::UVMULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("나가기"), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Exit::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Exit::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_fImagePosi, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Exit::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Exit"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Keyboard_Space"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBroom_Exit* CBroom_Exit::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Exit* pInstance = new CBroom_Exit(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Exit");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Exit::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Exit* pInstance = new CBroom_Exit(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Finish");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Exit::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom1);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Exit::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,264 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Finish.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Finish::CBroom_Finish(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Finish::CBroom_Finish(const CBroom_Finish& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Finish::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Finish::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = -140.f;
|
||||
Desc.fSizeX = 1920.f;
|
||||
Desc.fSizeY = 1080.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
Set_Font();
|
||||
Visible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Finish::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Finish::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Finish::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Finish::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[0].c_str(), m_fFontPos[0]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[1], XMVectorSet(0.f, 1.f, 0.f, 1.f));
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[2].c_str(), m_fFontPos[2]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[3].c_str(), m_fFontPos[3]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[4].c_str(), m_fFontPos[4]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[5].c_str(), m_fFontPos[5]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[6].c_str(), m_fFontPos[6]);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Finish::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Finish::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Finish::Set_Font()
|
||||
{
|
||||
m_fFont[0] = TEXT("경주 시간");
|
||||
m_fFont[1] = TEXT("0:00:00");
|
||||
m_fFont[2] = TEXT("놓친 고리로 인한 패널티 X ");
|
||||
m_fFont[3] = TEXT("0");
|
||||
m_fFont[4] = TEXT("0:00:00");
|
||||
m_fFont[5] = TEXT("총 시간");
|
||||
m_fFont[6] = TEXT("0:00:00");
|
||||
|
||||
m_fFontPos[0] = _float2(m_fX + 700, m_fY + 600);
|
||||
m_fFontPos[1] = _float2(m_fX + 1100, m_fY + 600);
|
||||
m_fFontPos[2] = _float2(m_fX + 700, m_fY + 640);
|
||||
m_fFontPos[3] = _float2(m_fX + 1020, m_fY + 640);
|
||||
m_fFontPos[4] = _float2(m_fX + 1100, m_fY + 640);
|
||||
m_fFontPos[5] = _float2(m_fX + 700, m_fY + 700);
|
||||
m_fFontPos[6] = _float2(m_fX + 1100, m_fY + 700);
|
||||
}
|
||||
|
||||
void CBroom_Finish::Finish(_float fTime)
|
||||
{
|
||||
wchar_t szBuf[32] = {};
|
||||
|
||||
_int min = static_cast<_int>(fTime) / 60;
|
||||
_int sec = static_cast<_int>(fTime) % 60;
|
||||
_int ms = static_cast<_int>((fTime - static_cast<_int>(fTime)) * 100);
|
||||
|
||||
swprintf_s(szBuf, L"%02d:%02d:%02d", min, sec, ms);
|
||||
m_fFont[1] = szBuf;
|
||||
m_fFont[6] = szBuf;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Finish::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Finish"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBroom_Finish* CBroom_Finish::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Finish* pInstance = new CBroom_Finish(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Finish");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Finish::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Finish* pInstance = new CBroom_Finish(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Finish");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Finish::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Finish::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,265 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Flag.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Flag::CBroom_Flag(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Flag::CBroom_Flag(const CBroom_Flag& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Flag::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Flag::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 100.f;
|
||||
Desc.fSizeX = 437.5f;
|
||||
Desc.fSizeY = 160.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
m_fStart = 500.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Flag::Set_Start()
|
||||
{
|
||||
m_fSizeX = m_fOrigin_Size.x;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
|
||||
void CBroom_Flag::Set_Finish()
|
||||
{
|
||||
Visible(true);
|
||||
m_fFinish = true;
|
||||
}
|
||||
|
||||
void CBroom_Flag::Rece_Results()
|
||||
{
|
||||
Visible(true);
|
||||
}
|
||||
|
||||
void CBroom_Flag::Finish_SizeUp(_float fTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CBroom_Flag::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Flag::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bHover == true)
|
||||
{
|
||||
m_fSizeX -= fTimeDelta * m_fStart;
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;
|
||||
}
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bHover = false;
|
||||
m_fAlpha = 0.f;
|
||||
Visible(false);
|
||||
}
|
||||
|
||||
if (m_fFinish == true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Flag::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Flag::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::FLAGWAVE)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Flag::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Flag::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Flag::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_BRFlag"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBroom_Flag* CBroom_Flag::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Flag* pInstance = new CBroom_Flag(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Flag");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Flag::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Flag* pInstance = new CBroom_Flag(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Flag");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Flag::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Flag::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,271 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Broom_Flag.h"
|
||||
#include "Broom_Circle.h"
|
||||
#include "Broom_Scoreboard.h"
|
||||
#include "Broom_Finish.h"
|
||||
#include "Broom_Record.h"
|
||||
#include "Broom_Exit.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CBroom_Panel::CBroom_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Panel::CBroom_Panel(const CBroom_Panel& rhs)
|
||||
:CPanelObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 960.f;
|
||||
Desc.fY = -400.f;
|
||||
Desc.fSizeX = 1920.f;
|
||||
Desc.fSizeY = 700.f;
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Element(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pInfoInstance->Add_Event(TEXT("CurrentRing"), [this](void* p) {this->Current_Ring(); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Ready_Race"), [this](void* p) {this->Ready_Race(); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Race_Count"), [this](void* p) {this->Race_Count(*reinterpret_cast<_int*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Race_Start"), [this](void* p) {this->Race_Start(*reinterpret_cast<_int*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("RaceEnd"), [this](void* p) {this->Race_End(); });
|
||||
|
||||
Visible(false);
|
||||
ElementAllVisible(false);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
Set_BroomTimer();
|
||||
|
||||
if (m_bDinish == true)
|
||||
m_fTime += fTimeDelta;
|
||||
|
||||
if (m_fTime >= 1.f && m_bResults == false)
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
m_bDinish = false;
|
||||
Race_Results();
|
||||
}
|
||||
|
||||
if (m_bResults == true)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_ESCAPE))
|
||||
{
|
||||
m_fTime = 0.f;
|
||||
m_bDinish = false;
|
||||
m_bResults = false;
|
||||
ElementAllVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Panel::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Render()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Panel::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Flag>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Flag**>(&m_pBroom_Flag))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Flag"), m_pBroom_Flag);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Circle>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Circle**>(&m_pBroom_Circle))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Circle"), m_pBroom_Circle);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Scoreboard>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Scoreboard**>(&m_pBroom_Scoreboard))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Scoreboard"), m_pBroom_Scoreboard);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Finish>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Finish**>(&m_pBroom_Fiish))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Fiish"), m_pBroom_Fiish);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Record>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Record**>(&m_pBroom_Record))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Record"), m_pBroom_Record);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Exit>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_Exit**>(&m_pBroom_Exit))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Broom_Exit"), m_pBroom_Exit);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Panel::Ready_Race()
|
||||
{
|
||||
Visible(true);
|
||||
static_cast<CBroom_Circle*>(m_pBroom_Circle)->Visible(true);
|
||||
static_cast<CBroom_Flag*>(m_pBroom_Flag)->Visible(true);
|
||||
}
|
||||
|
||||
void CBroom_Panel::Race_Count(_int Count)
|
||||
{
|
||||
static_cast<CBroom_Circle*>(m_pBroom_Circle)->Race_Start(Count);
|
||||
static_cast<CBroom_Flag*>(m_pBroom_Flag)->Set_Start();
|
||||
}
|
||||
|
||||
void CBroom_Panel::Race_Start(_int iRing)
|
||||
{
|
||||
static_cast<CBroom_Flag*>(m_pBroom_Flag)->Set_Hover(true);
|
||||
static_cast<CBroom_Scoreboard*>(m_pBroom_Scoreboard)->Visible(true);
|
||||
static_cast<CBroom_Scoreboard*>(m_pBroom_Scoreboard)->Set_MaxRing(iRing);
|
||||
}
|
||||
|
||||
void CBroom_Panel::Current_Ring()
|
||||
{
|
||||
static_cast<CBroom_Scoreboard*>(m_pBroom_Scoreboard)->Set_CurrentRing();
|
||||
}
|
||||
|
||||
void CBroom_Panel::Race_End()
|
||||
{
|
||||
static_cast<CBroom_Scoreboard*>(m_pBroom_Scoreboard)->Visible(false);
|
||||
static_cast<CBroom_Finish*>(m_pBroom_Fiish)->Visible(true);
|
||||
static_cast<CBroom_Finish*>(m_pBroom_Fiish)->Finish(m_fRaceTime);
|
||||
static_cast<CBroom_Record*>(m_pBroom_Record)->Finish(m_fRaceTime);
|
||||
m_bDinish = true;
|
||||
}
|
||||
|
||||
void CBroom_Panel::Race_Results()
|
||||
{
|
||||
m_bResults = true;
|
||||
static_cast<CBroom_Circle*>(m_pBroom_Circle)->Rece_Results();
|
||||
static_cast<CBroom_Flag*>(m_pBroom_Flag)->Rece_Results();
|
||||
static_cast<CBroom_Record*>(m_pBroom_Record)->Rece_Results();
|
||||
static_cast<CBroom_Exit*>(m_pBroom_Exit)->Rece_Results();
|
||||
}
|
||||
|
||||
void CBroom_Panel::Set_BroomTimer()
|
||||
{
|
||||
m_fRaceTime = m_pInfoInstance->Get_Broom_Timer();
|
||||
static_cast<CBroom_Scoreboard*>(m_pBroom_Scoreboard)->Set_Timer(m_fRaceTime);
|
||||
}
|
||||
|
||||
CBroom_Panel* CBroom_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Panel* pInstance = new CBroom_Panel(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Panel::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Panel* pInstance = new CBroom_Panel(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Panel");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Panel::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,296 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Record.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Record::CBroom_Record(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Record::CBroom_Record(const CBroom_Record& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Record::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Record::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 120.f;
|
||||
Desc.fSizeX = 500.f;
|
||||
Desc.fSizeY = 150.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 10.f;
|
||||
m_fBaseTime = 15.f;
|
||||
Set_Font();
|
||||
Set_Best_Record(m_fBaseTime);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Record::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Record::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Record::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Record::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (m_bNewScore == false)
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[0].c_str(), m_fFontPos[0]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[1], m_fFontColor[0]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[2].c_str(), m_fFontPos[2]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[3].c_str(), m_fFontPos[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[4].c_str(), m_fFontPos[4], m_fFontColor[1]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_fFont[1].c_str(), m_fFontPos[5]);
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_Record::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Record::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Record::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Broom_Record"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Record::Set_Font()
|
||||
{
|
||||
m_fFont[0] = TEXT("내 기록");
|
||||
m_fFont[1] = TEXT("0:00:00");
|
||||
m_fFont[2] = TEXT("최고 기록");
|
||||
m_fFont[3] = TEXT("0:00:00");
|
||||
m_fFont[4] = TEXT("새 최고 기록");
|
||||
|
||||
m_fFontPos[0] = _float2(m_fX + 820.f, m_fY + 140.f);
|
||||
m_fFontPos[1] = _float2(m_fX + 810.f, m_fY + 180.f);
|
||||
m_fFontPos[2] = _float2(m_fX + 1005.f, m_fY + 140.f);
|
||||
m_fFontPos[3] = _float2(m_fX + 1010.f, m_fY + 180.f);
|
||||
m_fFontPos[4] = _float2(m_fX + 880, m_fY + 140.f);
|
||||
m_fFontPos[5] = _float2(m_fX + 900, m_fY + 180.f);
|
||||
|
||||
m_fFontColor[0] = XMVectorSet(0.f, 1.f, 0.f, 1.f);
|
||||
m_fFontColor[1] = XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha);
|
||||
|
||||
}
|
||||
|
||||
void CBroom_Record::Set_Best_Record(_float fTime)
|
||||
{
|
||||
|
||||
wchar_t szBuf[32] = {};
|
||||
|
||||
_int min = static_cast<_int>(fTime) / 60;
|
||||
_int sec = static_cast<_int>(fTime) % 60;
|
||||
_int ms = static_cast<_int>((fTime - static_cast<_int>(fTime)) * 100);
|
||||
|
||||
swprintf_s(szBuf, L"%02d:%02d:%02d", min, sec, ms);
|
||||
|
||||
m_fFont[3] = szBuf;
|
||||
}
|
||||
|
||||
void CBroom_Record::Rece_Results()
|
||||
{
|
||||
Visible(true);
|
||||
}
|
||||
|
||||
void CBroom_Record::Finish(_float fTime)
|
||||
{
|
||||
if (m_fBaseTime > fTime)
|
||||
m_bNewScore = true;
|
||||
else
|
||||
m_bNewScore = false;
|
||||
|
||||
wchar_t szBuf[32] = {};
|
||||
|
||||
_int min = static_cast<_int>(fTime) / 60;
|
||||
_int sec = static_cast<_int>(fTime) % 60;
|
||||
_int ms = static_cast<_int>((fTime - static_cast<_int>(fTime)) * 100);
|
||||
|
||||
swprintf_s(szBuf, L"%02d:%02d:%02d", min, sec, ms);
|
||||
m_fFont[1] = szBuf;
|
||||
}
|
||||
|
||||
CBroom_Record* CBroom_Record::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Record* pInstance = new CBroom_Record(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Record");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Record::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Record* pInstance = new CBroom_Record(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Record");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Record::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Record::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,287 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_Scoreboard.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CBroom_Scoreboard::CBroom_Scoreboard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_Scoreboard::CBroom_Scoreboard(const CBroom_Scoreboard& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_Scoreboard::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Scoreboard::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 300.f;
|
||||
Desc.fSizeX = 512.f;
|
||||
Desc.fSizeY = 132.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 1.f;
|
||||
m_fFontX = 900.f;
|
||||
m_fFontY = 900.f;
|
||||
m_iCurrentRing = 0;
|
||||
Set_Setting();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 1.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 1.f;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CBroom_Scoreboard::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[0].c_str(), m_fFontPosition[0], m_fColor[1]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[1].c_str(), m_fFontPosition[1], m_fColor[1]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[2].c_str(), m_fFontPosition[2], m_fColor[3]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), Score[3].c_str(), m_fFontPosition[3], m_fColor[0]);
|
||||
m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[4].c_str(), m_fFontPosition[4], m_fColor[0]);
|
||||
m_pGameInstance->Render_Text(TEXT("UI_size25"), Score[5].c_str(), m_fFontPosition[5], m_fColor[3]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[6].c_str(), m_fFontPosition[6], m_fColor[2]);
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size25"), Score[7].c_str(), m_fFontPosition[7], m_fColor[0]);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Set_Setting()
|
||||
{
|
||||
m_fColor[0] = XMVectorSet(1.f, 1.f, 1.f, 1.f);
|
||||
m_fColor[1] = XMVectorSet(0.5f, 0.5f, 0.5f, 1.f);
|
||||
m_fColor[2] = XMVectorSet(0.f, 1.f, 0.f, 1.f);
|
||||
m_fColor[3] = XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha);
|
||||
|
||||
Score[0] = TEXT("내 기록");
|
||||
Score[1] = TEXT("최고 기록");
|
||||
Score[2] = TEXT("게이트");
|
||||
Score[3] = TEXT("/");
|
||||
Score[4] = TEXT("0");
|
||||
Score[5] = TEXT("29");
|
||||
Score[6] = TEXT("0:00:00");
|
||||
Score[7] = TEXT("0:00:00");
|
||||
|
||||
m_fFontPosition[0] = _float2(m_fX + 770, m_fY - 245.f);
|
||||
m_fFontPosition[1] = _float2(m_fX + 1050, m_fY - 245.f);
|
||||
m_fFontPosition[2] = _float2(m_fX + 918, m_fY - 195.f);
|
||||
m_fFontPosition[3] = _float2(m_fX + 947.5f, m_fY - 225.f);
|
||||
m_fFontPosition[4] = _float2(m_fX + 920, m_fY - 230.f);
|
||||
m_fFontPosition[5] = _float2(m_fX + 965, m_fY - 230.f);
|
||||
m_fFontPosition[6] = _float2(m_fX + 740, m_fY - 215.f);
|
||||
m_fFontPosition[7] = _float2(m_fX + 1045, m_fY - 215.f);
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Set_MaxRing(_int iMaxRing)
|
||||
{
|
||||
Score[5] = to_wstring(iMaxRing);
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Set_CurrentRing()
|
||||
{
|
||||
m_iCurrentRing++;
|
||||
Score[4] = to_wstring(m_iCurrentRing);
|
||||
m_fCurreentRingFontSize = (m_pGameInstance->FontSizeX(TEXT("UI_size25"), Score[4].c_str()) - 22.f) * 0.5f;
|
||||
m_fFontPosition[4] = _float2(m_fX + 920 - m_fCurreentRingFontSize, m_fY - 230.f);
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Set_Timer(_float fTimer)
|
||||
{
|
||||
wchar_t szBuf[32] = {};
|
||||
|
||||
_int min = static_cast<_int>(fTimer) / 60;
|
||||
_int sec = static_cast<_int>(fTimer) % 60;
|
||||
_int ms = static_cast<_int>((fTimer - static_cast<_int>(fTimer)) * 100);
|
||||
|
||||
swprintf_s(szBuf, L"%02d:%02d:%02d", min, sec, ms);
|
||||
Score[6] = szBuf;
|
||||
}
|
||||
|
||||
_vector CBroom_Scoreboard::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CBroom_Scoreboard::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_Scoreboard::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Scoreboard"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CBroom_Scoreboard* CBroom_Scoreboard::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_Scoreboard* pInstance = new CBroom_Scoreboard(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_Scoreboard");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_Scoreboard::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_Scoreboard* pInstance = new CBroom_Scoreboard(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_Scoreboard");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_Scoreboard::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_Scoreboard::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -0,0 +1,211 @@
|
||||
#include "pch.h"
|
||||
#include "Broom_TargetGate.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CBroom_TargetGate::CBroom_TargetGate(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CBroom_TargetGate::CBroom_TargetGate(const CBroom_TargetGate& rhs)
|
||||
: CGameObject(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CBroom_TargetGate::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_TargetGate::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fSize = _float3(1.f, 1.f, 1.f);
|
||||
m_fAlpha = 1.f;
|
||||
m_fViewPort = _float2(_float(g_iWinSizeX), _float(g_iWinSizeY));
|
||||
m_fFontSize = 0.f;
|
||||
|
||||
m_pInfoInstance->Add_Event(TEXT("BroomTargetGate"), [this](void* p) {this->Set_TargetPosition(*reinterpret_cast<_vector*>(p)); });
|
||||
m_pInfoInstance->Add_Event(TEXT("Race_Start"), [this](void* p) {this->Visibie(); });
|
||||
m_bVisible = false;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible != true)
|
||||
return;
|
||||
|
||||
m_fSize = _float3(45.f, 45.f, 1.f);
|
||||
m_vPlayerPos = m_pInfoInstance->Get_PalyerPos();
|
||||
if (m_vActive == true)
|
||||
{
|
||||
m_Distance = to_wstring(_int(floor(XMVectorGetX(XMVector3Length(XMVectorSubtract(m_vTargetPos, m_vPlayerPos))))));
|
||||
}
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible != true)
|
||||
return;
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
|
||||
HRESULT CBroom_TargetGate::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BROOMTARGETGATE)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_vector Pos = XMVectorAdd(m_vTargetPos, XMVectorSet(0.f, -3.f, 0.f, 0.f));
|
||||
|
||||
m_pGameInstance->Perspective_Render_Text(m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW),
|
||||
m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ),
|
||||
TEXT("UI_size20"),
|
||||
m_Distance.c_str(),
|
||||
Pos);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CBroom_TargetGate::Get_WorldPostion()
|
||||
{
|
||||
return m_pOwner->Get_WorldPostion();
|
||||
}
|
||||
|
||||
HRESULT CBroom_TargetGate::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr())))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_CamaraPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float3))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_fSize, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fViewport", &m_fViewPort, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CBroom_TargetGate::Ready_Components()
|
||||
{
|
||||
__super::Ready_Components(nullptr);
|
||||
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_Map_RaceGate"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Set_TargetPosition(_vector TargetPos)
|
||||
{
|
||||
m_vTargetPos = TargetPos;
|
||||
m_pTransformCom->Set_State(STATE::POSITION, m_vTargetPos);
|
||||
m_vActive = true;
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Visibie()
|
||||
{
|
||||
m_bVisible = !m_bVisible;
|
||||
}
|
||||
|
||||
CBroom_TargetGate* CBroom_TargetGate::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CBroom_TargetGate* pInstance = new CBroom_TargetGate(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CBroom_TargetGate");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CBroom_TargetGate::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CBroom_TargetGate* pInstance = new CBroom_TargetGate(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CBroom_TargetGate");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CBroom_TargetGate::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CBroom_TargetGate::Describe_Entity()
|
||||
{
|
||||
}
|
||||
#endif // _DEBUG
|
||||
@@ -1,246 +0,0 @@
|
||||
#include "pch.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "Shader.h"
|
||||
#include "Layer.h"
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
CCamera_Model::CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CCamera(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCamera_Model::CCamera_Model(const CCamera_Model& rhs)
|
||||
: CCamera(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
void CCamera_Model::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_MODEL, false);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
|
||||
return;
|
||||
}
|
||||
//Transition(fTimeDelta);
|
||||
_float3 vCamPos = {};
|
||||
_float3 vSetPos = {};
|
||||
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
|
||||
#ifdef _DEBUG
|
||||
GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
|
||||
#endif // _DEBUG
|
||||
|
||||
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
|
||||
m_bMovable = !m_bMovable;
|
||||
}
|
||||
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
|
||||
m_pGameInstance->Toggle_MouseCenter();
|
||||
}
|
||||
|
||||
__super::Bind_Matrices();
|
||||
}
|
||||
|
||||
void CCamera_Model::Update(_float fTimeDelta)
|
||||
{
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CCamera_Model::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
/*if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
|
||||
return;
|
||||
}*/
|
||||
|
||||
auto M = m_pModelCom->Get_BoneMatrix("lookat_target");
|
||||
GUI::Text("Bone T: %.3f %.3f %.3f", M.r[3].m128_f32[0], M.r[3].m128_f32[1], M.r[3].m128_f32[2]);
|
||||
|
||||
|
||||
_vector vTargetPos = m_pModelCom->Get_BoneMatrix("lookat_target").r[3];
|
||||
|
||||
m_pTransformCom->LookAt(
|
||||
XMVectorSetW(vTargetPos, 1.f)
|
||||
);
|
||||
|
||||
// m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Initialize(void* pArg)
|
||||
{
|
||||
CAMERA_MODEL_DESC* pDesc = static_cast<CAMERA_MODEL_DESC*>(pArg);
|
||||
|
||||
if (FAILED(__super::Initialize(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f));
|
||||
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
|
||||
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
|
||||
m_bActive = true;
|
||||
|
||||
|
||||
m_pModelCom->Set_Temp(true);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
|
||||
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
|
||||
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCamera_Model::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifdef 기무리
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
#endif // 기무리
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCamera_Model::Set_InitialPos()
|
||||
{
|
||||
m_pTransformCom->Set_WorldMatrix(m_matInitial);
|
||||
}
|
||||
|
||||
CCamera_Model* CCamera_Model::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCamera_Model* pInstance = new CCamera_Model(pDevice, pContext);
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCamera_Model");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCamera_Model::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCamera_Model* pInstance = new CCamera_Model(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CCamera_Model");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCamera_Model::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pModelCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CCamera_Model::Describe_Entity()
|
||||
{
|
||||
_float3 vPosition = {};
|
||||
GUI::Begin("CameraAnim List");
|
||||
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
|
||||
{
|
||||
if (GUI::Button(m_pModelCom->Get_AnimList(i)))
|
||||
{
|
||||
m_pModelCom->Set_AnimationIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -84,7 +84,7 @@ HRESULT CDialogue_Font::Render()
|
||||
|
||||
_vector CDialogue_Font::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
return _vector();
|
||||
}
|
||||
|
||||
HRESULT CDialogue_Font::Bind_ShaderResources()
|
||||
|
||||
@@ -207,7 +207,8 @@ HRESULT CEffectObject::Render_Bloom()
|
||||
|
||||
SHADER_PASS_INSTANCE_MODEL BloomPass = {};
|
||||
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD)
|
||||
if (m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NON_WORLD || m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::BLEND_NOWORLD
|
||||
|| m_EffectInfo.eShaderPass == SHADER_PASS_INSTANCE_MODEL::NONWB_NONPOS)
|
||||
{
|
||||
BloomPass = SHADER_PASS_INSTANCE_MODEL::BLOOM_NOWORLD;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "Avadakedavra.h"
|
||||
#include "Ranrok_FireBall.h"
|
||||
#include "Ranrok_Breath.h"
|
||||
#include "Ranrok_Point.h"
|
||||
|
||||
|
||||
CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
@@ -582,8 +583,17 @@ HRESULT CEffectPool::Ready_MonsterEffect()
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(Create_Effect(SKILL_TYPE::RANROK_POINT, 5, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* {
|
||||
|
||||
CRanrok_Point* pEffect = nullptr;
|
||||
|
||||
pEffect = m_pGameInstance->Clone_Prototype<CRanrok_Point>(iPrototypeLevel, nullptr);
|
||||
|
||||
return pEffect; }
|
||||
|
||||
))) return E_FAIL;
|
||||
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -605,7 +615,7 @@ HRESULT CEffectPool::Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPr
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg)
|
||||
HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg, CEffect_Container** ppOut)
|
||||
{
|
||||
if (pOwner == nullptr)
|
||||
return S_OK;
|
||||
@@ -620,6 +630,11 @@ HRESULT CEffectPool::Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg
|
||||
m_ActiveEffectList.push_back(pSkill);
|
||||
Safe_AddRef(pSkill);
|
||||
|
||||
if (nullptr != ppOut) {
|
||||
*ppOut = pSkill;
|
||||
SAFE_ADDREF(pSkill);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
|
||||
|
||||
size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (iPos != std::string::npos)
|
||||
if (iPos != string::npos)
|
||||
{
|
||||
strExt += strEffectPath.substr(iPos + 1);
|
||||
strEffectName = strEffectPath.substr(0, iPos);
|
||||
@@ -146,7 +146,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
|
||||
|
||||
size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색
|
||||
|
||||
if (pos != std::string::npos)
|
||||
if (pos != string::npos)
|
||||
strEffectName = strEffectName.substr(pos + 1);
|
||||
|
||||
if (!strcmp(strExt.c_str(), "trail"))
|
||||
@@ -569,10 +569,28 @@ HRESULT CEffect_Container::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
m_isCollisionEnter = false;
|
||||
|
||||
m_bHit = false;
|
||||
m_isStop = false;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void CEffect_Container::Setting_Pos(_fvector vPos)
|
||||
{
|
||||
for (auto& iter : m_PartObjects)
|
||||
{
|
||||
CTransform* pTransform = iter.second->Get_Component<CTransform>();
|
||||
|
||||
if (pTransform == nullptr)
|
||||
continue;
|
||||
|
||||
pTransform->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
m_isStop = true;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CEffect_Container::Ready_Components(void* pArg)
|
||||
{
|
||||
CTransform::TRANSFORM_DESC TransformDesc = {};
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Action_Panel.h"
|
||||
#include "Enemy_Panel.h"
|
||||
//#include "Mouse_Cursor.h"
|
||||
#include "Broom_Panel.h"
|
||||
|
||||
CGamePlay_Canvas::CGamePlay_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CCanvasObject(pDevice, pContext)
|
||||
@@ -118,6 +119,11 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
|
||||
}
|
||||
Add_Panel(TEXT("Enemy_Panel"), m_pEnemy_Panel);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CBroom_Panel**>(&m_pBroom_Panel))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Broom_Panel"), m_pBroom_Panel);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -229,8 +229,9 @@ HRESULT CGoblin_Assassin::Render_OutLine()
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.01f, 0.1f, fRatio);
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.024f, 0.5f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -68,10 +68,11 @@ HRESULT CGoblin_Mage::Initialize(void* pArg)
|
||||
m_pCharacter_Controller->Set_Position(XMVectorSet(-52.f, 0.f, -4.f, 1.f));
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(-52.f, 0.f, -4.f, 1.f));
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if 진우
|
||||
m_isDebugMode = true;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -162,7 +163,6 @@ void CGoblin_Mage::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CGoblin_Mage::Render()
|
||||
{
|
||||
|
||||
if (!m_bVisible)
|
||||
return S_OK;
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
|
||||
@@ -64,6 +64,16 @@ void CInfoInstance::Set_Damage(_float fDamage)
|
||||
m_pSkillInfo->Update_Damage(fDamage);
|
||||
}
|
||||
|
||||
_vector CInfoInstance::Get_PalyerPos()
|
||||
{
|
||||
return m_pPlayerPos;
|
||||
}
|
||||
|
||||
void CInfoInstance::Set_PlayerPos(_vector Position)
|
||||
{
|
||||
m_pPlayerPos = Position;
|
||||
}
|
||||
|
||||
#pragma region MONSTER_INFO
|
||||
HRESULT CInfoInstance::Regist_PlayerAlly(CUnit* pUnit)
|
||||
{
|
||||
@@ -343,6 +353,16 @@ HRESULT CInfoInstance::ActiveAt_Interactive(_fvector vPosition)
|
||||
return m_pInteractiveInfo->ActiveAt_Interactive(vPosition);
|
||||
}
|
||||
|
||||
void CInfoInstance::Set_Broom_Timer(_float fTimer)
|
||||
{
|
||||
m_fBroom_Timer = fTimer;
|
||||
}
|
||||
|
||||
_float CInfoInstance::Get_Broom_Timer()
|
||||
{
|
||||
return m_fBroom_Timer;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
LEVEL CInfoInstance::Get_RestartLevel()
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include "Level_Loading.h"
|
||||
#include "Light_Main.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "UI_Manager.h"
|
||||
#include "Layer.h"
|
||||
@@ -42,6 +41,7 @@ CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
|
||||
|
||||
HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
// 낮, 밤 설정
|
||||
#ifdef gimch
|
||||
m_isDay = false;
|
||||
@@ -58,6 +58,8 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
|
||||
#ifdef 인혁
|
||||
m_isDay = true;
|
||||
#endif //
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
if (FAILED(Ready_Lights())) {
|
||||
return E_FAIL;
|
||||
@@ -311,6 +313,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
_bool isReady_Background = { true };
|
||||
_bool isReady_Hogsmeade = { true };
|
||||
_bool isReady_Hogwart = { true };
|
||||
#ifdef _DEBUG
|
||||
|
||||
#ifdef gimch
|
||||
isReady_Background = true;
|
||||
@@ -337,6 +340,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
/* Map Containters */
|
||||
@@ -654,7 +659,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = true;
|
||||
isLoad_NPC = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
@@ -738,7 +743,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Monster = true;
|
||||
isLoad_Monster = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "CamPosition_Socket.h"
|
||||
#include "CamPosition_Target.h"
|
||||
#include "CamPosition_AI.h"
|
||||
#include "Camera_Model.h"
|
||||
#include "SkyBox.h"
|
||||
#include "Troll_Weapon.h"
|
||||
#include "Troll_Rock.h"
|
||||
@@ -133,6 +132,15 @@
|
||||
#include "SpellLearn_Slot.h"
|
||||
#include "SpellLearn_Overlay.h"
|
||||
|
||||
#include "Broom_Panel.h"
|
||||
#include "Broom_Flag.h"
|
||||
#include "Broom_Circle.h"
|
||||
#include "Broom_Scoreboard.h"
|
||||
#include "Broom_TargetGate.h"
|
||||
#include "Broom_Finish.h"
|
||||
#include "Broom_Record.h"
|
||||
#include "Broom_Exit.h"
|
||||
|
||||
#include "Interaction_Key.h"
|
||||
|
||||
#include "NPCInteraction.h"
|
||||
@@ -185,6 +193,7 @@
|
||||
#include "MageSide.h"
|
||||
#include "Ranrok_FireBall.h"
|
||||
#include "Ranrok_Breath.h"
|
||||
#include "Ranrok_Point.h"
|
||||
|
||||
#include "StunEffect.h"
|
||||
#include "Box_Splesh.h"
|
||||
@@ -355,7 +364,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
|
||||
|
||||
_bool isLoad_Background = { true };
|
||||
_bool isLoad_Hogwart = { false };
|
||||
_bool isLoad_Hogwart = { true };
|
||||
_bool isLoad_UI_SEQUANTIAL = { true };
|
||||
_bool isLoad_NPC = { true };
|
||||
_bool isLoad_Monster = { true };
|
||||
@@ -375,8 +384,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Monster = true;
|
||||
isLoad_NPC = false;
|
||||
isLoad_Monster = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
@@ -1226,6 +1235,24 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
|
||||
});
|
||||
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/BroomFlight", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Item"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/GadgetWheel/Item%d.png"), 8)))) {
|
||||
return E_FAIL;
|
||||
@@ -1239,6 +1266,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#pragma region UI_ANI
|
||||
if (true == isLoad_UI_SEQUANTIAL) {
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
|
||||
{
|
||||
@@ -2099,7 +2127,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CRanrok_Point>(g_iStaticLevel, CRanrok_Point::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin_Teleport>(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
@@ -2493,6 +2524,47 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Panel*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Panel>(g_iStaticLevel, CBroom_Panel::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Flag*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Flag>(g_iStaticLevel, CBroom_Flag::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Circle*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Circle>(g_iStaticLevel, CBroom_Circle::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Scoreboard*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Scoreboard>(g_iStaticLevel, CBroom_Scoreboard::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_TargetGate*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_TargetGate>(g_iStaticLevel, CBroom_TargetGate::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Fiish*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Finish>(g_iStaticLevel, CBroom_Finish::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Record*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Record>(g_iStaticLevel, CBroom_Record::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
/* For.Prototype_GameObject_SpellLearn_Broom_Exit*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CBroom_Exit>(g_iStaticLevel, CBroom_Exit::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* For.Prototype_GameObject_Interaction_Key*/
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CInteraction_Key>(g_iStaticLevel, CInteraction_Key::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
@@ -2877,10 +2949,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Arm>(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Camera_Model */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Model>(g_iStaticLevel, CCamera_Model::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
/* For.Prototype_GameObject_Wand */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -122,11 +122,27 @@ HRESULT CMainApp::Ready_Default_Setting()
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size23"), TEXT("../Bin/Resources/Fonts/Font_size23.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size25"), TEXT("../Bin/Resources/Fonts/Font_size25.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size15"), TEXT("../Bin/Resources/Fonts/UI_size15.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size20"), TEXT("../Bin/Resources/Fonts/UI_size20.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size25"), TEXT("../Bin/Resources/Fonts/UI_size25.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size50"), TEXT("../Bin/Resources/Fonts/UI_size50.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Font(TEXT("UI_size70"), TEXT("../Bin/Resources/Fonts/UI_size70.spritefont"))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -298,9 +298,9 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
|
||||
|
||||
void CMapElement_Door::Free()
|
||||
{
|
||||
if (nullptr != m_pRigidBody) {
|
||||
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
}
|
||||
//if (nullptr != m_pRigidBody) {
|
||||
// m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
|
||||
//}
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
|
||||
@@ -285,8 +285,9 @@ HRESULT CMapElement_Interactable::Render_OutLine()
|
||||
#endif // _DEBUG
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.07f, 0.15f, fRatio);
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(1.5f, 2.f, fRatio);
|
||||
if (m_fOutLineThickness > 0.15f) {
|
||||
m_fOutLineThickness = 0.15f;
|
||||
}
|
||||
|
||||
@@ -395,10 +395,6 @@ HRESULT CMapInfo::Load_LightElements(const _char* pFileName, const _wchar* pLaye
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Light>(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc)))
|
||||
return E_FAIL;
|
||||
}
|
||||
#ifndef 기무리
|
||||
//MSG_BOX("Successed to Load File");
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,9 +114,11 @@ HRESULT CMonster::Render_OutLine()
|
||||
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.5f, 3.f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -136,10 +138,16 @@ HRESULT CMonster::Render_OutLine()
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
{
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -148,6 +156,9 @@ HRESULT CMonster::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ void CNPCInteraction::NpcInfo(_wstring Name)
|
||||
|
||||
void CNPCInteraction::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
_vector MonsterPos = static_cast<CUnit*>(m_pOwner)->Get_WorldPostion();
|
||||
|
||||
_float fOffsetX = 0.5f; // 적절한 X 오프셋 값 (몬스터 머리 옆으로 올리기 위함)
|
||||
@@ -126,7 +125,6 @@ void CNPCInteraction::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible != true)
|
||||
return;
|
||||
Set_ImageSizePosition();
|
||||
}
|
||||
|
||||
void CNPCInteraction::Late_Update(_float fTimeDelta)
|
||||
|
||||
@@ -1,37 +1,22 @@
|
||||
#include "pch.h"
|
||||
#include "Player.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "CamPosition_Socket.h"
|
||||
#include "Camera_Gaze.h"
|
||||
#include "CamPosition_Arm.h"
|
||||
#include "Wand.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "Broom.h"
|
||||
#include "BroomRaceManager.h"
|
||||
#include "CallBack_Playable_Behavior.h"
|
||||
#include "CallBack_Playable_HitReport.h"
|
||||
#include "Monster.h"
|
||||
#include "Broom.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "BroomRaceManager.h"
|
||||
#include "RaceRing.h"
|
||||
#include "PlayerRobe.h"
|
||||
|
||||
#pragma region STATE
|
||||
#include "State_Idle.h"
|
||||
#include "State_Dodge.h"
|
||||
#include "State_Jump.h"
|
||||
#include "State_Land.h"
|
||||
#include "State_Move.h"
|
||||
#include "State_Combat.h"
|
||||
#include "State_Hit.h"
|
||||
#include "State_Broom_Ride.h"
|
||||
#pragma endregion
|
||||
|
||||
#include "Layer.h"
|
||||
#include "CamPosition_Shoulder.h"
|
||||
#include "Character_Controller.h"
|
||||
#include "EffectPool.h"
|
||||
#include "GameInstance.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Item_Potion.h"
|
||||
#include "Layer.h"
|
||||
#include "MapElement_Interactable.h"
|
||||
#include "Monster.h"
|
||||
#include "PlayerRobe.h"
|
||||
#include "RaceRing.h"
|
||||
#include "Wand.h"
|
||||
|
||||
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CUnit(pDevice, pContext)
|
||||
@@ -159,7 +144,7 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem(fTimeDelta);
|
||||
UpdateGrapInteractive(fTimeDelta);
|
||||
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
Play_SpellHitAnim();
|
||||
@@ -167,8 +152,8 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
|
||||
|
||||
Play_Event();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
@@ -185,8 +170,11 @@ __super::Update(fTimeDelta);
|
||||
if (m_pGameInstance->Mouse_Up(DIM_RBUTTON))
|
||||
{
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_UP));
|
||||
m_bAim = false;
|
||||
m_bAim = false;
|
||||
}
|
||||
|
||||
m_pInfoInstance->Set_PlayerPos(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
|
||||
}
|
||||
|
||||
void CPlayer::Late_Update(_float fTimeDelta)
|
||||
@@ -231,30 +219,32 @@ void CPlayer::Late_Update(_float fTimeDelta)
|
||||
m_pTransformCom->Set_State(STATE::LOOK, look);
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//#ifdef 기무리
|
||||
// if (nullptr == m_pRobePart) {
|
||||
// {
|
||||
// CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
// Desc.pModel = m_pModelCom;
|
||||
// Desc.pParentTransform = m_pTransformCom;
|
||||
// Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
|
||||
// if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
// assert(false);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//#endif // 기무리
|
||||
#ifdef 기무리
|
||||
if (nullptr == m_pRobePart) {
|
||||
{
|
||||
CPlayerRobe::PlayerRobe_DESC Desc{};
|
||||
Desc.pModel = m_pModelCom;
|
||||
Desc.pParentTransform = m_pTransformCom;
|
||||
Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
|
||||
if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // 기무리
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayer::Render()
|
||||
{
|
||||
if (!m_bVisible){
|
||||
if (!m_bVisible) {
|
||||
return S_OK;
|
||||
}
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_float fIntensity = 0.f;
|
||||
m_pShaderCom->Bind_RawValue("g_fMBIntensity", &fIntensity, sizeof(_float));
|
||||
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
|
||||
if (RENDER::NONBLEND == eType) {
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
@@ -264,7 +254,14 @@ HRESULT CPlayer::Render()
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
//#ifdef _DEBUG
|
||||
//#ifdef 기무리
|
||||
// if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//#endif // 기무리
|
||||
//#endif // _DEBUG
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
@@ -273,6 +270,9 @@ HRESULT CPlayer::Render()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -280,16 +280,16 @@ HRESULT CPlayer::Render()
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
if (FAILED(Bind_ShaderParameters(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
Render_CameraCoordinateSystem();
|
||||
//m_pCharacter_Controller->Render();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
if (RENDER::NONLIGHT == eType) {
|
||||
@@ -406,56 +406,20 @@ void CPlayer::Start_CameraShake(_float fTime, _float fIntense)
|
||||
m_bCameraShake = true;
|
||||
}
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
|
||||
void CPlayer::Set_RaceRing(CRaceRing* pRaceRing)
|
||||
{
|
||||
m_Batch->Begin();
|
||||
|
||||
const _float fArrowLength = 2.0f;
|
||||
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
|
||||
|
||||
|
||||
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
|
||||
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
_float fButtonSize = 45.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
|
||||
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##8", { fButtonSize, fButtonSize });
|
||||
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
|
||||
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
|
||||
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
|
||||
//D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z })
|
||||
if (m_pRaceRing != pRaceRing)
|
||||
{
|
||||
_vector TargetPos = pRaceRing->Get_WorldPostion();
|
||||
m_pInfoInstance->Event_CallBack(TEXT("BroomTargetGate"), &TargetPos);
|
||||
}
|
||||
GUI::End();
|
||||
m_Batch->DrawLine( // W
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
|
||||
);
|
||||
m_Batch->DrawLine( // D
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength* XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
|
||||
);
|
||||
m_Batch->DrawLine( // PlayerLook
|
||||
VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength* xmvLook, DirectX::Colors::HotPink)
|
||||
);
|
||||
m_Batch->End();
|
||||
SAFE_RELEASE(m_pRaceRing);
|
||||
m_pRaceRing = pRaceRing;
|
||||
SAFE_ADDREF(m_pRaceRing);
|
||||
}
|
||||
|
||||
|
||||
HRESULT CPlayer::Ready_Components()
|
||||
{
|
||||
CTransform::TRANSFORM_DESC Desc = {};
|
||||
@@ -563,7 +527,7 @@ HRESULT CPlayer::Ready_Parts()
|
||||
}
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, nullptr, this,&m_pBroom))) {
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom>(g_iStaticLevel, NEXT_LEVEL, LAYER_ITEM, nullptr, this, &m_pBroom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -632,6 +596,21 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
fMixerFactor = 0.658333f;
|
||||
iColorMixerMethod = 1;
|
||||
break;
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
case PLAYER_MESH_ORDER::ROBE_CLOTH:
|
||||
if (FAILED(m_pModelCom->Bind_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_pShaderCom, "g_BoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (nullptr != m_pRobePart) {
|
||||
if (FAILED(m_pRobePart->Bind_PrevBoneMatrices(m_pShaderCom, "g_PrevBoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif // _DEBUG
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -672,8 +651,8 @@ void CPlayer::SetGravity()
|
||||
{
|
||||
PSX::PxControllerCollisionFlags eCollisionFlags = m_pCharacter_Controller->Get_CollisionFlags();
|
||||
eCollisionFlags;
|
||||
if ( false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
|
||||
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
|
||||
if (false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_DOWN)
|
||||
&& false == eCollisionFlags.isSet(PSX::PxControllerCollisionFlag::Enum::eCOLLISION_SIDES)) {
|
||||
if (false == m_pFSM->IsEnable(FSMSTATE::JUMP)) { // 벽에 닿지 않았는데 점프 중이 아닐 땐 중력 on
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
@@ -697,7 +676,7 @@ void CPlayer::Update_CameraCoordinateSystem(_float fTimeDelta)
|
||||
}
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
{
|
||||
CWand* pWand = Get_PartObject<CWand>();
|
||||
|
||||
if (pWand == nullptr)
|
||||
@@ -763,11 +742,64 @@ void CPlayer::Free()
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CPlayer::Render_CameraCoordinateSystem()
|
||||
{
|
||||
m_Batch->Begin();
|
||||
|
||||
const _float fArrowLength = 2.0f;
|
||||
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
|
||||
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
|
||||
|
||||
|
||||
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
|
||||
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
|
||||
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
|
||||
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
|
||||
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
|
||||
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
|
||||
|
||||
_float fButtonSize = 45.f;
|
||||
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##2", { fButtonSize, fButtonSize });
|
||||
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
|
||||
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
|
||||
GUI::Button("##8", { fButtonSize, fButtonSize });
|
||||
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
|
||||
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
|
||||
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
|
||||
//D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z })
|
||||
}
|
||||
GUI::End();
|
||||
m_Batch->DrawLine( // W
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
|
||||
);
|
||||
m_Batch->DrawLine( // D
|
||||
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
|
||||
);
|
||||
m_Batch->DrawLine( // PlayerLook
|
||||
VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite),
|
||||
VertexPositionColor(fArrowLength * xmvLook, DirectX::Colors::HotPink)
|
||||
);
|
||||
m_Batch->End();
|
||||
}
|
||||
void CPlayer::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
if (GUI::CollapsingHeader("PLAYER_DESC")) {
|
||||
if (true == GUI::Button("ShaderRefresh")) {
|
||||
m_pShaderCom->Shader_Refresh();
|
||||
}
|
||||
m_pCharacter_Controller->Describe_Entity();
|
||||
_float4 vMomentum = {};
|
||||
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
|
||||
|
||||
@@ -19,14 +19,16 @@ void CPlayerRobe::Update(_float fTimeDelta)
|
||||
{
|
||||
_matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) *
|
||||
XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
|
||||
|
||||
m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false);
|
||||
m_pRobeMainAnchor->Get_Actor()->wakeUp();
|
||||
|
||||
Update_LegsPosition();
|
||||
Update_RobeSocketPosition();
|
||||
}
|
||||
|
||||
void CPlayerRobe::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
Update_RobeSocketPosition();
|
||||
#ifdef _DEBUG
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
PSX::PxConstraintFlags pxConstraintFlags = m_pDynamicJoints[i]->getConstraintFlags();
|
||||
@@ -41,7 +43,9 @@ void CPlayerRobe::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CPlayerRobe::Render()
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Render_BonePhysX();
|
||||
#endif // _DEBUG
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -54,21 +58,31 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
|
||||
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], WorldMatrix * OwnerInvWorldMatrix);
|
||||
_fmatrix LocalMatrix = WorldMatrix* OwnerInvWorldMatrix;
|
||||
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], LocalMatrix);
|
||||
m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], LocalMatrix);
|
||||
}
|
||||
}
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
|
||||
m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
|
||||
}
|
||||
m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
|
||||
//{
|
||||
// D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
// if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
// memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
|
||||
// m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
|
||||
//}
|
||||
//m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant)
|
||||
{
|
||||
HRESULT hr = E_FAIL;
|
||||
hr = pShader->Bind_Matrices(pConstant, m_PrevRobeBoneMatrices.data(), m_iBoneNum);
|
||||
m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_PrevRobeBoneMatrices);
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
|
||||
{
|
||||
|
||||
@@ -210,7 +224,6 @@ HRESULT CPlayerRobe::Render_Legs()
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
{
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
|
||||
@@ -491,6 +504,12 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
|
||||
m_pSocketMatrix = pDesc->pSocketMatrix;
|
||||
m_pModelCom = pDesc->pModel;
|
||||
|
||||
m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
|
||||
m_PrevRobeBoneMatrices.resize(m_iBoneNum);
|
||||
if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot");
|
||||
m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
|
||||
m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
|
||||
|
||||
@@ -443,13 +443,36 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
m_pModelCom->Get_OffsetMatrix(i).data(),
|
||||
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
|
||||
)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
@@ -512,20 +535,9 @@ HRESULT CRanrok::Render_Blend()
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->Begin_OutLine_Write(2);
|
||||
}
|
||||
if (FAILED(m_pModelCom->Render(i))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
m_pGameInstance->End_OutLine_Write();
|
||||
}
|
||||
}
|
||||
|
||||
if (true == m_bDrawOutLine) {
|
||||
Render_OutLine();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -537,8 +549,9 @@ HRESULT CRanrok::Render_OutLine()
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(0.14f, 0.5f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -565,7 +578,7 @@ HRESULT CRanrok::Render_OutLine()
|
||||
}
|
||||
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
|
||||
|
||||
for (_uint i = 0; i < iNumMeshes; i++)
|
||||
for (_uint i = ENUM_CLASS(RANROK_MESH_ORDER::WINGS); i < ENUM_CLASS(RANROK_MESH_ORDER::END); ++i)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrices(
|
||||
"g_OffsetMatrix",
|
||||
@@ -611,7 +624,6 @@ void CRanrok::MoveTo(_float fTimeDelta)
|
||||
_vector CurPos = m_pCharacter_Controller->Get_Position();
|
||||
_vector vLook = XMVector3Normalize(m_pTransformCom->Get_State(STATE::LOOK));
|
||||
|
||||
_float Speed = 75.f;
|
||||
|
||||
_vector toTarget = Target - CurPos;
|
||||
_float fDist = XMVectorGetX(XMVector3Length(toTarget));
|
||||
@@ -654,7 +666,7 @@ void CRanrok::MoveTo(_float fTimeDelta)
|
||||
|
||||
m_pTransformCom->LookAt_Lerp(LerpTarget, fTimeDelta,2.5f);
|
||||
|
||||
m_pCharacter_Controller->Set_Position(CurPos + vLook * Speed * fTimeDelta);
|
||||
m_pCharacter_Controller->Set_Position(CurPos + vLook * m_fTuckedSpeed * fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CRanrok::Load_RanrokPos(const _char* pFilePath)
|
||||
@@ -736,6 +748,7 @@ void CRanrok::Free()
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pEffectPool);
|
||||
SAFE_RELEASE(m_pRanrok_Point);
|
||||
Safe_Delete(m_pCallBack_Behavior);
|
||||
Safe_Delete(m_pCallBack_HitReport);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,227 @@
|
||||
#include "pch.h"
|
||||
#include "Ranrok_Point.h"
|
||||
|
||||
#include "GameInstance.h"
|
||||
#include "EffectParts.h"
|
||||
#include "Wand.h"
|
||||
#include "Player.h"
|
||||
#include "InfoInstance.h"
|
||||
|
||||
CRanrok_Point::CRanrok_Point(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CEffect_Container{ pDevice, pContext }
|
||||
{
|
||||
}
|
||||
|
||||
CRanrok_Point::CRanrok_Point(const CRanrok_Point& rhs)
|
||||
: CEffect_Container(rhs),
|
||||
m_pInfoInstance(CInfoInstance::GetInstance())
|
||||
{
|
||||
SAFE_ADDREF(m_pInfoInstance);
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Point::Initialize_Prototype()
|
||||
{
|
||||
|
||||
if (FAILED(Load_Package("../Bin/Resources/Data/Effect/MonsterPackage/Ranrok/RanrokPoint")))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Point::Initialize(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Initialize(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(Create_Effect()))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
m_wstrEffectName = L"RanrokPoint";
|
||||
|
||||
|
||||
m_pGooRod_0 = Get_PartObject<CEffectParts>("GooRod_0");
|
||||
m_pSmoke = Get_PartObject<CEffectParts>("Smoke");
|
||||
m_pSpread_PT = Get_PartObject<CEffectParts>("Spread_PT");
|
||||
|
||||
SAFE_ADDREF(m_pGooRod_0);
|
||||
SAFE_ADDREF(m_pSmoke);
|
||||
SAFE_ADDREF(m_pSpread_PT);
|
||||
|
||||
m_fDuration = 30.f;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CRanrok_Point::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Point::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
Update_Event(fTimeDelta);
|
||||
|
||||
|
||||
/* PJ 월드 구성하기 */
|
||||
if (m_isStop == false)
|
||||
{
|
||||
/* 초기 방향 */
|
||||
|
||||
XMStoreFloat3(&m_vLook, m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
|
||||
_vector vRight = XMVector3Normalize(XMLoadFloat3(&m_vLook));
|
||||
_vector vLook = XMVector3Normalize(XMVector3Cross(vRight, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
|
||||
_vector vUp = XMVector3Normalize(XMVector3Cross(vLook, vRight));
|
||||
_vector vPos = m_pOwner->Get_WorldPostion();
|
||||
|
||||
_matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
|
||||
|
||||
m_pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pGooRod_0->Get_Component<CTransform>()->Set_WorldMatrix(PJ_WorldMat);
|
||||
m_pSpread_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Point::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_bVisible == false)
|
||||
return;
|
||||
|
||||
__super::Late_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Point::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Pre_Setting(pObject, nullptr)))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
/* 초기 객체 비지블*/
|
||||
|
||||
/* 초기 객체 위치 초기화*/
|
||||
|
||||
/* 초기 방향 */
|
||||
XMStoreFloat3(&m_vLook, m_pOwner->Get_Component<CTransform>()->Get_State(STATE::LOOK));
|
||||
|
||||
/* PJ 월드 구성하기 */
|
||||
|
||||
|
||||
_vector vRight = XMVector3Normalize(XMLoadFloat3(&m_vLook));
|
||||
_vector vLook = XMVector3Normalize(XMVector3Cross(vRight, XMVectorSet(0.f, 1.f, 0.f, 0.f)));
|
||||
_vector vUp = XMVector3Normalize(XMVector3Cross(vLook, vRight));
|
||||
_vector vPos = m_pOwner->Get_WorldPostion();
|
||||
|
||||
_matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos };
|
||||
|
||||
|
||||
m_pSmoke->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pSpread_PT->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
m_pGooRod_0->Get_Component<CTransform>()->Set_WorldMatrix(PJ_WorldMat);
|
||||
|
||||
m_pSmoke->Set_Visible(true);
|
||||
m_pGooRod_0->Set_Visible(true);
|
||||
m_pSpread_PT->Set_Visible(true);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Point::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRanrok_Point::Ready_Child()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CRanrok_Point* CRanrok_Point::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CRanrok_Point* pInstance = new CRanrok_Point(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CRanrok_Point");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
|
||||
CGameObject* CRanrok_Point::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CRanrok_Point* pInstance = new CRanrok_Point(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CRanrok_Point");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CRanrok_Point::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (m_bHit == false)
|
||||
return;
|
||||
|
||||
ON_COLLISION_INFO CollisionDesc = *static_cast<ON_COLLISION_INFO*>(pDesc);
|
||||
|
||||
_vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos);
|
||||
|
||||
|
||||
for (auto& pPair : m_PartObjects)
|
||||
{
|
||||
pPair.second->Set_Visible(true);
|
||||
pPair.second->Get_Component<CTransform>()->Set_State(STATE::POSITION, vPos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CRanrok_Point::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pInfoInstance);
|
||||
|
||||
SAFE_RELEASE(m_pGooRod_0);
|
||||
SAFE_RELEASE(m_pSmoke);
|
||||
SAFE_RELEASE(m_pSpread_PT);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CRanrok_Point::Describe_Entity()
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
HRESULT CRanrok_Point::Bind_ShaderResources()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -693,6 +693,12 @@ void CRanrok::Behavior_TuckedEnter()
|
||||
//}
|
||||
pairAnimInfo = m_Animation[STATEANIM::FLY];
|
||||
m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true);
|
||||
|
||||
Add_Event(pairAnimInfo.first,
|
||||
[this]() {
|
||||
m_bVisible = false;
|
||||
m_pEffectPool->Use_Skill(SKILL_TYPE::RANROK_POINT, this, nullptr, &m_pRanrok_Point);
|
||||
}, 0.1f);
|
||||
}
|
||||
|
||||
HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
@@ -719,9 +725,13 @@ HRESULT CRanrok::Behavior_TuckedExitCheck(_float fTimeDelta)
|
||||
|
||||
void CRanrok::Behavior_TuckedExit()
|
||||
{
|
||||
/* 이펙트를 서서히 사라지게 하기위해 도착 이후에 나오는 이펙트를 아래로 떨굼 */
|
||||
m_pRanrok_Point->Setting_Pos(XMVectorSet(0.f, -500.f, 0.f, 1.f));
|
||||
SAFE_RELEASE(m_pRanrok_Point);
|
||||
|
||||
|
||||
m_pFSM->Disable_State(FSMSTATE::TUCKED);
|
||||
m_bTucked = false;
|
||||
m_bVisible = true;
|
||||
}
|
||||
|
||||
void CRanrok::Behavior_LandEnter()
|
||||
|
||||
@@ -252,14 +252,9 @@ HRESULT CTroll::Render_OutLine()
|
||||
}
|
||||
|
||||
Compute_Depth();
|
||||
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
|
||||
if (m_fOutLineThickness > 6.f) {
|
||||
m_fOutLineThickness = 6.f;
|
||||
}
|
||||
else if (m_fOutLineThickness < 2.f) {
|
||||
m_fOutLineThickness = 2.f;
|
||||
}
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
m_fOutLineThickness = CMyTools::Lerp_f1D(2.5f, 3.f, fRatio);
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Dialogue_Font.h"
|
||||
#include "SpellLearn_Canvas.h"
|
||||
#include "Interaction_Key.h"
|
||||
#include "Broom_TargetGate.h"
|
||||
|
||||
CUI_Manager::CUI_Manager(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CUIObject(pDevice, pContext)
|
||||
@@ -350,6 +351,12 @@ HRESULT CUI_Manager::Ready_Components(void* pArg)
|
||||
}
|
||||
Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CBroom_TargetGate>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CBroom_TargetGate**>(&m_pBroom_TargetGate))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Canvas(TEXT("Broom_TargetGate"), m_pBroom_TargetGate);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ class CBroomRaceManager final : public CGameObject
|
||||
|
||||
enum class RACE_STATE
|
||||
{
|
||||
READY,
|
||||
COUNTDOWN,
|
||||
START,
|
||||
READY,
|
||||
COUNTDOWN,
|
||||
START,
|
||||
RACING,
|
||||
FINISH,
|
||||
END
|
||||
@@ -42,17 +42,26 @@ class CBroomRaceManager final : public CGameObject
|
||||
void Push_RaceRing(class CRaceRing* Ring);
|
||||
_int Get_RaceState() const { return m_eRaceState; }
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
|
||||
vector<class CRaceRing*> m_pRaceRings = {};
|
||||
vector<RacerInfo> m_Racers = {};
|
||||
_float m_fCountTimer = {};
|
||||
_float m_fRacingTimer = {};
|
||||
_int m_iCount = { 3 };
|
||||
_int m_iPerCount = {};
|
||||
_int m_eRaceState = { ENUM_CLASS(RACE_STATE::END) };
|
||||
_wstring ToolTip;
|
||||
|
||||
_int m_iLastRing{};
|
||||
|
||||
_bool m_bRaceStart = { false };
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
void Update_Countdown(_float fTimeDelta);
|
||||
void StartRaceMove();
|
||||
void Check_RingPassed();
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Circle final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Circle(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Circle(const CBroom_Circle& rhs);
|
||||
virtual ~CBroom_Circle() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
virtual void Start_Size_Lerp(_float fTimeDelta) override;
|
||||
void Race_Start(_int iCount);
|
||||
void Set_Count(_int Count);
|
||||
|
||||
void Rece_Results();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iCount{};
|
||||
_int m_iPerCount{};
|
||||
_float m_fFontAlpha{};
|
||||
_float m_fDissolve{};
|
||||
|
||||
|
||||
_bool m_bCountDown = { false };
|
||||
_bool m_bTimer = { false };
|
||||
_bool m_bSizeDown = { false };
|
||||
_bool m_bSizeUp = { false };
|
||||
|
||||
public:
|
||||
static CBroom_Circle* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Exit final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Exit(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Exit(const CBroom_Exit& rhs);
|
||||
virtual ~CBroom_Exit() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Rece_Results();
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float4 m_fImagePosi{};
|
||||
|
||||
public:
|
||||
static CBroom_Exit* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Finish final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Finish(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Finish(const CBroom_Finish& rhs);
|
||||
virtual ~CBroom_Finish() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Set_Font();
|
||||
|
||||
public:
|
||||
void Finish(_float fTime);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_wstring m_fFont[7];
|
||||
_float2 m_fFontPos[7];
|
||||
|
||||
_float4 m_fImagePosi{};
|
||||
|
||||
public:
|
||||
static CBroom_Finish* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Flag final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Flag(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Flag(const CBroom_Flag& rhs);
|
||||
virtual ~CBroom_Flag() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_Start();
|
||||
void Set_Finish();
|
||||
void Rece_Results();
|
||||
|
||||
private:
|
||||
void Finish_SizeUp(_float fTime);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_float m_fStart = { false };
|
||||
|
||||
_bool m_fFinish = { false };
|
||||
|
||||
public:
|
||||
static CBroom_Flag* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,71 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "PanelObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CGameObject;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Panel final : public CPanelObject
|
||||
{
|
||||
private:
|
||||
CBroom_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Panel(const CBroom_Panel& rhs);
|
||||
virtual ~CBroom_Panel() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Ready_Race();
|
||||
void Race_Count(_int Count);
|
||||
void Race_Start(_int iRing);
|
||||
void Current_Ring();
|
||||
void Race_End();
|
||||
void Race_Results();
|
||||
|
||||
public:
|
||||
void Set_BroomTimer();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pBroom_Flag = { nullptr };
|
||||
CGameObject* m_pBroom_Circle = { nullptr };
|
||||
CGameObject* m_pBroom_Scoreboard = { nullptr };
|
||||
CGameObject* m_pBroom_Fiish = { nullptr };
|
||||
CGameObject* m_pBroom_Record = { nullptr };
|
||||
CGameObject* m_pBroom_Exit = { nullptr };
|
||||
|
||||
_float m_fRaceTime{};
|
||||
|
||||
_bool m_bDinish = { false };
|
||||
_bool m_bResults = { false };
|
||||
|
||||
public:
|
||||
static CBroom_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Record final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Record(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Record(const CBroom_Record& rhs);
|
||||
virtual ~CBroom_Record() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Set_Font();
|
||||
void Set_Best_Record(_float fTime);
|
||||
|
||||
public:
|
||||
void Rece_Results();
|
||||
void Finish(_float fTime);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_wstring m_fFont[5];
|
||||
_float2 m_fFontPos[6];
|
||||
_vector m_fFontColor[2];
|
||||
|
||||
_float m_fBaseTime{};
|
||||
|
||||
_bool m_bNewScore = { false };
|
||||
public:
|
||||
static CBroom_Record* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,63 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTexture;
|
||||
class CShader;
|
||||
class CVIBuffer_Rect;
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_Scoreboard final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CBroom_Scoreboard(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_Scoreboard(const CBroom_Scoreboard& rhs);
|
||||
virtual ~CBroom_Scoreboard() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
void Set_Setting();
|
||||
|
||||
public:
|
||||
void Set_MaxRing(_int iMaxRing);
|
||||
void Set_CurrentRing();
|
||||
void Set_Timer(_float fTimer);
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_vector m_fColor[4];
|
||||
_wstring Score[8];
|
||||
_float2 m_fFontPosition[8];
|
||||
|
||||
_int m_iCurrentRing{};
|
||||
_float m_fCurreentRingFontSize{};
|
||||
|
||||
public:
|
||||
static CBroom_Scoreboard* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CBroom_TargetGate final : public CGameObject
|
||||
{
|
||||
private:
|
||||
CBroom_TargetGate(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CBroom_TargetGate(const CBroom_TargetGate& rhs);
|
||||
virtual ~CBroom_TargetGate() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
HRESULT Bind_ShaderResources();
|
||||
HRESULT Ready_Components();
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
void Set_TargetPosition(_vector TargetPos);
|
||||
|
||||
private:
|
||||
void Visibie();
|
||||
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_bool m_vActive = { false };
|
||||
_wstring m_Distance;
|
||||
|
||||
_vector m_vFontPosition{};
|
||||
|
||||
_vector m_vPlayerPos{};
|
||||
_vector m_vTargetPos{};
|
||||
|
||||
_float m_fAlpha{};
|
||||
_vector m_vPosition{};
|
||||
|
||||
_float3 m_fSize{};
|
||||
_float2 m_fViewPort{};
|
||||
|
||||
_float m_fFontSize{};
|
||||
|
||||
public:
|
||||
static CBroom_TargetGate* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -1,50 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Camera.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CCamera_Model final : public CCamera
|
||||
{
|
||||
public:
|
||||
typedef struct tagCamera_Model : public CCamera::CAMERA_DESC
|
||||
{
|
||||
_float3 vEye{}, vAt{};
|
||||
_float fMouseSensor{};
|
||||
}CAMERA_MODEL_DESC;
|
||||
private:
|
||||
CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCamera_Model(const CCamera_Model& rhs);
|
||||
virtual ~CCamera_Model() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
|
||||
private:
|
||||
class CModel* m_pModelCom = { nullptr };
|
||||
class CShader* m_pShaderCom = { nullptr };
|
||||
_bool m_bMovable = true;
|
||||
_float4x4 m_matInitial = {};
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
void Set_InitialPos();
|
||||
|
||||
public:
|
||||
static CCamera_Model* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -11,7 +11,7 @@ namespace Client
|
||||
enum class SHADER_PASS_NORTEX { DEFAULT, TERRAIN, ENV_TERRAIN_ANISO, SHADOW, END };
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, END};
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX, DISTORTION, NONPOS, NONPOS_BLUR , BLUR_MESH, BLUR_CULLING, BLUR_CULLING_NO_EMISSIVE, BLOOM_CULLING, DEFAULT_NONPOS, NONWB_NONPOS ,DECAL, DECAL_WBEND};
|
||||
enum class SHADER_PASS_UIEDITOR {
|
||||
DEFAULT, COLOR, LOGO, LOGO_TEXT, LOGO_GLOW, ALPHABLEND, CLAMP, CURSOR,
|
||||
LODING, HOLD_ROTATION, MISSION, QUESTTYPE, UVMULT, NINECLICE,
|
||||
@@ -20,7 +20,9 @@ namespace Client
|
||||
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
SPELL_LEARN, SPELLLEARNCOLOR, SPELLLEARNBOOSTER, NPCINTERACTION, CANVASFADE,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, END };
|
||||
FLAGWAVE, BROOMCIRCLE,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, INTERACTION_NPC, BROOMTARGETGATE,END
|
||||
};
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
|
||||
|
||||
enum class SHADER_PASS_NPC_PBR_ANIM {
|
||||
@@ -70,7 +72,7 @@ namespace Client
|
||||
|
||||
/*란록*/
|
||||
|
||||
RANROK_FIREBALL, RANROK_BREATH,
|
||||
RANROK_FIREBALL, RANROK_BREATH, RANROK_POINT,
|
||||
|
||||
END
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ class CEffectPool final : public CGameObject
|
||||
virtual HRESULT Render() override;
|
||||
public:
|
||||
HRESULT Create_Effect(SKILL_TYPE eType, _uint iNumEffect, _uint iPrototypeLevel, _uint iCloneLevel , function<class CEffect_Container*(_uint , _uint)> AddPrototypeEvent);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType , CGameObject* pOwner, void* pArg = nullptr);
|
||||
HRESULT Use_Skill(SKILL_TYPE eType, CGameObject* pOwner, void* pArg = nullptr, CEffect_Container** ppOut = nullptr);
|
||||
#ifdef _DEBUG
|
||||
HRESULT Reset_Pool();
|
||||
#endif
|
||||
|
||||
@@ -59,6 +59,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
public:
|
||||
HRESULT Load_Directory(const _char* pPath);
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr);
|
||||
void Setting_Pos(_fvector vPos);
|
||||
HRESULT Load_Package(const _char* pPath);
|
||||
HRESULT Load_Data(const _char* pPath);
|
||||
HRESULT Create_Effect();
|
||||
@@ -88,6 +89,7 @@ class CEffect_Container abstract : public CContainerObject
|
||||
_wstring m_wstrEffectName = {};
|
||||
_bool m_bHit = { false };
|
||||
_bool m_isLoop = {};
|
||||
_bool m_isStop = {};
|
||||
|
||||
_float m_fAccTime = {};
|
||||
_float m_fPreAccTime = {};
|
||||
|
||||
@@ -40,6 +40,7 @@ class CGamePlay_Canvas final : public CCanvasObject
|
||||
CGameObject* m_pLoading_Panel = { nullptr };
|
||||
CGameObject* m_pAction_Panel = { nullptr };
|
||||
CGameObject* m_pEnemy_Panel = { nullptr };
|
||||
CGameObject* m_pBroom_Panel = { nullptr };
|
||||
|
||||
public:
|
||||
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -36,6 +36,8 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
pair<_float3, _float3> Get_CameraCoordinateSystem();
|
||||
_float Player_Damage();
|
||||
void Set_Damage(_float fDamage);
|
||||
void Set_PlayerPos(_vector Position);
|
||||
_vector Get_PalyerPos();
|
||||
#pragma endregion
|
||||
#pragma region MONSTER_INFO
|
||||
HRESULT Regist_PlayerAlly(CUnit* pUnit);
|
||||
@@ -79,12 +81,11 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
const vector<QUESTINFO>& Get_AcceptQuest() const;
|
||||
HRESULT Set_AcceptQuest(_int Index);
|
||||
#pragma endregion
|
||||
#pragma region Interactive_INFO
|
||||
#pragma region SpellLearn_Data
|
||||
const SPELLLEARNINFO& Get_SpellLearn(_int Index) const;
|
||||
_int Get_SpellLearnIndex();
|
||||
#pragma endregion
|
||||
#pragma region Dialogue_Fint
|
||||
#pragma region Dialogue_Font
|
||||
void Set_Font(void* pArg);
|
||||
#pragma endregion
|
||||
HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive);
|
||||
@@ -92,6 +93,10 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
|
||||
HRESULT ActiveAt_Interactive(_fvector vPosition);
|
||||
#pragma endregion
|
||||
#pragma region BroomManager
|
||||
void Set_Broom_Timer(_float fTimer);
|
||||
_float Get_Broom_Timer();
|
||||
#pragma endregion
|
||||
private:
|
||||
CGameInstance* m_pGameInstance = { nullptr };
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
@@ -107,9 +112,13 @@ DECLARE_SINGLETON(CInfoInstance)
|
||||
class CSpellLearn_Data* m_pSpellLearn_Data = { nullptr };
|
||||
class CDialogue_Font* m_pDialogue_Font = { nullptr };
|
||||
|
||||
_vector m_pPlayerPos{};
|
||||
|
||||
_uint m_eInput = ENUM_CLASS(KEYINPUT::END);
|
||||
_int m_eSpell = ENUM_CLASS(SKILL_TYPE::END);
|
||||
|
||||
_float m_fBroom_Timer{};
|
||||
|
||||
_float m_fDamage{};
|
||||
UI_STATE m_eUI_State = { UI_STATE::END };
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class CMonster abstract : public CUnit
|
||||
virtual CStat* Get_Stat();
|
||||
const _float4x4* Get_HeadMatrix();
|
||||
void CameraShake(_float ClampValue, _float Min, _float Max, _float Time);
|
||||
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CUnit* m_pTarget = { nullptr };
|
||||
@@ -46,8 +47,8 @@ class CMonster abstract : public CUnit
|
||||
_bool m_bLookAt = { true };
|
||||
_float4 m_vOutLineColor = CMyTools::ColorRGBA_HEXtoFLOAT4(0xfefefe00);
|
||||
_float m_fOutLineThickness = { 5.f };
|
||||
_float m_fOutLineScale = { 1.f };
|
||||
_float m_fOutLinePower = { 1.f };
|
||||
_float m_fOutLineScale = { 2.f };
|
||||
_float m_fOutLinePower = { 2.f };
|
||||
_float m_fDisolveTime = { 0.f };
|
||||
_bool m_bDisolve = { false };
|
||||
_float m_fDegree = {};
|
||||
|
||||
@@ -32,7 +32,7 @@ class CPlayer final : public CUnit
|
||||
void Set_Shield(_bool bShield) { m_bShield = bShield; }
|
||||
void Start_CameraShake(_float fTime, _float fIntense);
|
||||
_int Get_UIState() { return m_eUIState; }
|
||||
void Set_RaceRing(class CRaceRing* pRaceRing) { m_pRaceRing = pRaceRing; }
|
||||
void Set_RaceRing(class CRaceRing* pRaceRing);
|
||||
class CBroom* Get_Broom() { return m_pBroom; }
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
|
||||
@@ -32,6 +32,8 @@ class CPlayerRobe final : public CPartObject
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Update_RobeSocketPosition();
|
||||
HRESULT Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant);
|
||||
private:
|
||||
_float4x4 m_PreTransformMatrix = { };
|
||||
const _float4x4* m_pSocketMatrix = { nullptr };
|
||||
@@ -42,7 +44,8 @@ class CPlayerRobe final : public CPartObject
|
||||
const _float4x4* m_RobeJointAnchorMatrices[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
_float4x4 m_ReconstructedJointAnchorMatirces[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
|
||||
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
CModel* m_pModelCom = { nullptr };
|
||||
_int m_iBoneNum = -1;
|
||||
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
|
||||
@@ -54,6 +57,7 @@ class CPlayerRobe final : public CPartObject
|
||||
ID3D11ShaderResourceView* m_pBoneCombinedMatrixSRV = { nullptr };
|
||||
|
||||
CModel::BONEINSERTION_DESC m_BoneInsertionDesc = {};
|
||||
vector<_float4x4> m_PrevRobeBoneMatrices = { };
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
|
||||
@@ -68,7 +72,6 @@ class CPlayerRobe final : public CPartObject
|
||||
HRESULT Bind_ShaderResources() { return S_OK; }
|
||||
|
||||
HRESULT Update_LegsPosition();
|
||||
HRESULT Update_RobeSocketPosition();
|
||||
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
|
||||
HRESULT Create_BoneCombinedMatrixSRV();
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -115,6 +115,8 @@ class CRanrok final : public CMonster
|
||||
_float m_fRushTime = {};
|
||||
_float m_fHeadAimWeight = {};
|
||||
|
||||
class CEffect_Container* m_pRanrok_Point = { nullptr };
|
||||
_float m_fTuckedSpeed = { 75.f };
|
||||
|
||||
void Behavior_IdleEnter();
|
||||
HRESULT Behavior_IdleExitCheck();
|
||||
|
||||
@@ -39,7 +39,7 @@ class CRanrok_FireBall final : public CEffect_Container
|
||||
class CEffectParts* m_pFireBall_Tail = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.3f;
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#pragma once
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Effect_Container.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
NS_END
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CRanrok_Point final : public CEffect_Container
|
||||
{
|
||||
private:
|
||||
CRanrok_Point(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CRanrok_Point(const CRanrok_Point& rhs);
|
||||
virtual ~CRanrok_Point() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
|
||||
public:
|
||||
virtual HRESULT Pre_Setting(CGameObject* pObject, void* pArg = nullptr) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
HRESULT Ready_Child();
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr, void* pDesc = nullptr) override;
|
||||
private:
|
||||
_wstring m_wstrEffectName = {};
|
||||
|
||||
class CEffectParts* m_pGooRod_0 = { nullptr };
|
||||
class CEffectParts* m_pSmoke = { nullptr };
|
||||
class CEffectParts* m_pSpread_PT = { nullptr };
|
||||
|
||||
_float3 m_vLook = {};
|
||||
_float m_fLinearSpeed = 0.8f;
|
||||
|
||||
_float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f };
|
||||
_float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f };
|
||||
private:
|
||||
class CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
public:
|
||||
static CRanrok_Point* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual void Free() override;
|
||||
CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
|
||||
#ifdef _DEBUG
|
||||
void Describe_Entity() override;
|
||||
#endif // DEBUG
|
||||
|
||||
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -60,6 +60,7 @@ class CUI_Manager final : public CUIObject
|
||||
CGameObject* m_pDamage_Font = { nullptr };
|
||||
CGameObject* m_pDialogue_Font = { nullptr };
|
||||
CGameObject* m_pInteraction_Key = { nullptr };
|
||||
CGameObject* m_pBroom_TargetGate = { nullptr };
|
||||
_bool m_bCanvas_Change = { false };
|
||||
|
||||
UI_STATE m_eType{};
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -44,6 +44,7 @@ float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vSha
|
||||
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
|
||||
{
|
||||
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
|
||||
fRimLight = max(fRimLight, 1e-6f);
|
||||
fRimLight = pow(fRimLight, fRimPower);
|
||||
fRimLight = fRimLight * fRimStrength;
|
||||
return fRimLight;
|
||||
@@ -69,7 +70,6 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
|
||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||
return vOriginalUV * vDelta + vOffset;
|
||||
}
|
||||
|
||||
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
|
||||
{
|
||||
float2 UV = vUV; // 이미지의 UV값
|
||||
@@ -87,6 +87,54 @@ float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
|
||||
|
||||
return UV;
|
||||
}
|
||||
//float2 UV_Cutting(float2 originalUV, float2 uvCuttingCountFloat, int currentFrameIndex)
|
||||
//{
|
||||
// // (1) 칸 개수는 정수로 취급 (0 방지)
|
||||
// int uvCuttingCountX = max((int) uvCuttingCountFloat.x, 1);
|
||||
// int uvCuttingCountY = max((int) uvCuttingCountFloat.y, 1);
|
||||
|
||||
// int totalFrameCount = uvCuttingCountX * uvCuttingCountY;
|
||||
|
||||
// // (2) currentFrameIndex를 [0, totalFrameCount)로 래핑 (정수 % 제거)
|
||||
// int wrappedFrameIndex = currentFrameIndex;
|
||||
// if (totalFrameCount > 0)
|
||||
// {
|
||||
// float inverseTotalFrameCount = 1.0f / (float) totalFrameCount;
|
||||
|
||||
// // loopCount = floor(currentFrameIndex / totalFrameCount)
|
||||
// int loopCount = (int) floor((float) currentFrameIndex * inverseTotalFrameCount);
|
||||
|
||||
// wrappedFrameIndex = currentFrameIndex - loopCount * totalFrameCount;
|
||||
|
||||
// // 음수 프레임까지 방어(선택)
|
||||
// if (wrappedFrameIndex < 0)
|
||||
// {
|
||||
// wrappedFrameIndex += totalFrameCount;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// wrappedFrameIndex = 0;
|
||||
// }
|
||||
|
||||
// // (3) 가로 기준으로 행/열 구하기 (정수 /, % 제거)
|
||||
// float inverseCuttingCountX = 1.0f / (float) uvCuttingCountX;
|
||||
// float inverseCuttingCountY = 1.0f / (float) uvCuttingCountY;
|
||||
|
||||
// // frameIndexY = floor(wrappedFrameIndex / uvCuttingCountX)
|
||||
// int frameIndexY = (int) floor((float) wrappedFrameIndex * inverseCuttingCountX);
|
||||
|
||||
// // frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX (% 대체)
|
||||
// int frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX;
|
||||
|
||||
// // (4) UV 변환
|
||||
// float2 resultUV = originalUV;
|
||||
// resultUV.x = resultUV.x * inverseCuttingCountX + (float) frameIndexX * inverseCuttingCountX;
|
||||
// resultUV.y = resultUV.y * inverseCuttingCountY + (float) frameIndexY * inverseCuttingCountY;
|
||||
|
||||
// return resultUV;
|
||||
//}
|
||||
|
||||
|
||||
// (Kd F(Lambert)) + (Ks F(cook-torrance))
|
||||
|
||||
@@ -153,7 +201,7 @@ PBR_LIGHT_OUT PBR_Lighting(
|
||||
float3 vAlbedo, float fMetallic, float fRoughness,
|
||||
float3 vLightColor, float fLightIntensity, float fAttenuation, float3 vFO
|
||||
) {
|
||||
PBR_LIGHT_OUT Out;
|
||||
PBR_LIGHT_OUT Out = (PBR_LIGHT_OUT)0;
|
||||
Out.vShade = 0;
|
||||
Out.vSpecular = 0;
|
||||
float3 vLighting = vLightColor * fLightIntensity;
|
||||
@@ -163,8 +211,8 @@ PBR_LIGHT_OUT PBR_Lighting(
|
||||
float NdotV = saturate(dot(vNormal, vToView));
|
||||
if (NdotL <= 0 || NdotV <= 0)
|
||||
{
|
||||
Out.vShade = 0;
|
||||
Out.vSpecular = 0;
|
||||
Out.vShade = float3(0.f, 0.f, 0.f);
|
||||
Out.vSpecular = float3(0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
@@ -475,12 +523,12 @@ float4 ApplyDissolve(Texture2D DisolveTexture, float fDisolveRatio, float fDisol
|
||||
|
||||
bool IsValidUV(float2 uv)
|
||||
{
|
||||
if (uv.x < 0 || uv.x >= 1
|
||||
|| uv.y < 0 || uv.y >= 1)
|
||||
bool bReturn = true;
|
||||
if (uv.x < 0 || uv.x >= 1 || uv.y < 0 || uv.y >= 1)
|
||||
{
|
||||
return false;
|
||||
bReturn = false;
|
||||
}
|
||||
return true;
|
||||
return bReturn;
|
||||
}
|
||||
|
||||
float4 BilinearFetches(float2 vGlobalTexelSize, Texture2D SrcTexture2D, float2 vCenterTexCoord, sampler samplerLinear)
|
||||
@@ -535,9 +583,10 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
|
||||
}
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIntensity = 1.f)
|
||||
{
|
||||
float2 vReturnVelocity = float2(0.5f, 0.5f);
|
||||
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5)
|
||||
{
|
||||
return float2(0.5f, 0.5f);
|
||||
return vReturnVelocity;
|
||||
}
|
||||
|
||||
float2 currentNDC = vCurrentProjPos.xy / vCurrentProjPos.w;
|
||||
@@ -553,6 +602,10 @@ float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIn
|
||||
|
||||
return velocityUV * 0.5f + 0.5f; // 0 속도 -> 0.5
|
||||
}
|
||||
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
|
||||
{
|
||||
return CalcVelocityUV(vCurrentProjPos, vPreviousProjPos, 1.0f);
|
||||
}
|
||||
|
||||
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
|
||||
{
|
||||
@@ -578,4 +631,60 @@ float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSr
|
||||
return vCenterColor * 0.25f + (fLTColor + fRTColor + fLBColor + fRBColor) * 0.0625f + (fTColor + fLColor + fRColor + fBColor) * 0.125f;
|
||||
}
|
||||
|
||||
float4x4 Inverse4x4(float4x4 m)
|
||||
{
|
||||
float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2], a03 = m[0][3];
|
||||
float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2], a13 = m[1][3];
|
||||
float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2], a23 = m[2][3];
|
||||
float a30 = m[3][0], a31 = m[3][1], a32 = m[3][2], a33 = m[3][3];
|
||||
|
||||
float b00 = a00 * a11 - a01 * a10;
|
||||
float b01 = a00 * a12 - a02 * a10;
|
||||
float b02 = a00 * a13 - a03 * a10;
|
||||
float b03 = a01 * a12 - a02 * a11;
|
||||
float b04 = a01 * a13 - a03 * a11;
|
||||
float b05 = a02 * a13 - a03 * a12;
|
||||
float b06 = a20 * a31 - a21 * a30;
|
||||
float b07 = a20 * a32 - a22 * a30;
|
||||
float b08 = a20 * a33 - a23 * a30;
|
||||
float b09 = a21 * a32 - a22 * a31;
|
||||
float b10 = a21 * a33 - a23 * a31;
|
||||
float b11 = a22 * a33 - a23 * a32;
|
||||
|
||||
float det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
|
||||
|
||||
// 역행렬이 존재하지 않는 경우 (det ≈ 0)
|
||||
if (abs(det) < 1e-6)
|
||||
return float4x4(1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1); // fallback: 단위행렬
|
||||
|
||||
float invDet = 1.0 / det;
|
||||
|
||||
float4x4 inv;
|
||||
inv[0][0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;
|
||||
inv[0][1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet;
|
||||
inv[0][2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet;
|
||||
inv[0][3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet;
|
||||
|
||||
inv[1][0] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet;
|
||||
inv[1][1] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet;
|
||||
inv[1][2] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet;
|
||||
inv[1][3] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet;
|
||||
|
||||
inv[2][0] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet;
|
||||
inv[2][1] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet;
|
||||
inv[2][2] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet;
|
||||
inv[2][3] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet;
|
||||
|
||||
inv[3][0] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet;
|
||||
inv[3][1] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet;
|
||||
inv[3][2] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet;
|
||||
inv[3][3] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet;
|
||||
|
||||
return inv;
|
||||
}
|
||||
|
||||
|
||||
#endif // ENGINE_SHADER_FUNCTIONS_HLSLI
|
||||
|
||||
@@ -51,7 +51,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -40,7 +40,7 @@ struct PS_OUT
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
Out.vColor = g_vColor;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ struct PS_OUT_VELOCITYTILE
|
||||
};
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -180,7 +180,7 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
}
|
||||
VS_OUT VS_CAPTURE(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
float2 vClipPos = In.vPosition.xy * 2.0f; // → -1.0 ~ +1.0
|
||||
|
||||
@@ -191,7 +191,7 @@ VS_OUT VS_CAPTURE(VS_IN In)
|
||||
}
|
||||
VS_OUT VS_TONE_MAPPING(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -295,7 +295,7 @@ PS_OUT_VELOCITYBLUR PS_MOTIONBLUR(PS_IN In)
|
||||
vReferenceVelocityPixel = vBlurVeloPixel;
|
||||
}
|
||||
float fCenterSpreadLengthPixel = clamp(abs(dot(vReferenceVelocityPixel, vBlurDirPixel)), 0.f, g_fMBBlurRadius);
|
||||
|
||||
|
||||
[loop]
|
||||
for (int iInterval = -iMaxRadius; iInterval <= iMaxRadius; ++iInterval) {
|
||||
float fOffset = (float) abs(iInterval);
|
||||
@@ -412,7 +412,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
|
||||
{
|
||||
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
|
||||
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
|
||||
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV);
|
||||
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV).xy;
|
||||
vSampleDiff = vSampleVel *2.f - 1.f;
|
||||
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
|
||||
if (fSampleSpeed > vMaxSpeed) {
|
||||
@@ -685,6 +685,15 @@ PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
|
||||
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
|
||||
};
|
||||
PS_OUT_BACKBUFFER PS_MAIN_PRINT(PS_IN In)
|
||||
{
|
||||
PS_OUT_BACKBUFFER Out;
|
||||
|
||||
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
|
||||
};
|
||||
|
||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||
@@ -795,7 +804,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_UPSAMPLE(PS_IN In)
|
||||
for (int iCol = -1; iCol < 2; ++iCol) {
|
||||
uv = In.vTexcoord + vTexcelSize * float2(iRow, iCol);
|
||||
if (true == IsValidUV(uv)) {
|
||||
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0);
|
||||
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0).xyz;
|
||||
fWeight += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol];
|
||||
}
|
||||
}
|
||||
@@ -811,6 +820,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_X(PS_IN In)
|
||||
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
|
||||
float fWeight = 0.f;
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
|
||||
[loop]
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
uv.x = In.vTexcoord.x + ((float) i / g_vResolution.x);
|
||||
@@ -838,6 +849,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_COMBINE(PS_IN In)
|
||||
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
|
||||
float fWeight = 0.f;
|
||||
float2 uv = float2(0.f, 0.f);
|
||||
|
||||
[loop]
|
||||
for (int i = -15; i < 16; ++i)
|
||||
{
|
||||
uv.x = In.vTexcoord.x;
|
||||
@@ -867,7 +880,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
|
||||
float2 uv = In.vTexcoord;
|
||||
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
float3 vColor = float3(0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
@@ -888,7 +901,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_DOWNSAMPLE(PS_IN In)
|
||||
float2 uv = In.vTexcoord;
|
||||
float fSrcAlpha = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
|
||||
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
|
||||
float3 vColor = (0.f, 0.f, 0.f);
|
||||
float3 vColor = float3(0.f, 0.f, 0.f);
|
||||
|
||||
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
|
||||
|
||||
@@ -978,6 +991,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
|
||||
}
|
||||
|
||||
float fAcc = 0.f;
|
||||
[loop]
|
||||
for (int i = -16; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x + ((float) i / g_vResolution.x) * fBlurAmount * g_fDOFBlurMultiplier;
|
||||
@@ -1069,6 +1083,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In)
|
||||
}
|
||||
|
||||
float fAcc = 0.f;
|
||||
[loop]
|
||||
for (int i = -16; i < 16; ++i)
|
||||
{
|
||||
vTexcoord.x = In.vTexcoord.x;
|
||||
@@ -1256,6 +1271,7 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In)
|
||||
float3x3 toViewTBNMatrix = float3x3(vTangent, vBiNormal, vCenterViewNormal);
|
||||
|
||||
float fOcclusion = 0.f;
|
||||
[loop]
|
||||
for (uint i = 0; i < g_iKernelSize; ++i)
|
||||
{
|
||||
float3 vViewSamplePosVec = mul(g_SamplePos[i].xyz, toViewTBNMatrix); // TANSPACE -> VIEW
|
||||
@@ -1522,4 +1538,13 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MOTIONBLUR_TENTSAMPLE();
|
||||
}
|
||||
pass PrintToBackBufferPass // 22
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_PRINT();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -46,7 +46,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
|
||||
/* 디스토션 렌더타겟 텍스쳐 샘플링 */
|
||||
|
||||
@@ -72,7 +72,8 @@ Texture2D g_DeadDisolveTexture;
|
||||
Texture2D g_DeadDisolveBurnTexture;
|
||||
|
||||
int g_iBinded_Texture[27];
|
||||
matrix g_BoneMatrices[512];
|
||||
matrix g_BoneMatrices[256];
|
||||
matrix g_PrevBoneMatrices[256];
|
||||
|
||||
struct VS_IN_MESH
|
||||
{
|
||||
@@ -107,7 +108,7 @@ struct VS_OUT
|
||||
};
|
||||
VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
@@ -130,7 +131,7 @@ VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
@@ -182,9 +183,63 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_MAIN_LEGACY(VS_IN In)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
w /= sumW;
|
||||
|
||||
matrix BoneMatrix =
|
||||
mul(g_OffsetMatrix[In.vBlendIndex.x],
|
||||
mul(g_BoneMatrices[In.vBlendIndex.x], w.x))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.y],
|
||||
mul(g_BoneMatrices[In.vBlendIndex.y], w.y))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.z],
|
||||
mul(g_BoneMatrices[In.vBlendIndex.z], w.z))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.w],
|
||||
mul(g_BoneMatrices[In.vBlendIndex.w], w.w));
|
||||
|
||||
matrix PrevBoneMatrix =
|
||||
mul(g_OffsetMatrix[In.vBlendIndex.x],
|
||||
mul(g_PrevBoneMatrices[In.vBlendIndex.x], w.x))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.y],
|
||||
mul(g_PrevBoneMatrices[In.vBlendIndex.y], w.y))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.z],
|
||||
mul(g_PrevBoneMatrices[In.vBlendIndex.z], w.z))
|
||||
+ mul(g_OffsetMatrix[In.vBlendIndex.w],
|
||||
mul(g_PrevBoneMatrices[In.vBlendIndex.w], w.w));
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
|
||||
vector vPrevPosition = mul(vector(In.vPosition, 1.f), PrevBoneMatrix);
|
||||
vector vNormal = mul(vector(In.vNormal, 0.f), BoneMatrix);
|
||||
vector vBinormal = mul(vector(In.vBinormal, 0.f), BoneMatrix);
|
||||
vector vTangent = mul(vector(In.vTangent, 0.f), BoneMatrix);
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
matrix matPrevWV, matPrevWVP;
|
||||
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vPosition, matWVP);
|
||||
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
|
||||
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
|
||||
Out.vTangent = normalize(mul(vTangent, g_WorldMatrix)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
|
||||
Out.vProjPos = Out.vPosition;
|
||||
Out.vPrevProjPos = mul(vPrevPosition, matPrevWVP);
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
@@ -331,9 +386,9 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
|
||||
(In.vProjPos.w / g_fFar),
|
||||
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX,
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
|
||||
Out.vSurface = float4(0.5f, 1.f, 1.f, 0.f);
|
||||
@@ -344,7 +399,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -356,9 +411,8 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
|
||||
if (AlphaMask < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
clip(AlphaMask - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -368,8 +422,8 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
float SpecMask = vTHV_Mask.g;
|
||||
float AoMask_Thv = vTHV_Mask.b;
|
||||
|
||||
float3 vColorRoot = vDAO_Mask * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask;
|
||||
float3 vColorRoot = vDAO_Mask.rgb.rgb * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask.rgb;
|
||||
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
|
||||
|
||||
|
||||
@@ -388,7 +442,7 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -396,9 +450,9 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
@@ -421,7 +475,7 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -429,9 +483,8 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
@@ -452,7 +505,7 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYE_OCC(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
discard;
|
||||
return Out;
|
||||
}
|
||||
@@ -460,7 +513,7 @@ PS_OUT PS_EYE_OCC(PS_IN In)
|
||||
PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -471,11 +524,9 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
float fDiffuseMask = vDAO_Mask.r;
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
|
||||
clip(AlphaMask - 0.2f);
|
||||
|
||||
if (AlphaMask < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -485,8 +536,8 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
float SpecMask = vTHV_Mask.g;
|
||||
float AoMask_Thv = vTHV_Mask.b;
|
||||
|
||||
float3 vColorRoot = vDAO_Mask * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask;
|
||||
float3 vColorRoot = vDAO_Mask.rgb * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask.rgb;
|
||||
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
|
||||
|
||||
|
||||
@@ -506,7 +557,7 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -517,11 +568,9 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
float fDiffuseMask = vDAO_Mask.r;
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
|
||||
clip(AlphaMask - 0.2f);
|
||||
|
||||
if (AlphaMask < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -531,16 +580,16 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
float SpecMask = vTHV_Mask.g;
|
||||
float AoMask_Thv = vTHV_Mask.b;
|
||||
|
||||
float3 vColorRoot = vDAO_Mask * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask;
|
||||
float3 vColorRoot = vDAO_Mask.rgb * 0.6f;
|
||||
float3 vColorTip = vDAO_Mask.rgb;
|
||||
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
|
||||
|
||||
|
||||
Out.vAlbedo = float4(vBaseColor, AlphaMask);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
|
||||
(In.vProjPos.w / g_fFar),
|
||||
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX,
|
||||
1.f);
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
|
||||
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
|
||||
@@ -551,7 +600,7 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -559,9 +608,9 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -583,7 +632,7 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -591,9 +640,9 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -615,7 +664,7 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -623,9 +672,9 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -647,7 +696,7 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -655,9 +704,9 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -679,7 +728,7 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -689,9 +738,9 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
vDiffuse.rgb += vEmissive.rgb * 3.f;
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -713,7 +762,7 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -723,9 +772,9 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
vDiffuse.rgb += vEmissive.rgb * 3.f;
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -747,7 +796,7 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -757,9 +806,9 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
}
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse.rgb += vEmissive.rgb;
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -781,7 +830,7 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -790,10 +839,9 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
float4 vAlpha = g_TransmissionTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (vAlpha.r < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vAlpha.r - 0.2f);
|
||||
|
||||
vDiffuse.a = vAlpha.r;
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
@@ -821,7 +869,7 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
@@ -833,9 +881,9 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
float4 vAmbient = g_AmbientTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse.rgb += vEmissive.rgb;
|
||||
vDiffuse.rgb += vAmbient.rgb;
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -861,7 +909,7 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 p = uv - center;
|
||||
@@ -890,10 +938,8 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
float3 vColorTip = vColorHair;
|
||||
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
|
||||
|
||||
if (fAlpha < 0.3f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
clip(fAlpha - 0.2f);
|
||||
|
||||
Out.vAlbedo = float4(vBaseColor, fAlpha);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
|
||||
@@ -908,7 +954,7 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -938,7 +984,7 @@ PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -970,7 +1016,7 @@ PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1000,7 +1046,7 @@ PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1031,10 +1077,9 @@ PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
|
||||
float fAlphaRoot = AlphaMask;
|
||||
float fBaseAlpha = lerp(fAlphaRoot, fAlphaTip, (1.f - RootTip));
|
||||
float fAlpha = (fBaseAlpha);
|
||||
if (fAlpha < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(fAlpha - 0.2f);
|
||||
|
||||
Out.vAlbedo = float4(vBaseColor, fAlpha);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
|
||||
@@ -1089,7 +1134,7 @@ PS_OUT_BLEND PS_Dragon_EtherealWings(PS_IN In)
|
||||
|
||||
PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1099,10 +1144,9 @@ PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
}
|
||||
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uv).r;
|
||||
vDiffuse.a = fOppacity;
|
||||
if (vDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -1126,7 +1170,7 @@ PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
|
||||
PS_OUT PS_Dragon_Wings(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
@@ -1137,10 +1181,9 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, uv);
|
||||
vDiffuse += vEmissive;
|
||||
|
||||
if (vDiffuse.a < 0.2f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
clip(vDiffuse.a - 0.2f);
|
||||
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
@@ -1462,7 +1505,7 @@ technique11 DefaultTechnique
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
VertexShader = compile vs_5_0 VS_MAIN_LEGACY();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Player_Robe_ToMRO();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,11 @@ struct ParticleValue
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
|
||||
float3 vWolrdOffset;
|
||||
float fLoopCount; /* 현재 몇번째 루프중인지 */
|
||||
|
||||
row_major matrix PreWorldMatrix;
|
||||
//row_major matrix LocalMatrixInv;
|
||||
};
|
||||
|
||||
|
||||
@@ -93,8 +97,8 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
|
||||
bool isNoPos;
|
||||
|
||||
bool isNoResetTime;
|
||||
bool isPadding0;
|
||||
bool isPadding1;
|
||||
bool isLocal_Located_Not_TakeDelay;
|
||||
bool isCompute_LocalInverse;
|
||||
bool isPadding2;
|
||||
|
||||
float fTimeDelta;
|
||||
@@ -108,8 +112,6 @@ cbuffer g_ConstantBuffer : register(b0) // b0 << 이 숫자와 컨스턴트 쉐
|
||||
float2 vScreenSize;
|
||||
float fPadding0;
|
||||
float fPadding1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
//내가 몇개의 스레드를 사용할 것인지 지정하는데
|
||||
@@ -126,6 +128,47 @@ void CS_MAIN(
|
||||
float fGravity = particleValue.fGravity;
|
||||
float fOnlyDropY = 0.f;
|
||||
float fRatio = particle.vLifeTime.x / particle.vLifeTime.y;
|
||||
bool _isLocal_Located_Not_TakeDelay = isLocal_Located_Not_TakeDelay;
|
||||
|
||||
if (particleValue.fLoopCount == 0.f) /* 첫 루프에는 딜레이에 따른 위치를 설정받지 않도록함 */
|
||||
{
|
||||
_isLocal_Located_Not_TakeDelay = false;
|
||||
}
|
||||
|
||||
if (_isLocal_Located_Not_TakeDelay == true && particleValue.vDelay.x <= FLT_EPSILON5)
|
||||
{
|
||||
|
||||
if (isNoWorld)
|
||||
{
|
||||
row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
|
||||
|
||||
CurMat = mul(CurMat, WorldMatrix);
|
||||
|
||||
particle.vRight = CurMat[0].xyzw;
|
||||
particle.vUp = CurMat[1].xyzw;
|
||||
particle.vLook = CurMat[2].xyzw;
|
||||
particle.vTranslation = CurMat[3].xyzw;
|
||||
|
||||
/* 월드 오프셋 */
|
||||
|
||||
particle.vTranslation += CurMat[0] * particleValue.vWolrdOffset.x;
|
||||
particle.vTranslation += CurMat[1] * particleValue.vWolrdOffset.y;
|
||||
particle.vTranslation += CurMat[2] * particleValue.vWolrdOffset.z;
|
||||
|
||||
}
|
||||
|
||||
if (isNoPos)
|
||||
{
|
||||
particle.vTranslation.xyz += WorldMatrix[3].xyz;
|
||||
|
||||
/* 월드 오프셋 */
|
||||
|
||||
particle.vTranslation += WorldMatrix[0] * particleValue.vWolrdOffset.x;
|
||||
particle.vTranslation += WorldMatrix[1] * particleValue.vWolrdOffset.y;
|
||||
particle.vTranslation += WorldMatrix[2] * particleValue.vWolrdOffset.z;
|
||||
}
|
||||
}
|
||||
|
||||
particleValue.vDelay.x += fTimeDelta;
|
||||
|
||||
@@ -138,7 +181,7 @@ void CS_MAIN(
|
||||
return;
|
||||
}
|
||||
|
||||
if (particle.vLifeTime.x <= FLT_EPSILON5)
|
||||
if (particle.vLifeTime.x <= FLT_EPSILON5 && _isLocal_Located_Not_TakeDelay == false)
|
||||
{
|
||||
if (isNoWorld)
|
||||
{
|
||||
@@ -150,12 +193,25 @@ void CS_MAIN(
|
||||
particle.vRight = CurMat[0].xyzw;
|
||||
particle.vUp = CurMat[1].xyzw;
|
||||
particle.vLook = CurMat[2].xyzw;
|
||||
particle.vTranslation = CurMat[3].xyzw;
|
||||
particle.vTranslation = CurMat[3].xyzw ;
|
||||
|
||||
/* 월드 오프셋 */
|
||||
|
||||
particle.vTranslation += CurMat[0] * particleValue.vWolrdOffset.x;
|
||||
particle.vTranslation += CurMat[1] * particleValue.vWolrdOffset.y;
|
||||
particle.vTranslation += CurMat[2] * particleValue.vWolrdOffset.z;
|
||||
|
||||
}
|
||||
|
||||
if (isNoPos)
|
||||
{
|
||||
particle.vTranslation.xyz += WorldMatrix[3].xyz;
|
||||
|
||||
/* 월드 오프셋 */
|
||||
|
||||
particle.vTranslation += WorldMatrix[0] * particleValue.vWolrdOffset.x;
|
||||
particle.vTranslation += WorldMatrix[1] * particleValue.vWolrdOffset.y;
|
||||
particle.vTranslation += WorldMatrix[2] * particleValue.vWolrdOffset.z;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -185,6 +241,7 @@ void CS_MAIN(
|
||||
}
|
||||
|
||||
//초기화
|
||||
particleValue.fLoopCount += 1.f;
|
||||
particle.vRight = particleValue.vOriginRight;
|
||||
particle.vUp = particleValue.vOriginUp;
|
||||
particle.vLook = particleValue.vOriginLook;
|
||||
@@ -580,6 +637,21 @@ void CS_MAIN(
|
||||
particleValue.vDissolveUVMoveTime.x = 0.f;
|
||||
}
|
||||
|
||||
//if (isCompute_LocalInverse == true)
|
||||
//{
|
||||
// row_major float4x4 CurMat = { particle.vRight, particle.vUp, particle.vLook, particle.vTranslation };
|
||||
|
||||
|
||||
// CurMat = mul(CurMat, WorldMatrix);
|
||||
|
||||
// particle.vRight = CurMat[0].xyzw;
|
||||
// particle.vUp = CurMat[1].xyzw;
|
||||
// particle.vLook = CurMat[2].xyzw;
|
||||
// particle.vTranslation = CurMat[3].xyzw;
|
||||
|
||||
// particleValue.LocalMatrixInv = Inverse4x4(CurMat); /* 데칼 메쉬만 인스턴스당 1번 수행할거임 */
|
||||
//}
|
||||
|
||||
//아웃풋 대입
|
||||
|
||||
g_VBInstanceOutput[iIndex] = particle;
|
||||
|
||||
@@ -18,6 +18,7 @@ float g_fPI;
|
||||
float g_fFar;
|
||||
float g_fBlinkTime;
|
||||
float g_fTime;
|
||||
float g_fColorTime;
|
||||
float g_fFrame;
|
||||
float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
@@ -93,7 +94,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
@@ -119,7 +120,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -130,7 +131,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_Texture_Color(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -144,7 +145,7 @@ PS_OUT PS_Texture_Color(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -165,7 +166,7 @@ PS_OUT PS_Logo(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo_Text(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -191,7 +192,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
|
||||
|
||||
PS_OUT PS_Logo_Glow(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -212,7 +213,7 @@ PS_OUT PS_Logo_Glow(PS_IN In)
|
||||
|
||||
PS_OUT PS_AlphaBlend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -227,7 +228,7 @@ PS_OUT PS_AlphaBlend(PS_IN In)
|
||||
|
||||
PS_OUT PS_Clamp(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -242,7 +243,7 @@ PS_OUT PS_Clamp(PS_IN In)
|
||||
|
||||
PS_OUT PS_Cursor(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -292,7 +293,7 @@ PS_OUT PS_Cursor(PS_IN In)
|
||||
|
||||
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -365,7 +366,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
|
||||
PS_OUT PS_Mission(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -387,7 +388,7 @@ PS_OUT PS_Mission(PS_IN In)
|
||||
|
||||
PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 UV = In.vTexcoord;
|
||||
@@ -422,7 +423,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
|
||||
PS_OUT PS_QuestType(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
|
||||
float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -443,7 +444,7 @@ PS_OUT PS_QuestType(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -455,10 +456,11 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
float2 texsize = g_fImageSipos1.zw / g_fCurrent_Size;
|
||||
float2 texlocal = (In.vTexcoord - texpos) / texsize;
|
||||
bool inside = all(texlocal >= 0.0f && texlocal <= 1.0f);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (inside)
|
||||
{
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, texlocal);
|
||||
Color = lerp(Color, tex2, tex2.a);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
@@ -468,7 +470,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
|
||||
|
||||
PS_OUT PS_NineSlice(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -532,7 +534,7 @@ PS_OUT PS_NineSlice(PS_IN In)
|
||||
|
||||
PS_OUT PS_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
@@ -560,7 +562,7 @@ PS_OUT PS_Rotation(PS_IN In)
|
||||
|
||||
PS_OUT PS_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
@@ -582,7 +584,7 @@ PS_OUT PS_Slot(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellAnim(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
@@ -684,7 +686,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
|
||||
|
||||
PS_OUT PS_HpBar(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -781,7 +783,7 @@ PS_OUT PS_HpBar(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Meter(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
|
||||
|
||||
@@ -812,7 +814,7 @@ PS_OUT PS_Magic_Meter(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -848,7 +850,7 @@ PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
|
||||
PS_OUT PS_RemapUV(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -871,7 +873,7 @@ PS_OUT PS_RemapUV(PS_IN In)
|
||||
|
||||
PS_OUT PS_Revelio(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -910,7 +912,7 @@ PS_OUT PS_Revelio(PS_IN In)
|
||||
|
||||
PS_OUT PS_Potion(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f);
|
||||
|
||||
@@ -953,7 +955,7 @@ PS_OUT PS_Potion(PS_IN In)
|
||||
|
||||
PS_OUT PS_Magic_Item(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1077,7 +1079,7 @@ PS_OUT PS_Magic_Item(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Preview(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1152,7 +1154,7 @@ PS_OUT PS_Spell_Preview(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Header(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -1198,7 +1200,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1260,7 +1262,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1289,7 +1291,7 @@ PS_OUT PS_Spell_Drag(PS_IN In)
|
||||
|
||||
PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1331,7 +1333,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
|
||||
|
||||
PS_OUT PS_Loding_Screen(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1362,7 +1364,7 @@ PS_OUT PS_Loding_Screen(PS_IN In)
|
||||
|
||||
PS_OUT PS_Enemy_HpBer(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1448,7 +1450,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In)
|
||||
|
||||
PS_OUT PS_Boss_HpBer(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1520,7 +1522,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Border(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1587,7 +1589,7 @@ PS_OUT PS_Quest_Border(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Info(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1650,7 +1652,7 @@ PS_OUT PS_Quest_Info(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Status(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1721,7 +1723,7 @@ PS_OUT PS_Quest_Status(PS_IN In)
|
||||
|
||||
PS_OUT PS_Broomstick(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1771,9 +1773,10 @@ PS_OUT PS_Broomstick(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT PS_SpellLearn(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1794,7 +1797,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1866,7 +1869,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
|
||||
|
||||
PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -1910,7 +1913,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In)
|
||||
|
||||
PS_OUT PS_NPCInteraction(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -1983,7 +1986,7 @@ PS_OUT PS_NPCInteraction(PS_IN In)
|
||||
|
||||
PS_OUT PS_CanvasFade(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
@@ -1997,6 +2000,72 @@ PS_OUT PS_CanvasFade(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_FlagWave(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
|
||||
float phase = uv.y * 1.5f;
|
||||
|
||||
float waveX =
|
||||
sin(uv.y * 20.f + g_fTime * 1.0f + phase) * 0.007f;
|
||||
|
||||
float waveY =
|
||||
sin(uv.x * 12.f + g_fTime * 0.8f) * 0.002f;
|
||||
|
||||
uv.x += waveX;
|
||||
uv.y += waveY;
|
||||
|
||||
float4 tex = g_Texture.Sample(ClampSampler, uv);
|
||||
|
||||
Color = tex;
|
||||
|
||||
if (Color.r <= 0.f)
|
||||
discard;
|
||||
|
||||
Color.a = Alpha;
|
||||
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_BroomCircle(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
float2 Rotation;
|
||||
Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle);
|
||||
Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle);
|
||||
Rotation += center;
|
||||
|
||||
float4 tex = g_Texture.Sample(BorderZeroLinearSampler, Rotation);
|
||||
color = tex;
|
||||
|
||||
float Diffuse = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r;
|
||||
|
||||
|
||||
if (g_iHover != 0)
|
||||
{
|
||||
if (g_fTime >= Diffuse)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
color.a *= Alpha;
|
||||
|
||||
Out.vColor = color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2043,7 +2112,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
|
||||
|
||||
PS_OUT PS_Enemy_Detection(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
@@ -2191,7 +2260,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
|
||||
|
||||
PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
@@ -2209,7 +2278,7 @@ PS_OUT PS_Interaction_Object(PS_IN In)
|
||||
|
||||
PS_OUT PS_Interaction_Npc(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha;
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
float2 uv = In.vTexcoord;
|
||||
@@ -2281,6 +2350,22 @@ PS_OUT PS_Interaction_Npc(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_BroomGateTarget(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color.a *= g_fAlpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -2691,6 +2776,26 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_CanvasFade();
|
||||
}
|
||||
|
||||
pass FlagWave
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_FlagWave();
|
||||
}
|
||||
|
||||
pass BroomCircle
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BroomCircle();
|
||||
}
|
||||
|
||||
pass Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -2720,4 +2825,14 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Interaction_Npc();
|
||||
}
|
||||
|
||||
pass BroomGateTarget
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_NONESIZE3D();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_BroomGateTarget();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matVP = mul(g_ViewMatrix, g_ProjMatrix);
|
||||
float3 vLocalPos = In.vPosition;
|
||||
@@ -87,7 +87,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
@@ -109,7 +109,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_Alpha_Blend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, In.vTexcoord);
|
||||
@@ -126,7 +126,7 @@ PS_OUT PS_Alpha_Blend(PS_IN In)
|
||||
|
||||
PS_OUT PS_UVAlpha_Blend(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, In.vUV);
|
||||
@@ -143,7 +143,7 @@ PS_OUT PS_UVAlpha_Blend(PS_IN In)
|
||||
|
||||
PS_OUT PS_Megic_Meter(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
|
||||
|
||||
@@ -169,7 +169,7 @@ PS_OUT PS_Megic_Meter(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_List(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
|
||||
|
||||
@@ -195,7 +195,7 @@ PS_OUT PS_Spell_List(PS_IN In)
|
||||
|
||||
PS_OUT PS_Eessential_Spell_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -215,7 +215,7 @@ PS_OUT PS_Eessential_Spell_Slot(PS_IN In)
|
||||
|
||||
PS_OUT PS_Eessential_Spell(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -232,7 +232,7 @@ PS_OUT PS_Eessential_Spell(PS_IN In)
|
||||
|
||||
PS_OUT PS_Color_Image(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
@@ -275,7 +275,7 @@ PS_OUT PS_Color_Image(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Hover(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
float3 HoverOff = g_Texture2.Sample(DefaultSampler, In.vTexcoord).rgb;
|
||||
@@ -310,7 +310,7 @@ PS_OUT PS_Spell_Hover(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Effect(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
if (In.bHover == 0)
|
||||
discard;
|
||||
@@ -355,7 +355,7 @@ PS_OUT PS_Spell_Effect(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 uv = In.vTexcoord - center;
|
||||
@@ -415,7 +415,7 @@ PS_OUT PS_Spell_Slot(PS_IN In)
|
||||
|
||||
PS_OUT PS_Spell_Lock(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
|
||||
@@ -439,7 +439,7 @@ PS_OUT PS_Spell_Lock(PS_IN In)
|
||||
|
||||
PS_OUT PS_Quest_Slot(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
|
||||
float4 color = float4(1.f, 1.f, 1.f, 1.f);
|
||||
|
||||
@@ -114,7 +114,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
float4 w = In.vBlendWeight;
|
||||
float sumW = max(dot(w, 1.0f), 1e-6f);
|
||||
@@ -363,7 +363,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
@@ -528,7 +528,7 @@ PS_OUT_BLUR PS_MAIN_BLUR(PS_IN_BLUR In)
|
||||
|
||||
PS_OUT PS_HAIR(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 DAO = g_DAOTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float alpha = DAO.a;
|
||||
@@ -565,7 +565,7 @@ PS_OUT PS_HAIR(PS_IN In)
|
||||
|
||||
PS_OUT PS_EYELASH(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
@@ -595,7 +595,7 @@ PS_OUT PS_EYELASH(PS_IN In)
|
||||
|
||||
PS_OUT PS_SPECTOR_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
|
||||
@@ -198,7 +198,7 @@ VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In)
|
||||
}
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
@@ -349,7 +349,7 @@ struct PS_OUT
|
||||
};
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -450,7 +450,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_MAIN_SELECT(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -467,7 +467,7 @@ PS_OUT PS_MAIN_SELECT(PS_IN In)
|
||||
|
||||
PS_OUT PS_GLASS(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vGlassDiffuse = g_GlassTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
@@ -486,7 +486,7 @@ PS_OUT PS_GLASS(PS_IN In)
|
||||
|
||||
PS_OUT PS_GLASS_CUBE(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
vector vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
@@ -729,7 +729,7 @@ PS_OUT_CAPTUREDMODEL PS_CAPTUREDMODEL(PS_IN_CAPTUREDMODEL In)
|
||||
|
||||
PS_OUT PS_LAKE(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 vUV = float2(In.vTexcoord.x + cos(g_fTime * g_vUVSpeed1.x), In.vTexcoord.y + cos(g_fTime * g_vUVSpeed1.y)) * g_fNormalValue1;
|
||||
float2 vUVLarge = float2(In.vTexcoord.x + cos(g_fTime * g_vUVSpeed2.x), In.vTexcoord.y + cos(g_fTime * g_vUVSpeed2.y)) * g_fNormalValue2;
|
||||
@@ -775,7 +775,7 @@ PS_OUT PS_LAKE(PS_IN In)
|
||||
|
||||
PS_OUT PS_LAND(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 10.f);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 10.f);
|
||||
@@ -811,7 +811,7 @@ PS_OUT PS_LAND(PS_IN In)
|
||||
|
||||
PS_OUT PS_NONMRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
|
||||
@@ -839,7 +839,7 @@ PS_OUT PS_NONMRO(PS_IN In)
|
||||
|
||||
PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
@@ -880,7 +880,7 @@ PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_LEVIOSO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
|
||||
|
||||
@@ -20,38 +20,42 @@ struct ParticleValue
|
||||
|
||||
|
||||
float2 vAniIndex;
|
||||
float fGravity;
|
||||
float fGravity;
|
||||
|
||||
float3 vSinAmount;
|
||||
float3 vSinAmount;
|
||||
float3 vDeltaAngle;
|
||||
float3 vDeltaAxisAngle;
|
||||
|
||||
float fDrag;
|
||||
float fDrag;
|
||||
float3 vPivot;
|
||||
|
||||
float fSizeDrag;
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
float2 vDelay;
|
||||
|
||||
|
||||
bool isCompareStop;
|
||||
bool isCompareStop;
|
||||
float fCollisionTime;
|
||||
float fDropAttenuation;
|
||||
float fDropAttenuation;
|
||||
|
||||
float3 vVelocity;
|
||||
float fAcceleration;
|
||||
float fAcceleration;
|
||||
|
||||
bool isStop;
|
||||
bool isStop;
|
||||
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
float fRotateAttenuation;
|
||||
float fRotateAttDelay;
|
||||
|
||||
float3 vWolrdOffset;
|
||||
float fLoopCount; /* 현재 몇번째 루프중인지 */
|
||||
|
||||
row_major matrix PreWorldMatrix;
|
||||
//row_major matrix LocalMatrixInv;
|
||||
};
|
||||
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_ProjMatrixInv, g_ViewMatrixInv;
|
||||
matrix g_WorldMatrixInv, g_ProjMatrixInv, g_ViewMatrixInv;
|
||||
|
||||
matrix g_PrevWorldMatrix, g_PrevViewMatrix, g_PrevProjMatrix;
|
||||
|
||||
@@ -70,15 +74,19 @@ Texture2D g_DepthStencilTexture : register(t7);
|
||||
Texture2D g_DistortionTexture : register(t8);
|
||||
Texture2D g_DepthTexture : register(t9);
|
||||
Texture2D g_SurfaceParamsTexture : register(t10);
|
||||
//Texture2D g_NormalMapTexture : register(t11);
|
||||
|
||||
|
||||
float4 g_vCamPosition;
|
||||
float g_fFar;
|
||||
float g_fUsingSurfaceParams;
|
||||
float g_fMBIntensity = 1.f;
|
||||
float g_fUsingSurfaceParams;
|
||||
float g_fMBIntensity = 1.f;
|
||||
|
||||
float g_fWinSizeX;
|
||||
float g_fWinSizeY;
|
||||
|
||||
/* 디퓨즈 */
|
||||
vector g_vColor;
|
||||
float4 g_vColor;
|
||||
float g_fDiffuseAlpha;
|
||||
|
||||
float2 g_vDiffuseUVGainAmount;
|
||||
@@ -262,6 +270,14 @@ struct PS_BLUR_MESH_IN
|
||||
float4 vPrevProjPos : TEXCOORD5;
|
||||
};
|
||||
|
||||
struct PS_OUT_DELCAL
|
||||
{
|
||||
float4 vAlbedo : SV_TARGET0;
|
||||
float4 vNormal : SV_TARGET1;
|
||||
float4 vSurface : SV_Target2;
|
||||
};
|
||||
|
||||
|
||||
VS_BULR_MESH_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_BULR_MESH_OUT Out = (VS_BULR_MESH_OUT) 0;
|
||||
@@ -286,18 +302,18 @@ VS_BULR_MESH_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
|
||||
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -313,7 +329,7 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
|
||||
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
|
||||
|
||||
@@ -329,7 +345,7 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
row_major matrix PreWolrd_NonPosMatrix = g_PrevWorldMatrix;
|
||||
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matrix matPrevW, matPrevWV, matPrevWVP;
|
||||
|
||||
@@ -341,18 +357,18 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -370,15 +386,15 @@ VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
@@ -395,7 +411,7 @@ VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
|
||||
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
|
||||
|
||||
@@ -404,15 +420,15 @@ VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
return Out;
|
||||
@@ -439,18 +455,18 @@ VS_BULR_MESH_OUT VS_BLUR_MESH(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
|
||||
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
|
||||
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -487,11 +503,11 @@ struct PS_NOMAL_OUT
|
||||
|
||||
float4 DrawEffect(PS_IN In)
|
||||
{
|
||||
vector vMtrlDiffuse = vector(0.f ,0.f ,0.f ,0.f);
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDissolve;
|
||||
vector vMtrlDistortion;
|
||||
float4 vMtrlDiffuse = float4(0.f ,0.f ,0.f ,0.f);
|
||||
float4 vMtrlMask;
|
||||
float4 vMtrlNoise;
|
||||
float4 vMtrlDissolve;
|
||||
float4 vMtrlDistortion;
|
||||
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
|
||||
@@ -539,7 +555,7 @@ float4 DrawEffect(PS_IN In)
|
||||
|
||||
}
|
||||
|
||||
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
if (g_isDiffuse_R)
|
||||
vMtrlDiffuse.r = vDiffuse.r;
|
||||
@@ -595,7 +611,7 @@ float4 DrawEffect(PS_IN In)
|
||||
|
||||
if (g_isNoiseColor)
|
||||
{
|
||||
float fNoiseValue = vMtrlNoise.rgb;
|
||||
float fNoiseValue = vMtrlNoise.r;
|
||||
|
||||
if (g_isNoise_G == true)
|
||||
fNoiseValue = vMtrlNoise.g;
|
||||
@@ -607,7 +623,7 @@ float4 DrawEffect(PS_IN In)
|
||||
}
|
||||
|
||||
if (length(g_vNoiseColor) > FLT_EPSILON5)
|
||||
vMtrlDiffuse.rgb *= g_vNoiseColor;
|
||||
vMtrlDiffuse.rgb *= g_vNoiseColor.rgb;
|
||||
|
||||
|
||||
}
|
||||
@@ -680,10 +696,7 @@ float4 DrawEffect(PS_IN In)
|
||||
|
||||
vMtrlDiffuse.a *= g_fDiffuseAlpha;
|
||||
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
|
||||
|
||||
clip(vMtrlDiffuse.a - FLT_EPSILON5);
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
@@ -748,6 +761,8 @@ float4 DrawEffect(PS_IN In)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
if (g_fDissolveCutRatio <= fTimeRatio) // 일정 수준 이상 넘어가지 못하도록 막기
|
||||
{
|
||||
fTimeRatio = g_fDissolveCutRatio;
|
||||
@@ -760,15 +775,13 @@ float4 DrawEffect(PS_IN In)
|
||||
if (g_isNoDissolveSmoothStep == true)
|
||||
{
|
||||
fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
|
||||
|
||||
}
|
||||
|
||||
vMtrlDiffuse.a *= fFade;
|
||||
|
||||
}
|
||||
|
||||
if (vMtrlDiffuse.a <= FLT_EPSILON5)
|
||||
discard;
|
||||
clip(vMtrlDiffuse.a - FLT_EPSILON5);
|
||||
}
|
||||
|
||||
|
||||
@@ -777,7 +790,7 @@ float4 DrawEffect(PS_IN In)
|
||||
|
||||
float4 EmissiveDraw(PS_IN In, float4 Diffuse)
|
||||
{
|
||||
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float4 vEmissiveMtrl = float4(0.f, 0.f, 0.f, 0.f);
|
||||
float2 CenteredUV = In.vTexcoord - 0.5f;
|
||||
float fEmissive = 0.f;
|
||||
float fEmissiveStrength = g_fEmissiveStrength;
|
||||
@@ -830,9 +843,9 @@ float4 EmissiveDraw(PS_IN In, float4 Diffuse)
|
||||
|
||||
}
|
||||
|
||||
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
PS_OUT BlendedWeight(float4 fDiffuse, float fLinearZ)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float3 vColor = fDiffuse.rgb;
|
||||
float fAlpha = fDiffuse.a;
|
||||
@@ -853,9 +866,14 @@ PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
|
||||
//float fWeight = pow(fLinearZ, -2.5);
|
||||
|
||||
float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
// float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
float linearZPositive = max(fLinearZ, 1e-6f);
|
||||
float fWeight = clamp(pow(linearZPositive, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
|
||||
Out.vDiffuse = float4(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
Out.vRevealage.r = fAlpha;
|
||||
|
||||
@@ -904,6 +922,57 @@ float4 SoftEffect(PS_IN In, float4 vMtrlDiffuse)
|
||||
|
||||
}
|
||||
|
||||
float2 ComputeDecal(float4 vPosition , float4x4 LocalMatrixInv)
|
||||
{
|
||||
float2 vDecalUV;
|
||||
float2 vDepthUV;
|
||||
|
||||
//vDepthUV.x = vPosition.x / g_fWinSizeX;
|
||||
//vDepthUV.y = vPosition.y / g_fWinSizeY;
|
||||
|
||||
//float4 vDepthDesc = g_DepthTexture.Sample(DefaultSampler, vDepthUV);
|
||||
//float3 vNormalDesc = g_NormalMapTexture.Sample(DefaultSampler, vDepthUV).xyz;
|
||||
//vNormalDesc = normalize(vNormalDesc * 2.f - 1.f);
|
||||
|
||||
//float fViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
//float4 vPos;
|
||||
|
||||
//vPos.x = vDepthUV.x * 2.f - 1.f;
|
||||
//vPos.y = vDepthUV.y * -2.f + 1.f;
|
||||
//vPos.z = vDepthDesc.x;
|
||||
//vPos.w = 1.f;
|
||||
|
||||
//float4 vViewPos = mul(vPos, g_ProjMatrixInv);
|
||||
//vViewPos /= vViewPos.w;
|
||||
|
||||
//float4 vWorldPos = mul(vViewPos, g_ViewMatrixInv);
|
||||
|
||||
//vector vLocalPos = mul(vWorldPos, LocalMatrixInv);
|
||||
|
||||
//float3 ObjectAbsPos = abs(vLocalPos.xyz);
|
||||
|
||||
//clip(0.5f - ObjectAbsPos);
|
||||
|
||||
//float3 vAbsNormal = abs(vNormalDesc);
|
||||
|
||||
//int iAxisIndex = 0;
|
||||
|
||||
//if (vAbsNormal.y > vAbsNormal.x && vAbsNormal.y > vAbsNormal.z)
|
||||
// iAxisIndex = 1;
|
||||
//else if (vAbsNormal.z > vAbsNormal.x && vAbsNormal.z > vAbsNormal.y)
|
||||
// iAxisIndex = 2;
|
||||
|
||||
//if (0 == iAxisIndex)
|
||||
// vDecalUV = vLocalPos.zy + 0.5f * 2.f;
|
||||
//else if (1 == iAxisIndex)
|
||||
// vDecalUV = vLocalPos.xz + 0.5f * 2.f;
|
||||
//else
|
||||
// vDecalUV = vLocalPos.xy + 0.5f * 2.f;
|
||||
|
||||
return vDecalUV;
|
||||
}
|
||||
|
||||
PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
|
||||
{
|
||||
PS_IN PS_In;
|
||||
@@ -919,7 +988,7 @@ PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
|
||||
PS_In.vProjPos = In.vProjPos;
|
||||
PS_In.iGPUIndex = In.iGPUIndex;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
|
||||
@@ -958,9 +1027,9 @@ PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
|
||||
|
||||
PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
@@ -998,7 +1067,7 @@ VS_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
@@ -1021,7 +1090,7 @@ VS_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
@@ -1042,7 +1111,7 @@ VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
|
||||
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
|
||||
|
||||
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
|
||||
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
|
||||
|
||||
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
|
||||
|
||||
@@ -1051,7 +1120,7 @@ VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
@@ -1081,19 +1150,15 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
if (g_isBlurColor == true)
|
||||
{
|
||||
if (length(vMtrlDiffuse.rgb) < FLT_EPSILON5)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
clip(length(vMtrlDiffuse.rgb) - FLT_EPSILON5);
|
||||
|
||||
vMtrlDiffuse = vector(g_vBlurColor.rgb, vMtrlDiffuse.a);
|
||||
|
||||
vMtrlDiffuse = float4(g_vBlurColor.rgb, vMtrlDiffuse.a);
|
||||
}
|
||||
|
||||
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
|
||||
@@ -1111,7 +1176,7 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
|
||||
fBulrIntensity = saturate(fBulrIntensity);
|
||||
}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
|
||||
Out.vDiffuse = float4(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1120,19 +1185,15 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
if(g_isBlurColor == true)
|
||||
{
|
||||
if (length(vMtrlDiffuse.rgb) < FLT_EPSILON5)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
clip(length(vMtrlDiffuse.rgb) - FLT_EPSILON5);
|
||||
|
||||
vMtrlDiffuse = vector(g_vBlurColor.rgb, vMtrlDiffuse.a);
|
||||
|
||||
vMtrlDiffuse = float4(g_vBlurColor.rgb, vMtrlDiffuse.a);
|
||||
}
|
||||
|
||||
|
||||
@@ -1153,7 +1214,7 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
fBulrIntensity = saturate(fBulrIntensity);
|
||||
}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
|
||||
Out.vDiffuse = float4(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1166,7 +1227,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
|
||||
if (FLT_EPSILON5 >= (In.vLifeTime.x / In.vLifeTime.y))
|
||||
discard;
|
||||
|
||||
vector vMtrlDiffuse = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float4 vMtrlDiffuse = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
@@ -1202,7 +1263,7 @@ PS_BLNED_OUT PS_BLEND(PS_IN In)
|
||||
{
|
||||
PS_BLNED_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
@@ -1220,7 +1281,7 @@ PS_BLNED_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
|
||||
{
|
||||
PS_BLNED_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
@@ -1237,9 +1298,9 @@ PS_BLNED_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
|
||||
|
||||
PS_OUT PS_NO_DEPTH_COMPARE(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
@@ -1256,7 +1317,7 @@ PS_BLOOM_OUT PS_DISTORTION(PS_IN In)
|
||||
{
|
||||
PS_BLOOM_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
@@ -1298,7 +1359,6 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
|
||||
{
|
||||
PS_BLUR_MESH_OUT Out;
|
||||
|
||||
PS_OUT PS_Out;
|
||||
PS_IN PS_In;
|
||||
|
||||
PS_In.vPosition = In.vPosition;
|
||||
@@ -1311,7 +1371,7 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
|
||||
PS_In.vProjPos = In.vProjPos;
|
||||
PS_In.iGPUIndex = In.iGPUIndex;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
float4 vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = DrawEffect(PS_In);
|
||||
|
||||
@@ -1326,7 +1386,98 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
|
||||
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
|
||||
0.f, // 서페이스 파라미터
|
||||
1.f);
|
||||
1.f).rg;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT_DELCAL PS_DECAL(PS_BLUR_MESH_IN In)
|
||||
{
|
||||
PS_IN PS_In;
|
||||
PS_OUT_DELCAL Out;
|
||||
|
||||
PS_In.vPosition = In.vPosition;
|
||||
PS_In.vNormal = In.vNormal;
|
||||
PS_In.vTangent = In.vTangent;
|
||||
PS_In.vBinormal = In.vBinormal;
|
||||
PS_In.vTexcoord = In.vTexcoord;
|
||||
PS_In.vLifeTime = In.vLifeTime;
|
||||
PS_In.vWorldPos = In.vWorldPos;
|
||||
PS_In.vProjPos = In.vProjPos;
|
||||
PS_In.iGPUIndex = In.iGPUIndex;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
//PS_In.vTexcoord = ComputeDecal(In.vPosition, g_ParticleValue[In.iGPUIndex].LocalMatrixInv);
|
||||
|
||||
float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, PS_In.vTexcoord);
|
||||
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, PS_In.vTexcoord);
|
||||
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal.rgb);
|
||||
|
||||
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
|
||||
|
||||
|
||||
float fSurfaceParam = g_fUsingSurfaceParams;
|
||||
if (true == AlmostEqual7(g_fUsingSurfaceParams, 0.f))
|
||||
{
|
||||
fSurfaceParam = 0;
|
||||
}
|
||||
|
||||
vMtrlDiffuse = DrawEffect(PS_In);
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(PS_In, vMtrlDiffuse).rgb;
|
||||
|
||||
vMtrlDiffuse += RimLight(PS_In);
|
||||
|
||||
vSurface.b = 0.5f;
|
||||
|
||||
|
||||
Out.vAlbedo = vMtrlDiffuse;
|
||||
Out.vSurface = vSurface;
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_DECAL_WB(PS_BLUR_MESH_IN In)
|
||||
{
|
||||
PS_IN PS_In;
|
||||
PS_OUT Out;
|
||||
|
||||
PS_In.vPosition = In.vPosition;
|
||||
PS_In.vNormal = In.vNormal;
|
||||
PS_In.vTangent = In.vTangent;
|
||||
PS_In.vBinormal = In.vBinormal;
|
||||
PS_In.vTexcoord = In.vTexcoord;
|
||||
PS_In.vLifeTime = In.vLifeTime;
|
||||
PS_In.vWorldPos = In.vWorldPos;
|
||||
PS_In.vProjPos = In.vProjPos;
|
||||
PS_In.iGPUIndex = In.iGPUIndex;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
//PS_In.vTexcoord = ComputeDecal(In.vPosition, g_ParticleValue[In.iGPUIndex].LocalMatrixInv);
|
||||
vMtrlDiffuse = DrawEffect(PS_In);
|
||||
|
||||
vMtrlDiffuse = SoftEffect(PS_In, vMtrlDiffuse);
|
||||
|
||||
//int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
//float fDepthStencilValue = g_DepthStencilTexture.Load(int3(iTexel, 0)).r;
|
||||
|
||||
//float fbias = 0.000005f;
|
||||
|
||||
//if (fDepthStencilValue <= In.vProjPos.z / In.vProjPos.w + fbias)
|
||||
// discard;
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(PS_In, vMtrlDiffuse).rgb;
|
||||
|
||||
vMtrlDiffuse += RimLight(PS_In);
|
||||
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -1582,12 +1733,44 @@ technique11 DefaultTechnique
|
||||
pass Default_NonPos
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_NO_POS();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
//24
|
||||
pass NonWB_NonPos
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_Blend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN_NO_POS();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_NON_NORMALMAP();
|
||||
}
|
||||
|
||||
//25
|
||||
pass Decal
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_DECAL();
|
||||
}
|
||||
|
||||
//26
|
||||
pass Decal_WB
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Effect, 0);
|
||||
SetBlendState(BS_WB_Acc, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_DECAL_WB();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
|
||||
matrix matWV, matWVP;
|
||||
@@ -80,7 +80,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 tileUV = In.vWorldPos.xz / 16.f;
|
||||
|
||||
@@ -139,7 +139,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 tileUV = In.vWorldPos.xz / 16.f;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), In.TransformMatrix);
|
||||
|
||||
@@ -121,7 +121,7 @@ struct PS_OUT
|
||||
/* 픽셀 쉐이더 : 픽셀의 최종적인 색을 결정하낟. */
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -48,7 +48,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
@@ -57,7 +57,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
|
||||
PS_OUT PS_DECAL(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 vDepthUV;
|
||||
vDepthUV.x = In.vPosition.x / 1920.f;
|
||||
@@ -99,7 +99,7 @@ PS_OUT PS_DECAL(PS_IN In)
|
||||
|
||||
PS_OUT PS_DEBUG(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
Out.vColor = float4(1.f, 0.5f, 0.5f, 1.f);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
|
||||
VS_OUT VS_TRAIL(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
|
||||
matrix matWVP;
|
||||
@@ -137,7 +137,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
Out.vColor = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
@@ -145,7 +145,7 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
}
|
||||
PS_OUT PS_UVMove(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
|
||||
|
||||
@@ -297,7 +297,7 @@ float4 EmissiveDraw(PS_IN In)
|
||||
|
||||
PS_TRAILOUT PS_Trail(PS_IN In)
|
||||
{
|
||||
PS_TRAILOUT Out;
|
||||
PS_TRAILOUT Out = (PS_TRAILOUT)0;
|
||||
|
||||
int2 iTexel = int2(In.vPosition.xy);
|
||||
|
||||
@@ -367,7 +367,7 @@ struct PS_BLOOM_OUT
|
||||
|
||||
PS_BLUR_OUT PS_TRAIL_BLOOM(PS_IN In)
|
||||
{
|
||||
PS_BLUR_OUT Out;
|
||||
PS_BLUR_OUT Out = (PS_BLUR_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ struct VS_OUT
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
VS_OUT Out = (VS_OUT)0;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
@@ -46,12 +46,14 @@ struct PS_OUT
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
PS_OUT Out = (PS_OUT)0;
|
||||
|
||||
|
||||
|
||||
vector vMixedDiffuse = g_MixedDiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float fRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord);
|
||||
float fRevealage = clamp(g_RevealageTexture.Sample(PointSampler, In.vTexcoord).r, 0.f ,1.f);
|
||||
|
||||
|
||||
|
||||
|
||||
Out.vBackBuffer = vector(vMixedDiffuse.rgb / fRevealage , fRevealage);
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 211 KiB After Width: | Height: | Size: 175 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 122 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user