diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl deleted file mode 100644 index 04dfbea48..000000000 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ /dev/null @@ -1,2530 +0,0 @@ - -#include "Engine_Shader_Defines.hlsli" - -matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix; -Texture2D g_DepthTexture; - -float3 g_CamaraPosition; - -int g_iImageCountX; -int g_iImageCountY; - -uint g_iIndexU; -uint g_iIndexV; -uint g_iQuestType; -int g_iSpellType; - -float g_fPI; -float g_fFar; -float g_fBlinkTime; -float g_fTime; -float g_fFrame; -float g_fDeltaU; -float g_fDeltaV; -float g_fAlpha; -float g_fOwnerAlpha; -float g_fCanvasAlpha; -float g_fAngle; -float g_fMapAngle; -float g_fCoolTime; -float g_fHp; - -float2 g_fViewport; -float2 g_fOrigin_Size; -float2 g_fCurrent_Size; -float2 g_fPosition; -float2 g_fHpBG; -float2 g_Pos; -float2 g_fImageSize; - -float4 g_fNine_Slice; -float4 g_fImageUV; -float4 g_fImageUV1; - -uint g_iArrayCount; -float2 g_fItemPosition1; -float2 g_fItemImageSizes1; -float2 g_fItemPosition2; -float2 g_fItemImageSizes2; -float2 g_fImageSizes[4]; -float4 g_fImagesUV[4]; - -float4 g_fImageSipos1; -float4 g_fImageSipos2; -float4 g_fImageSipos3; - -Texture2D g_Texture; -Texture2D g_Texture1; -Texture2D g_Texture2; -Texture2D g_Texture3; -Texture2D g_Texture4; -Texture2D g_Texture5; -Texture2D g_Texture6; -Texture2D g_DiffuseTexture; -Texture2D g_MaskingTexture; - -int g_iHover; -int g_iBoosterOn; -int g_iBoosterOff; -int g_iClick; -int g_iColor; -int g_Count; -int g_ChaseCount; - -int g_iStep1 = 0; -int g_iStep2 = 0; -int g_iStep3 = 0; - -float2 g_Trail[200]; -float2 g_ChaseTrail[200]; - - -struct VS_IN -{ - float3 vPosition : POSITION; - float2 vTexcoord : TEXCOORD0; -}; - -struct VS_OUT -{ - float4 vPosition : SV_Position; - float2 vTexcoord : TEXCOORD0; -}; - -VS_OUT VS_MAIN(VS_IN In) -{ - VS_OUT Out; - - - matrix matWV, matWVP; - matWV = mul(g_WorldMatrix, g_ViewMatrix); - matWVP = mul(matWV, g_ProjMatrix); - - Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP); - Out.vTexcoord = In.vTexcoord; - - return Out; -} - -struct PS_IN -{ - float4 vPosition : SV_Position; - float2 vTexcoord : TEXCOORD0; -}; - -struct PS_OUT -{ - float4 vColor : SV_Target0; -}; - -PS_OUT PS_MAIN(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Texture_Color(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - - tex1.rgb *= Color.rgb; - - tex1.a *= Alpha; - Out.vColor = tex1; - return Out; -} - -PS_OUT PS_Logo(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha; - float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - float4 Dissolve = g_MaskingTexture.Sample(DefaultSampler, In.vTexcoord); - - if (g_fTime >= Dissolve.r) - discard; - - if (g_fTime != 0.f) - { - Color.a *= Dissolve.a; - } - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Logo_Text(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha; - float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color.rgb = (Color.rgb - 0.5f) * 1.2f + 0.5f; - - Color.rgb = pow(Color.rgb, 1.25f); - - float luminance = dot(Color.rgb, float3(0.299f, 0.587f, 0.114f)); - float light = smoothstep(0.7f, 0.92f, luminance); - Color.rgb *= (1.0f - light * 0.1f); - - Color.rgb = lerp(Color.rgb, Color.rgb * Color.rgb, 0.12f); - - Color.rgb *= 0.7f; - - Color.rgb = saturate(Color.rgb); - - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Logo_Glow(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord).r; - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - float3 Blue = float3(14.f, 180.f, 252.f) / 255.f; - - Color.a *= tex1; - tex2.rgb *= Color.a * 5.f * Alpha; - Color.rgb *= Blue; - - Color = lerp(Color, tex2, tex2.a); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_AlphaBlend(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color.rgb *= 1.5f; - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Clamp(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color.rgb = saturate(Color.rgb * g_fTime); - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Cursor(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); - float4 White = float4(1.f, 1.f, 1.f, 1.f); - - float2 UV = In.vTexcoord; - float2 Center = float2(0.5f, 0.5f); - - float CW = -g_fTime; - float CCW = g_fTime; - - float2 RedCircle = UV; - float2 RedUV = UV - Center; - - RedCircle.x = RedUV.x * cos(CCW) - RedUV.y * sin(CCW); - RedCircle.y = RedUV.x * sin(CCW) + RedUV.y * cos(CCW); - RedCircle = RedCircle + Center; - - float2 BlueCircle = UV; - float2 BlueUV = UV - Center; - - BlueCircle.x = BlueUV.x * cos(CW) - BlueUV.y * sin(CW); - BlueCircle.y = BlueUV.x * sin(CW) + BlueUV.y * cos(CW); - BlueCircle = BlueCircle + Center; - - - float4 Texture1 = g_Texture.Sample(ClampSampler, RedCircle); - float4 Texture2 = g_Texture2.Sample(ClampSampler, BlueCircle); - - if (Texture1.r >= 0.7f) - Color = Texture1; - - if (Texture2.b >= 0.7f) - Color = Texture2; - - if (all(Color.rgb <= 0.5f)) - discard; - - Color = White; - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Key_Hold_Rotation(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - float4 tex2 = g_Texture1.Sample(ClampSampler, Imagelocal); - if (inside1) - { - float2 center = float2(0.5f, 0.5f); - float2 dir = Imagelocal - center; - - float angle = atan2(dir.x, -dir.y); - if (angle < 0) - angle += g_fPI; - - float rotation = saturate(g_fTime) * g_fPI; - - tex2.rgb = (angle <= rotation) ? 1.0 : tex2.rgb; - - - Color = lerp(Color, tex2, tex2.a); - } - - - - float2 Imagetexpos2 = g_fImageSipos2.xy / g_fCurrent_Size; - float2 Imagetexsize2 = g_fImageSipos2.zw / g_fCurrent_Size; - float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; - bool inside2 = all(Imagelocal2 >= 0.0f && Imagelocal2 <= 1.0f); - if (inside2) - { - float2 atlasUV = g_fImageUV.xy + Imagelocal2 * (g_fImageUV.zw - g_fImageUV.xy); - float2 safeUV = saturate(atlasUV); - float4 tex3 = g_Texture2.Sample(ClampSampler, safeUV); - Color = lerp(Color, tex3, tex3.a); - } - - float2 Imagetexpos3 = g_fImageSipos3.xy / g_fCurrent_Size; - float2 Imagetexsize3 = g_fImageSipos3.zw / g_fCurrent_Size; - float2 Imagelocal3 = (In.vTexcoord - Imagetexpos3) / Imagetexsize3; - bool inside3 = all(Imagelocal3 >= 0.0f && Imagelocal3 <= 1.0f); - if (inside3) - { - float3 QuestColor = float3(253.f, 207.f, 11.f) / 255.f; - - float4 tex4 = g_Texture3.Sample(ClampSampler, Imagelocal3); - - if (g_iQuestType == 0) - { - - tex4.rgb *= QuestColor; - - } - - Color = lerp(Color, tex4, tex4.a); - } - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Mission(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); - - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - - tex1.a *= 0.5f; - - if (tex1.a >= 0.f) - Color = tex1; - - Color = lerp(Color, tex2, tex2.a); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Sptire_Sheet(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 UV = In.vTexcoord; - - int iTotalFrame = g_iImageCountX * g_iImageCountY; - - uint iCurrentFrame = uint(floor(g_fTime / g_fFrame)) % iTotalFrame; - - int iFrameX = iCurrentFrame % g_iImageCountX; - int iFrameY = iCurrentFrame / g_iImageCountX; - - float fFreamWidth = 1.0 / g_iImageCountX; - float fFreamHeight = 1.0 / g_iImageCountY; - - UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; - UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; - - float4 Texture = g_Texture.Sample(DefaultSampler, UV); - - Color = Texture; - - if (Color.r <= 0.4f) - discard; - - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_QuestType(PS_IN In) -{ - PS_OUT Out; - 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); - - if (g_iQuestType == 0) - { - if (Texture1.r >= 0.3f) - { - Texture1.rgb = Color; - } - } - - Texture1.a *= Alpha; - Out.vColor = Texture1; - - return Out; -} - -PS_OUT PS_Spell_Anim(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color = tex1; - - float2 texpos = g_fImageSipos1.xy / g_fCurrent_Size; - 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) - Color = lerp(Color, tex2, tex2.a); - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_NineSlice(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv); - - tex1.a *= 0.5f; - - if (tex1.a >= 0.f) - Color = tex1; - - Color = lerp(Color, tex2, tex2.a); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Rotation(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_fMapAngle) - uv.y * sin(g_fMapAngle); - Rotation.y = uv.x * sin(g_fMapAngle) + uv.y * cos(g_fMapAngle); - Rotation += center; - - float4 tex1 = g_Texture.Sample(BorderZeroLinearSampler, Rotation); - - if (tex1.a <= 0.f) - discard; - - color = tex1; - - color.a *= Alpha; - - Out.vColor = color; - return Out; - -} - -PS_OUT PS_Slot(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float2 center = float2(0.5f, 0.5f); - float2 uv = In.vTexcoord - center; - uv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - 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 color = g_Texture.Sample(ClampSampler, Rotation); - - color.a *= Alpha; - - Out.vColor = color; - - return Out; -} - -PS_OUT PS_SpellAnim(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; - uv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - 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; - - float2 startUV = g_fImageUV.xy; - float2 endUV = g_fImageUV.zw; - - float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); - - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); - float4 tex2 = g_Texture2.Sample(DefaultSampler, atlasUV); - - tex1.rgb *= 0.4f; - color = tex1; - tex2.rgb *= 0.3f; - - if (tex2.a >= 0.9f) - color = tex2; - float3 BGColor = float3(1.f, 1.f, 1.f); - - switch (g_iSpellType) - { - case 0: - BGColor = float3(220.f, 165.f, 70.f) / 255.f; - break; - case 1: - BGColor = float3(150.f, 120.f, 240.f) / 255.f; - break; - case 2: - BGColor = float3(190.f, 46., 34.f) / 255.f; - break; - case 3: - BGColor = float3(24.f, 190.f, 255.f) / 255.f; - break; - case 4: - BGColor = float3(200.f, 220.f, 150.f) / 255.f; - break; - case 5: - BGColor = float3(50.f, 150.f, 110.f) / 255.f; - break; - case 6: - BGColor = float3(0.f, 0.f, 0.f); - break; - } - float4 color1 = float4(1.f, 1.f, 1.f, 1.f); - - float2 OverrayUV = In.vTexcoord; - float CoolTime = 1.f - g_fDeltaV; - float CoolTime2 = 1.f - g_fDeltaV + 0.1f; - atlasUV = startUV + In.vTexcoord * (endUV - startUV); - float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV); - tex3.rgb *= BGColor; - float4 tex4 = g_Texture2.Sample(DefaultSampler, atlasUV); - - if (tex4.a >= 0.9f) - tex3 = tex4; - - color1 = tex3; - - float wave1 = sin(OverrayUV.x * 10.f + g_fTime) * 0.01f; - float wave2 = sin(OverrayUV.x * 10.f + g_fTime) * 0.01f; - float waveThreshold1 = CoolTime + wave1; - float waveThreshold2 = CoolTime2 + wave2; - float2 waveUV = float2(waveUV.x = OverrayUV.x * 2.f + g_fTime * 0.3f, waveUV.y = (OverrayUV.y - waveThreshold1) / (waveThreshold2 - waveThreshold1)); - waveUV = saturate(waveUV); - float tex5 = g_Texture3.Sample(DefaultSampler, waveUV).r; - - if (g_fDeltaV <= 1.f) - { - if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2) - { - color1.rgb += float3(1.f, 1.f, 1.f) * tex5 * g_fDeltaU; - } - } - - float waveThreshold = CoolTime + wave1; - - if (OverrayUV.y <= waveThreshold) - { - color1.a = 0.f; - } - - color = lerp(color, color1, color1.a); - - color.a *= Alpha; - - Out.vColor = color; - return Out; -} - -PS_OUT PS_HpBar(PS_IN In) -{ - PS_OUT Out; - 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); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv); - tex1.rgb = float3(255.f, 0.f, 0.f) / 255.f; - if (g_fHp <= 0.3f) - { - tex1.a *= (sin(g_fBlinkTime) * 0.25f + 0.75f) * 1.5f; - } - else - { - tex1.a = 0.f; - } - Color = tex1; - - float2 BGPos = g_Pos; - float2 BGSize = g_fImageSize; - float2 BGPixel = Finaluv * g_fOrigin_Size; - float2 localUV = (BGPixel - BGPos) / BGSize; - bool inside = all(localUV >= 0.0f && localUV <= 1.0f); - - float4 tex2 = g_Texture1.Sample(ClampSampler, localUV); - - if (inside) - Color = lerp(Color, tex2, tex2.a); - - float2 reversuv = In.vTexcoord; - - reversuv.x = 1.0f - localUV.x; - - float4 tex3 = g_Texture2.Sample(ClampSampler, localUV); - - if (reversuv.x >= g_fHp) - { - tex3.rgb = float3(0.f, 0.f, 0.f); - } - - float3 Green = (float3(112.f, 241.f, 31.f) / 255.f) * 1.2f; - float3 Red = (float3(255.f, 0.f, 0.f) / 255.f) * 1.2f; - - tex3.rgb *= lerp(Green, Red, g_fTime); - - if (all(Color.rgb >= float3(55.f / 255.f, 0.f / 255.f, 55.f / 255.f))) - Color = lerp(Color, tex3, tex3.a); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Magic_Meter(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float3 Blue = float3(41.f, 165.f, 255.f) / 255.f; - - float4 color = float4(1.f, 1.f, 1.f, 1.f); - float4 tex1 = g_Texture.Sample(ClampSampler, In.vTexcoord); - float4 tex2 = g_Texture1.Sample(ClampSampler, In.vTexcoord); - - float2 reverseuv = 1.f - In.vTexcoord; - - color = tex1; - tex2.rgb *= Blue * 1.5f; - - if (reverseuv.x >= g_fHp) - { - tex2.rgb = float3(0.f, 0.f, 0.f); - } - - if (all(color.rgb >= float3(65.f / 255.f, 65.f / 255.f, 65.f / 255.f))) - color = tex2; - - color.a *= Alpha; - - Out.vColor = color; - - return Out; -} - - -PS_OUT PS_Magic_Icon(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float2 center = float2(0.5f, 0.5f); - float2 BGuv = In.vTexcoord - center; - BGuv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - Rotation.x = BGuv.x * cos(g_fAngle) - BGuv.y * sin(g_fAngle); - Rotation.y = BGuv.x * sin(g_fAngle) + BGuv.y * cos(g_fAngle); - Rotation += center; - - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); - float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation); - - Color = tex1; - Color = lerp(tex1, tex2, tex2.a); - - float2 uv = In.vTexcoord; - float scale = 1.2; - - uv = (uv - center) * scale + center; - float4 tex3 = g_Texture2.Sample(ClampSampler, uv); - - - Color = Color * (1 - tex3.a) + tex3; - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_RemapUV(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - - float2 startUV = g_fImageUV.xy; - float2 endUV = g_fImageUV.zw; - - float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); - - float4 tex1 = g_Texture.Sample(DefaultSampler, atlasUV); - - Color = tex1; - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Revelio(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float2 UV = In.vTexcoord; - - //float2 Position[4]; - //float2 startUV[4]; - //float2 endUV[4]; - - //float2 Atlases[4]; - - //for (int i = 0; i < 4; ++i) - //{ - // Position[i] = g_fPosition[i]; - // startUV[i] = g_fImagesUV[i].xy; - // endUV[i] = g_fImagesUV[i].zw; - - // Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]); - //} - - //float4 tex1 = g_Texture.Sample(DefaultSampler, UV); - //float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]); - //float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]); - //float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]); - //float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]); - - - - ////float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Potion(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f); - - float2 center = float2(0.5f, 0.5f); - float2 uv = In.vTexcoord - center; - uv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - 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 tex1 = g_Texture.Sample(ClampSampler, Rotation); - Color = tex1; - - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - //Color += tex2; - float4 tex3 = g_Texture2.Sample(ClampSampler, Rotation); - Color = lerp(Color, tex3, tex3.a); - - float2 Potionuv = In.vTexcoord; - float scale = 1.2; - - Potionuv = (Potionuv - center) * scale + center; - float4 tex4 = g_Texture3.Sample(ClampSampler, Potionuv); - Color = lerp(Color, tex4, tex4.a); - - float2 tex5pos = g_Pos / g_fCurrent_Size; - float2 tex5size = g_fOrigin_Size / g_fCurrent_Size; - float2 tex5local = (In.vTexcoord - tex5pos) / tex5size; - bool inside = all(tex5local >= 0.0f && tex5local <= 1.0f); - float4 tex5 = g_Texture4.Sample(ClampSampler, tex5local); - if (inside) - Color = lerp(Color, tex5, tex5.a); - - Color.a *= Alpha; - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Magic_Item(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 color = float4(1.f, 1.f, 1.f, 1.f); - - float2 center = float2(0.5f, 0.5f); - float2 uv = In.vTexcoord - center; - uv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - 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; - - float2 startUV = g_fImageUV.xy; - float2 endUV = g_fImageUV.zw; - - float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); - - float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); - float4 tex2 = g_Texture3.Sample(ClampSampler, atlasUV); - - tex1.rgb *= 0.4f; - color = tex1; - tex2.rgb *= 0.3f; - - if (tex2.a >= 0.9f) - color = tex2; - float3 BGColor = float3(1.f, 1.f, 1.f); - - switch (g_iSpellType) - { - case 0: - BGColor = float3(50.f, 50.f, 50.f) / 255.f; - break; - case 1: - BGColor = float3(89.f, 32.f, 215.f) / 255.f; - break; - case 2: - BGColor = float3(190.f, 46., 34.f) / 255.f; - break; - case 3: - BGColor = float3(37.f, 129.f, 162.f) / 255.f; - break; - case 4: - BGColor = float3(134.f, 171.f, 78.f) / 255.f; - break; - } - - float4 color1 = float4(1.f, 1.f, 1.f, 1.f); - - float2 OverrayUV = In.vTexcoord; - float CoolTime = 0.f + g_fDeltaV; - float CoolTime2 = 0.f + g_fDeltaV + 0.1f; - atlasUV = startUV + In.vTexcoord * (endUV - startUV); - float4 tex3 = g_Texture1.Sample(ClampSampler, OverrayUV); - tex3.rgb *= BGColor; - float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV); - - if (g_fDeltaV <= 1.f) - { - if (tex4.a >= 0.9f) - tex3 = tex4; - - color1 = tex3; - - float wave1 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; - float wave2 = sin(OverrayUV.x * 10.f + g_fTime * 2.f) * 0.01f; - - float waveThreshold1 = CoolTime + wave1; - float waveThreshold2 = CoolTime2 + wave2; - float2 waveUV = float2(waveUV.x = OverrayUV.x * 2.f + g_fTime * 0.3f, waveUV.y = (OverrayUV.y - waveThreshold1) / (waveThreshold2 - waveThreshold1)); - waveUV = saturate(waveUV); - float Mask = g_MaskingTexture.Sample(DefaultSampler, waveUV).r; - if (g_fDeltaV <= 1.f) - { - if (OverrayUV.y >= waveThreshold1 && OverrayUV.y <= waveThreshold2) - { - color1.rgb += float3(1.f, 1.f, 1.f) * Mask * 1.f; - } - } - - float waveThreshold = CoolTime + wave1; - - if (OverrayUV.y <= waveThreshold) - { - color1.a = 0.f; - } - - color = lerp(color, color1, color1.a); - } - else if (g_fDeltaV >= 1.f) - color = lerp(color, tex4, tex4.a); - - float4 tex5 = g_Texture2.Sample(ClampSampler, Rotation); - color = lerp(color, tex5, tex5.a); - - float2 texpos1 = g_fItemPosition1 / g_fCurrent_Size; - float2 texpos2 = g_fItemPosition2 / g_fCurrent_Size; - float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size; - float2 texsize2 = g_fItemImageSizes2 / g_fCurrent_Size; - float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1; - float2 texlocal2 = (In.vTexcoord - texpos2) / texsize2; - - - bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f); - float4 tex6 = g_Texture4.Sample(DefaultSampler, texlocal1); - - if (inside1) - color = lerp(color, tex6, tex6.a); - - bool inside2 = all(texlocal2 >= 0.0f && texlocal2 <= 1.0f); - - float4 tex7 = g_Texture5.Sample(DefaultSampler, texlocal2); - if (inside2) - color = lerp(color, tex7, tex7.a); - - color.a *= Alpha; - - Out.vColor = color; - return Out; -} - -PS_OUT PS_Spell_Preview(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - float4 tex3 = g_Texture2.Sample(DefaultSampler, Finaluv); - Color = tex1; - - tex3.rgb = tex2.rgb; - - Color = lerp(Color, tex3, tex3.a); - - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - float4 tex4 = g_Texture3.Sample(DefaultSampler, Finaluv); - if (inside1) - { - Color = lerp(Color, tex4, tex4.a); - } - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Spell_Header(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float3 BGColor = float3(1.f, 1.f, 1.f); - - switch (g_iSpellType) - { - case 0: - BGColor = float3(220.f, 165.f, 70.f) / 255.f; - break; - case 1: - BGColor = float3(150.f, 120.f, 240.f) / 255.f; - break; - case 2: - BGColor = float3(190.f, 46., 34.f) / 255.f; - break; - case 3: - BGColor = float3(24.f, 190.f, 255.f) / 255.f; - break; - case 4: - BGColor = float3(200.f, 220.f, 150.f) / 255.f; - break; - case 5: - BGColor = float3(50.f, 150.f, 110.f) / 255.f; - break; - case 6: - BGColor = float3(0.f, 0.f, 0.f); - break; - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - Color.rgb = tex1.rgb * 0.8f; - Color.a = tex1.a; - - Color.rgb *= BGColor; - - Color.a *= Alpha * 0.5f; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Spell_Header_Line(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - - //Color.rgb = tex2.rgb; - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Spell_Drag(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r; - float4 tex2Color = g_Texture2.Sample(DefaultSampler, In.vTexcoord); - - tex2Color.a = tex2; - Color = lerp(tex1, tex2Color, tex2Color.a); - - float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy); - //float2 center = (g_fImageUV.xy + g_fImageUV.zw) * 0.5f; - //float2 uv = atlasUV - center; - //uv *= 0.7f; - //uv += center; - float4 tex3 = g_Texture3.Sample(ClampSampler, atlasUV); - - Color = lerp(Color, tex3, tex3.a); - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Camera_LockOn(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float2 center = float2(0.5, 0.5); - float2 uv = In.vTexcoord - center; - float angle = -g_fTime; - float s = sin(angle); - float c = cos(angle); - float2 maskuv = float2(uv.x * c - uv.y * s, uv.x * s + uv.y * c) + center; - - float tex1 = g_Texture.Sample(ClampSampler, maskuv).r; - - Color.a = tex1 * 0.3f; - - if (g_iHover == 0) - { - float4 tex2 = g_Texture1.Sample(ClampSampler, maskuv); - - Color.rgb += (tex2.rgb * tex2.a) * 2.f; - } - - float2 UpUV = In.vTexcoord; - UpUV.y += g_fTime; - - float4 tex3 = g_Texture2.Sample(DefaultSampler, UpUV); - float tex4 = g_Texture1.Sample(ClampSampler, In.vTexcoord).r; - - tex3.a *= tex4; - - Color = lerp(Color, tex3, tex3.a); - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Loding_Screen(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float4 tex2 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - Color = lerp(Color, tex2, tex2.a); - - //float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - //float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - //float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - //bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - //if (inside1) - //{ - // float2 uv = saturate(Imagelocal); - // float4 tex2 = g_Texture1.Sample(DefaultSampler, uv); - - // Color = lerp(Color, tex2, tex2.a); - //} - - Color.a *= Alpha; - - Out.vColor = Color; - - return Out; -} - -PS_OUT PS_Enemy_HpBer(PS_IN In) -{ - PS_OUT Out; - - 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); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv); - - Color = tex1; - - tex2.rgb *= float3(1.f, 0.f, 0.f); - - if (In.vTexcoord.x >= g_fHp) - { - tex2.rgb = float3(0.f, 0.f, 0.f); - } - - Color = lerp(Color, tex2, tex2.a); - - if (Color.a <= 0.f) - discard; - - if (g_iHover != 0) - { - float4 tex3 = g_Texture2.Sample(DefaultSampler, In.vTexcoord); - - tex3.rgb *= float3(1.f, 0.f, 0.f); - - if (g_fTime >= tex3.r) - { - Color.a *= tex3.r; - Color.rgb = float3(1.f, 0.f, 0.f); - } - } - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Boss_HpBer(PS_IN In) -{ - PS_OUT Out; - - 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); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv); - - Color = tex1; - - tex2.rgb *= float3(1.f, 0.f, 0.f); - - if (In.vTexcoord.x >= g_fHp) - { - tex2.rgb = float3(0.f, 0.f, 0.f); - } - - if (all(Color.rgb >= (float3(55.f, 55.f, 55.f) / 255.f))) - Color = tex2; - - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Quest_Border(PS_IN In) -{ - PS_OUT Out; - - 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); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - Color = tex1; - - if (g_iColor == 1) - Color.rgb *= float3(100.f, 0.f, 100.f) / 255.f; - - if (g_iColor == 2) - { - Color.rgb *= 0.3f; - } - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Quest_Info(PS_IN In) -{ - PS_OUT Out; - - 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); - float2 uv = In.vTexcoord; - float2 CurrentPixelPosition = uv * g_fCurrent_Size; - float OriginLeft = g_fNine_Slice.x; - float OriginRight = g_fNine_Slice.y; - float OriginTop = g_fNine_Slice.z; - float OriginBottom = g_fNine_Slice.w; - - float CurrentLeft = OriginLeft; - float CurrentRight = g_fCurrent_Size.x - (g_fOrigin_Size.x - OriginRight); - float CurrentTop = OriginTop; - float CurrentBottom = g_fCurrent_Size.y - (g_fOrigin_Size.y - OriginBottom); - - float2 Finaluv = In.vTexcoord; - - if (CurrentPixelPosition.x < CurrentLeft) - { - Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x; - } - else if (CurrentPixelPosition.x > CurrentRight) - { - float dist = CurrentPixelPosition.x - CurrentRight; - Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x; - } - else - { - float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft); - Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x); - } - - if (CurrentPixelPosition.y < CurrentTop) - { - Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y; - } - else if (CurrentPixelPosition.y > CurrentBottom) - { - float dist = CurrentPixelPosition.y - CurrentBottom; - Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y; - } - else - { - float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop); - Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y); - } - - float4 tex1 = g_Texture.Sample(DefaultSampler, Finaluv); - float4 tex2 = g_Texture1.Sample(DefaultSampler, Finaluv); - - Color = tex1; - - Color = lerp(Color, tex2, tex2.a); - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Quest_Status(PS_IN In) -{ - PS_OUT Out; - - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - if (g_iClick == 0) - { - if (g_iHover == 0) - { - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - tex1.rgb *= float3(60.f, 80.f, 150.f) / 255.f; - Color = tex1; - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); - if (inside1) - { - float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); - float2 safeUV = saturate(atlasUV); - float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); - Color = lerp(Color, tex2, tex2.a); - } - } - else - { - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); - if (inside1) - { - float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); - float2 safeUV = saturate(atlasUV); - float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); - Color = lerp(Color, tex2, tex2.a); - } - } - } - else - { - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); - if (inside1) - { - float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); - float2 safeUV = saturate(atlasUV); - float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); - Color = lerp(Color, tex2, tex2.a); - } - float mask = g_Texture2.Sample(DefaultSampler, In.vTexcoord).r; - float3 glowColor = float3(1.0f, 1.0f, 1.0f); - Color.rgb += glowColor * mask * 0.5f; - Color.rgb *= float3(140.f, 140.f, 20.f) / 255.f; - } - - - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_Broomstick(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 color = float4(1.f, 1.f, 1.f, 1.f); - - float2 center = float2(0.5f, 0.5f); - float2 uv = In.vTexcoord - center; - uv *= sqrt(2.0f); - float2 Rotation = In.vTexcoord; - 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 tex1 = g_Texture.Sample(ClampSampler, Rotation); - float4 tex2 = g_Texture1.Sample(ClampSampler, Rotation); - tex1.rgb *= 0.4f; - color = tex1; - tex2.rgb *= 0.3f; - - color = lerp(color, tex2, tex2.a); - - float2 texpos1 = g_fImageSipos1.xy / g_fCurrent_Size * 0.5f; - float2 texsize1 = g_fImageSipos1.zw / g_fCurrent_Size * 0.5; - float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1; - bool inside1 = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f); - if (inside1) - { - float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1); - color = lerp(color, tex3, tex3.a); - } - - float2 texpos2 = g_fImageSipos2.xy / g_fCurrent_Size; - float2 texsize2 = g_fImageSipos2.zw / g_fCurrent_Size; - float2 texlocal2 = (In.vTexcoord - texpos2) / texsize2; - bool inside2 = all(texlocal2 >= 0.0f && texlocal2 <= 1.0f); - if (inside2) - { - float2 startUV = g_fImageUV.xy; - float2 endUV = g_fImageUV.zw; - float2 atlasUV = atlasUV = startUV + texlocal2 * (endUV - startUV); - float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV); - color = lerp(color, tex4, tex4.a); - } - - color.a *= Alpha; - - Out.vColor = color; - return Out; -} - -PS_OUT PS_SpellLearn(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r; - Color = tex; - - tex1 *= 0.95f; - - Color.a = tex1; - - Color.a *= Alpha; - - Out.vColor = Color; - return Out; -} - -PS_OUT PS_SpellLearnColor(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - - float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); - float4 tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord); - Color = tex; - - Color.rgb *= tex1.rgb; - - float2 rectPos = g_fPosition - float2(256.f, 259.f); - float2 rectSize = g_fCurrent_Size; - - float2 itemPos = g_fItemPosition1; - float2 itemSize = g_fItemImageSizes1; - - float2 pixelPos; - pixelPos.x = rectPos.x + In.vTexcoord.x * rectSize.x; - pixelPos.y = rectPos.y + (1.0f - In.vTexcoord.y) * rectSize.y; - - if (pixelPos.x >= itemPos.x && - pixelPos.x <= itemPos.x + itemSize.x && - pixelPos.y >= itemPos.y && - pixelPos.y <= itemPos.y + itemSize.y) - { - Color.rgb = float3(0.f, 0.f, 1.f); - } - - for (int i = 0; i < g_Count; ++i) - { - float2 trailTopLeft = g_Trail[i]; - float2 trailCenter = trailTopLeft + itemSize / 2.0f; - - float halfWidth = itemSize.x / 2.0f + 12.f; - float halfHeight = itemSize.y / 2.0f + 12.f; - - if (pixelPos.x >= trailCenter.x - halfWidth && - pixelPos.x <= trailCenter.x + halfWidth && - pixelPos.y >= trailCenter.y - halfHeight && - pixelPos.y <= trailCenter.y + halfHeight) - { - Color.rgb = float3(20.f, 100.f, 180.f) / 255.f; - break; - } - } - - for (int j = 0; j < g_ChaseCount; ++j) - { - float2 ChaseTopLeft = g_ChaseTrail[j]; - float2 ChaseCenter = ChaseTopLeft + itemSize / 2.0f; - - float halfWidth = itemSize.x * 0.7f; - float halfHeight = itemSize.y * 0.7f; - - if (pixelPos.x >= ChaseCenter.x - halfWidth && - pixelPos.x <= ChaseCenter.x + halfWidth && - pixelPos.y >= ChaseCenter.y - halfHeight && - pixelPos.y <= ChaseCenter.y + halfHeight) - { - Color.rgb = float3(110.f, 5.f, 5.f) / 255.f; - break; - } - } - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -PS_OUT PS_SpellLearnBooster(PS_IN In) -{ - PS_OUT Out; - float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; - - float4 Color = float4(1.f, 1.f, 1.f, 1.f); - float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); - - Color = tex; - - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - - if (g_iBoosterOn == 0 && g_iBoosterOff == 0) - { - if (inside1) - { - float4 tex1 = g_Texture1.Sample(DefaultSampler, Imagelocal); - Color = lerp(Color, tex1, tex1.a); - } - } - else if (g_iBoosterOn != 0 && g_iBoosterOff == 0) - { - - float4 tex3 = g_Texture3.Sample(DefaultSampler, In.vTexcoord); - Color = lerp(Color, tex3, tex3.a); - } - else if (g_iBoosterOn == 0 && g_iBoosterOff != 0) - { - float4 tex2 = g_Texture2.Sample(DefaultSampler, In.vTexcoord); - - tex2.rgb *= float3(1.f, 0.f, 0.f); - Color = tex; - - Color = lerp(Color, tex2, tex2.a); - } - - Color.a *= Alpha; - Out.vColor = Color; - return Out; -} - -struct VS_IN3D -{ - float3 vPosition : POSITION; - float2 vTexcoord : TEXCOORD0; -}; - -struct VS_OUT3D -{ - float4 vPosition : SV_Position; - float2 vTexcoord : TEXCOORD0; -}; - -VS_OUT3D VS_MAIN3D(VS_IN3D In) -{ - VS_OUT3D Out; - - matrix matViewProj = mul(g_ViewMatrix, g_ProjMatrix); - - float2 Offset = In.vTexcoord - 0.5f; - float3 worldCenter = float3(g_WorldMatrix._41, g_WorldMatrix._42, g_WorldMatrix._43); - - - float3 vLook = normalize(g_CamaraPosition - worldCenter); - - vLook.y = 0.f; - vLook = normalize(vLook); - - float3 upDir = float3(0.f, 1.f, 0.f); - - float3 rightDir = normalize(cross(vLook, upDir)); - - float3 dirRight = rightDir * g_fCurrent_Size.x * Offset.x; - float3 dirUp = upDir * g_fCurrent_Size.y * Offset.y; - - float3 vertexPos = worldCenter + dirRight + dirUp; - - float2 TexCoord = In.vTexcoord; - TexCoord.y = 1.f - TexCoord.y; - - Out.vPosition = mul(float4(vertexPos, 1.f), matViewProj); - Out.vTexcoord = TexCoord; - return Out; -} - -PS_OUT PS_Enemy_Detection(PS_IN In) -{ - PS_OUT Out; - - float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); - - if (g_iStep1 != 0) - { - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - if (inside1) - { - float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); - - float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; - - Color = lerp(Color, tex3, tex3.a); - - float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); - float4 tex5 = g_Texture3.Sample(ClampSampler, Imagelocal2); - - float4 Color1 = tex4; - - Color1 = lerp(tex4, tex5, tex5.a); - - Imagelocal2.y = 1.f - Imagelocal2.y; - - if (Imagelocal2.y >= g_fTime) - { - Color1.a = 0.f; - } - - Color = lerp(Color, Color1, Color1.a); - - Color.a *= g_fAlpha; - Out.vColor = Color; - - return Out; - } - } - if (g_iStep2 != 0) - { - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - if (inside1) - { - float4 tex3 = g_Texture1.Sample(ClampSampler, Imagelocal); - - float2 Imagetexpos2 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize2 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal2 = (In.vTexcoord - Imagetexpos2) / Imagetexsize2; - - float4 tex4 = g_Texture2.Sample(ClampSampler, Imagelocal2); - float4 tex6 = g_Texture4.Sample(ClampSampler, Imagelocal2); - Color = lerp(Color, tex3, tex3.a); - float4 Color1 = tex4; - Color1 = lerp(tex4, tex6, tex6); - Color1.rgb *= float3(1.f, 1.f, 0.f); - Imagelocal2.y = 1.f - Imagelocal2.y; - if (Imagelocal2.y >= g_fTime) - { - Color1.a = 0.f; - } - Color = lerp(Color, Color1, Color1.a); - - Color.a *= g_fAlpha; - - Out.vColor = Color; - - return Out; - } - } - if (g_iStep3 != 0) - { - float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); - Color = tex1; - Color.rgb *= float3(1.f, 0.f, 0.f); - - float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; - float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; - float2 Imagelocal = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; - bool inside1 = all(Imagelocal >= 0.0f && Imagelocal <= 1.0f); - if (inside1) - { - float4 tex7 = g_Texture5.Sample(ClampSampler, Imagelocal); - - Color = lerp(Color, tex7, tex7.a); - - Color.a *= g_fAlpha; - Out.vColor = Color; - - return Out; - } - - } - - Color.a *= g_fAlpha; - Out.vColor = Color; - - return Out; -} - -VS_OUT3D VS_NONESIZE3D(VS_IN3D In) -{ - VS_OUT3D Out; - - float3 worldCenter = float3( - g_WorldMatrix._41, - g_WorldMatrix._42, - g_WorldMatrix._43 - ); - - float4 clipPos = mul( - float4(worldCenter, 1.f), - mul(g_ViewMatrix, g_ProjMatrix) - ); - - float w = clipPos.w; - - clipPos.xy /= w; - - float2 offset = In.vTexcoord - 0.5f; - float2 pixelOffset = offset * g_fCurrent_Size.xy; - - float2 ndcOffset; - ndcOffset.x = pixelOffset.x / g_fViewport.x * 2.f; - ndcOffset.y = pixelOffset.y / g_fViewport.y * 2.f; - - clipPos.xy += ndcOffset; - - clipPos.xy *= w; - clipPos.w = w; - - Out.vPosition = clipPos; - - float2 TexCoord = In.vTexcoord; - TexCoord.y = 1.f - TexCoord.y; - Out.vTexcoord = TexCoord; - - return Out; -} - -PS_OUT PS_Interaction_Object(PS_IN In) -{ - PS_OUT Out; - - float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha); - - float2 atlasUV = g_fImageUV.xy + In.vTexcoord * (g_fImageUV.zw - g_fImageUV.xy); - float2 safeUV = saturate(atlasUV); - float4 tex1 = g_Texture.Sample(DefaultSampler, safeUV); - - Color = tex1; - - Color.a *= g_fAlpha; - Out.vColor = Color; - - return Out; -} - -technique11 PosTexTechnique11 -{ - pass Default - { - SetRasterizerState(RS_Default); - 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_MAIN(); - } - - pass Texture_Color - { - SetRasterizerState(RS_Default); - 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_Texture_Color(); - } - - pass Logo - { - SetRasterizerState(RS_Default); - SetDepthStencilState(DSS_Default, 0); - SetBlendState(BS_UIBlend, 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_Logo(); - } - - pass Logo_Text - { - SetRasterizerState(RS_Default); - SetDepthStencilState(DSS_Default, 0); - SetBlendState(BS_UIBlend, 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_Logo_Text(); - } - - pass Logo_Glow - { - SetRasterizerState(RS_Default); - 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_Logo_Glow(); - } - - pass AlphaBlend - { - SetRasterizerState(RS_Default); - 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_AlphaBlend(); - } - - pass TextureClamp - { - SetRasterizerState(RS_Default); - 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_Clamp(); - } - - pass Mouse_Cursor - { - 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(); - GeometryShader = NULL; - PixelShader = compile ps_5_0 PS_Cursor(); - } - - pass Sptire_Sheet - { - SetRasterizerState(RS_Default); - SetDepthStencilState(DSS_Default, 0); - SetBlendState(BS_UIBlend, 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_Sptire_Sheet(); - } - - pass Key_Hold_Rotation - { - SetRasterizerState(RS_Default); - 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_Key_Hold_Rotation(); - } - - pass Mission - { - SetRasterizerState(RS_Default); - 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_Mission(); - } - - pass QuestType - { - SetRasterizerState(RS_Default); - 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_QuestType(); - } - - pass Spell_Anim - { - SetRasterizerState(RS_Default); - 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_Spell_Anim(); - } - - pass NineSlice - { - SetRasterizerState(RS_Default); - 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_NineSlice(); - } - - pass Rotation - { - SetRasterizerState(RS_Default); - 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_Rotation(); - } - - pass Slot - { - SetRasterizerState(RS_Default); - 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_Slot(); - } - - pass SpellAnim - { - SetRasterizerState(RS_Default); - 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_SpellAnim(); - } - pass HpBar - { - SetRasterizerState(RS_Default); - 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_HpBar(); - } - pass Magic_Meter - { - SetRasterizerState(RS_Default); - 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_Magic_Meter(); - } - - pass Magic_Icon - { - SetRasterizerState(RS_Default); - 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_Magic_Icon(); - } - - pass RemapUV - { - SetRasterizerState(RS_Default); - 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_RemapUV(); - } - - pass Revelio - { - SetRasterizerState(RS_Default); - 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_Revelio(); - } - - pass Potion - { - SetRasterizerState(RS_Default); - 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_Potion(); - } - - pass Magic_Item - { - SetRasterizerState(RS_Default); - 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_Magic_Item(); - } - - pass Spell_Preview - { - SetRasterizerState(RS_Default); - 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_Spell_Preview(); - } - - pass Spell_Header - { - SetRasterizerState(RS_Default); - 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_Spell_Header(); - } - - pass Spell_Header_Line - { - SetRasterizerState(RS_Default); - 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_Spell_Header_Line(); - } - - pass Spell_Drag - { - SetRasterizerState(RS_Default); - 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_Spell_Drag(); - } - - pass Camera_LockOn - { - SetRasterizerState(RS_Default); - 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_Camera_LockOn(); - } - - pass Loding_Screen - { - SetRasterizerState(RS_Default); - 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_Loding_Screen(); - } - - pass Enemy_HpBer - { - SetRasterizerState(RS_Default); - 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_Enemy_HpBer(); - } - - pass Boss_HpBer - { - SetRasterizerState(RS_Default); - 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_Boss_HpBer(); - } - - pass Quest_Border - { - 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_Quest_Border(); - } - - pass Quest_Info - { - 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_Quest_Info(); - } - - pass Quest_Status - { - 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_Quest_Status(); - } - - pass Broomstick - { - 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_Broomstick(); - } - - pass SpellLearn - { - 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_SpellLearn(); - } - - pass SpellLearnColor - { - 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_SpellLearnColor(); - } - - pass SpellLearnBooster - { - 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_SpellLearnBooster(); - } - - pass Enemy_Detection - { - 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_MAIN3D(); - GeometryShader = NULL; - PixelShader = compile ps_5_0 PS_Enemy_Detection(); - } - - pass Interaction_Object - { - 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_Interaction_Object(); - } -} diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 08b0a68b2..8b172a0a1 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -162,6 +162,7 @@ call Update_Resources.bat + @@ -394,6 +395,7 @@ call Update_Resources.bat + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index fd36aa641..580e8a553 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -691,7 +691,7 @@ 02.GameObjects\Effect\Effects\Avadakedavra - + 02.GameObjects\UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Slot @@ -716,6 +716,9 @@ 04.Mechanic\State\Focus\State_Fall + + 02.GameObjects\Effect\Effects\Avadakedavra\AvadakedavraSide + @@ -1466,7 +1469,7 @@ {575f6ef3-7013-448a-b448-e94f1ddc5647} - + {d9c0bcb6-64f6-4b58-a68d-ff04c91b9861} @@ -1491,6 +1494,9 @@ {b85f80a2-d88e-4eb0-91af-da93b49bfa09} + + {f9c3f711-4032-4455-9d70-b81c5320f8c8} + @@ -2126,7 +2132,7 @@ 02.GameObjects\Effect\Effects\Avadakedavra - + 02.GameObjects\NPC\Ally\GateKeeper @@ -2154,6 +2160,9 @@ 04.Mechanic\State\Focus\State_Fall + + 02.GameObjects\Effect\Effects\Avadakedavra\AvadakedavraSide + diff --git a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp index a644cfbf2..3308e59d1 100644 --- a/Jusin154_Team3D/Client/Private/Avadakedavra.cpp +++ b/Jusin154_Team3D/Client/Private/Avadakedavra.cpp @@ -39,7 +39,7 @@ HRESULT CAvadakedavra::Initialize(void* pArg) if (FAILED(Create_Effect())) return E_FAIL; - m_iSkillType = ENUM_CLASS(SKILL_TYPE::AVADA_KEDAVRA); + m_iSkillType = ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA); m_wstrEffectName = L"Avadakedavra"; @@ -102,73 +102,82 @@ HRESULT CAvadakedavra::Pre_Setting(CGameObject* pObject, void* pArg) return E_FAIL; + _vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + + /*완드 포지션*/ + + _vector vWandPos = pWand->Get_WorldPostion(); + + XMStoreFloat3(&m_vCameraLook, vDirection); + + //_vector vStartPos = vWandPos; + XMStoreFloat4(&m_vStartPos, vWandPos); + + { /* 대상 위치 지정 */ + + m_pInfoInstance->Get_LockOnInfo(m_Info); + + if (nullptr != m_Info.pUnit) { + + XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + + XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); + } + else { + // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정 + XMStoreFloat4(&m_vTargetPos, vWandPos + vDirection * m_fLinearSpeed * 0.5f); + } + } - //_vector vDirection = m_pOwner->Get_Component()->Get_State(STATE::LOOK); + CEffectParts* pCircle_0 = Get_PartObject("Circle_0"); + CEffectParts* pCircle_Blur = Get_PartObject("Circle_Blur"); + CEffectParts* pCircle_1 = Get_PartObject("Circle_1"); + CEffectParts* pCircle_Blur_Big = Get_PartObject("Circle_Blur_Big"); - ///*완드 포지션*/ + CEffectParts* pHit_Light = Get_PartObject("Hit_Light"); + CEffectParts* pHit_PT_G = Get_PartObject("Hit_PT_G"); + CEffectParts* pHit_PT_G_Small = Get_PartObject("Hit_PT_G_Small"); + CEffectParts* pRay_G = Get_PartObject("Ray_G"); + CEffectParts* pSmoke_Black = Get_PartObject("Smoke_Black"); - //_vector vWandPos = pWand->Get_WorldPostion(); + pCircle_0->Get_Component()->Set_State(STATE::POSITION , XMLoadFloat4(&m_vTargetPos)); + pCircle_Blur->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pHit_Light->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pHit_PT_G->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pSmoke_Black->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); - //pStupefy_PJ0->Get_Component()->Set_State(STATE::POSITION, vWandPos); - //pStupefy_PJ1->Get_Component()->Set_State(STATE::POSITION, vWandPos); - - //m_pStupefy_PJ_PT->Get_Component()->Set_State(STATE::POSITION, vWandPos); - - //pStupefy_Light_Long->Get_Component()->Set_State(STATE::POSITION, vWandPos); - //pBodyFlare->Get_Component()->Set_State(STATE::POSITION, vWandPos); - //// - ///*몸통 포지션*/ - - //_vector vPlayerPos = m_pOwner->Get_Component()->Get_Position() + vDirection * -0.1f; - - //pWand_Distortion->Get_Component()->Set_State(STATE::POSITION, vPlayerPos); - ///*발 포지션*/ - - //_vector vPlayerFootPos = m_pOwner->Get_Component()->Get_FootPosition(); - - //pStupefy_Smoke->Get_Component()->Set_State(STATE::POSITION, vPlayerFootPos + XMVectorSet(0.f ,1.f ,0.f ,0.f)); + pCircle_1->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pCircle_Blur_Big->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos)); + pHit_PT_G_Small->Get_Component()->Set_State(STATE::POSITION, XMLoadFloat4(&m_vTargetPos) - 1.f * XMLoadFloat3(&m_vCameraLook)); + pCircle_0->Set_Visible(true); + pCircle_Blur->Set_Visible(true); + pHit_Light->Set_Visible(true); + pHit_PT_G->Set_Visible(true); + pSmoke_Black->Set_Visible(true); + pRay_G->Set_Visible(true); + pHit_PT_G_Small->Set_Visible(true); - //XMStoreFloat3(&m_vCameraLook, vDirection); + pCircle_1->Set_Visible(true); + pCircle_Blur_Big->Set_Visible(true); - ////_vector vStartPos = vWandPos; - //XMStoreFloat4(&m_vStartPos, vStartPos); + /* RAY 월드 구성하기 */ - //{ /* 대상 위치 지정 */ + _float fLength = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - vWandPos)) * 0.5f; - // m_pInfoInstance->Get_LockOnInfo(m_Info); - // if (nullptr != m_Info.pUnit) { + CTransform* pRay_Transform = pRay_G->Get_Component(); - // XMStoreFloat4(&m_vTargetPos, m_Info.pUnit->Get_LockOnPos()); + _vector vRight = XMVector3Normalize(XMLoadFloat3(&m_vCameraLook)) * fLength * -1.f; + _vector vUp = XMVector3Normalize( XMVector3Cross(XMVectorSet(0.f, 0.f, 1.f, 0.f) , vRight)); + _vector vLook = XMVector3Normalize(XMVector3Cross(vRight , vUp)); + _vector vPos = vWandPos; - // XMStoreFloat3(&m_vCameraLook, XMVector3Normalize(XMLoadFloat4(&m_vTargetPos) - XMLoadFloat4(&m_vStartPos))); - // } - // else { - // // 타겟이 없다면 현재위치 -> 카메라 룩벡터 * duration간 예상 이동거리 를 대상으로 지정 - // XMStoreFloat4(&m_vTargetPos, vStartPos + vDirection * m_fLinearSpeed * 0.5f); - // } - //} + _matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos }; - - /* PJ 월드 구성하기 */ - - //_float fLength = XMVectorGetX(XMVector3Length(XMLoadFloat4(&m_vTargetPos) - vPlayerPos)); - - //CTransform* pPJ0_Transform = pStupefy_PJ0->Get_Component(); - //CTransform* pPJ1_Transform = pStupefy_PJ1->Get_Component(); - - //_vector vUp = XMVector3Normalize(vDirection) * fLength; - //_vector vRight = XMVector3Normalize(XMVector3Cross(XMVectorSet(0.f, 0.f, 1.f, 0.f) , vUp)); - //_vector vLook = XMVector3Normalize(XMVector3Cross(vUp, vRight)); - //_vector vPos = vPlayerPos; - - //_matrix PJ_WorldMat = { vRight , vUp ,vLook , vPos }; - - //pPJ0_Transform->Set_WorldMatrix(PJ_WorldMat); - //pPJ1_Transform->Set_WorldMatrix(PJ_WorldMat); + pRay_Transform->Set_WorldMatrix(PJ_WorldMat); return S_OK; } @@ -223,20 +232,7 @@ void CAvadakedavra::OnCollision(CGameObject* pOther, void* pDesc) _vector vPos = XMLoadFloat4(&CollisionDesc.vWorldPos); - CEffectParts* pStupefy_Hit_PT = Get_PartObject("Stupefy_Hit_PT"); - CEffectParts* pStupefy_Circle0 = Get_PartObject("Stupefy_Circle0"); - CEffectParts* pHitFlare = Get_PartObject("HitFlare"); - - pStupefy_Hit_PT->Set_Visible(true); - pStupefy_Hit_PT->Get_Component()->Set_State(STATE::POSITION, vPos); - pStupefy_Circle0->Set_Visible(true); - pStupefy_Circle0->Get_Component()->Set_State(STATE::POSITION, vPos); - pHitFlare->Set_Visible(true); - pHitFlare->Get_Component()->Set_State(STATE::POSITION, vPos); - - - // //m_pProjectile0->Set_Visible(false); //m_pProjectile1->Set_Visible(false); diff --git a/Jusin154_Team3D/Client/Private/AvadakedavraSide.cpp b/Jusin154_Team3D/Client/Private/AvadakedavraSide.cpp new file mode 100644 index 000000000..f296980c8 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/AvadakedavraSide.cpp @@ -0,0 +1,220 @@ +#include "pch.h" +#include "AvadakedavraSide.h" + +#include "GameInstance.h" +#include "EffectParts.h" +#include "Player.h" +#include "Wand.h" +#include "TrailObject.h" + + +CAvadakedavraSide::CAvadakedavraSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + : CEffect_Container{ pDevice, pContext } +{ +} + +CAvadakedavraSide::CAvadakedavraSide(const CAvadakedavraSide& rhs) + : CEffect_Container(rhs) +{ +} + +HRESULT CAvadakedavraSide::Initialize_Prototype() +{ + + if (FAILED(Load_Package("../Bin/Resources/Data/Effect/Package/AvadakedavraSide"))) + return E_FAIL; + + return S_OK; + +} + +HRESULT CAvadakedavraSide::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"BombardSide"; + + + m_pWandParticle = Get_PartObject("WandParticle0"); + m_pWandLight = Get_PartObject("Wand_Light_G"); + m_pWandGoo = Get_PartObject("Wand_Goo"); + m_pWandTrail = Get_PartObject(); + + SAFE_ADDREF(m_pWandLight); + SAFE_ADDREF(m_pWandTrail); + SAFE_ADDREF(m_pWandParticle); + SAFE_ADDREF(m_pWandGoo); + + m_fDuration = 3.f; + + m_Events.emplace(1.f, [&]() { + m_isParticleEnd = true; + m_pWandParticle->Get_Component()->Set_State(STATE::POSITION, XMVectorSet(0.f, -500.f, 0.f, 1.f)); + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + m_isTrailEnd = true; + + XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix()); + }); + + return S_OK; +} + +void CAvadakedavraSide::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); + +} + +void CAvadakedavraSide::Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Update(fTimeDelta); + + Update_Event(fTimeDelta); + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return; + + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pWandGoo->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + // 파티클생성이 막히면 실행되지 않음 + if (m_isParticleEnd == false) + m_pWandParticle->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + // 트레일이 종료되면 위치를 고정함 + _matrix TrailMat = m_isTrailEnd ? XMLoadFloat4x4(&m_TrailStopMat) : pWand->Get_WorldMatrix(); + m_pWandTrail->Oneside_Rope_Trail_Update(TrailMat, fTimeDelta); + +} + +void CAvadakedavraSide::Late_Update(_float fTimeDelta) +{ + if (m_bVisible == false) + return; + + __super::Late_Update(fTimeDelta); + + +} + +HRESULT CAvadakedavraSide::Pre_Setting(CGameObject* pObject, void* pArg) +{ + if (FAILED(__super::Pre_Setting(pObject, nullptr))) + return E_FAIL; + + + CWand* pWand = static_cast(m_pOwner); + + if (pWand == nullptr) + return E_FAIL; + + m_pWandParticle->Set_Visible(true); + m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고 + + m_pWandLight->Set_Visible(true); + m_pWandGoo->Set_Visible(true); + + /*트레일 초기화 */ + m_pWandTrail->Set_Visible(true); + m_isTrailEnd = false; + m_pWandTrail->Get_Component()->Reset_Trail(); + + /*_vector pPos = pPlayer->Get_WandPos().r[3];*/ + + m_pWandLight->Get_Component()->Set_State(STATE::POSITION, pWand->Get_WorldPostion()); + m_pWandGoo->Get_Component()->Set_WorldMatrix(pWand->Get_WorldMatrix()); + + return S_OK; +} + +HRESULT CAvadakedavraSide::Ready_Components(void* pArg) +{ + if (FAILED(__super::Ready_Components(pArg))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CAvadakedavraSide::Ready_Child() +{ + return S_OK; +} + +CAvadakedavraSide* CAvadakedavraSide::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CAvadakedavraSide* pInstance = new CAvadakedavraSide(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CAvadakedavraSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + + +CGameObject* CAvadakedavraSide::Clone(void* pArg, CGameObject* pOwner) +{ + CAvadakedavraSide* pInstance = new CAvadakedavraSide(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CAvadakedavraSide"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CAvadakedavraSide::OnCollision(CGameObject* pOther, void* pDesc) +{ + ON_COLLISION_INFO* CollisionDesc = static_cast(pDesc); + +} + +void CAvadakedavraSide::Free() +{ + __super::Free(); + + + Safe_Release(m_pWandLight); + Safe_Release(m_pWandTrail); + Safe_Release(m_pWandParticle); + Safe_Release(m_pWandGoo); +} +#ifdef _DEBUG + +void CAvadakedavraSide::Describe_Entity() +{ + +} + +#endif // _DEBUG + +HRESULT CAvadakedavraSide::Bind_ShaderResources() +{ + return S_OK; +} + + diff --git a/Jusin154_Team3D/Client/Private/EffectPool.cpp b/Jusin154_Team3D/Client/Private/EffectPool.cpp index c73f93f52..48c1be54d 100644 --- a/Jusin154_Team3D/Client/Private/EffectPool.cpp +++ b/Jusin154_Team3D/Client/Private/EffectPool.cpp @@ -14,6 +14,8 @@ #include "BombardSide.h" #include "LeviosoSide.h" #include "DecendoSide.h" +#include "AvadakedavraSide.h" +#include "TransformationSide.h" #include "NomalJapSide.h" #include "Lumos.h" @@ -39,7 +41,8 @@ #include "LightningSide.h" #include "Blink.h" #include "Transformation.h" -#include "TransformationSide.h" +#include "Avadakedavra.h" + CEffectPool::CEffectPool(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CGameObject(pDevice, pContext) @@ -78,7 +81,7 @@ HRESULT CEffectPool::Initialize(void* pArg) #endif // #ifdef 진우 m_isActiveEffectCreate = true; - m_isActiveMonsterEffectCreate = true; + m_isActiveMonsterEffectCreate = false; #endif // #ifdef 기무리 m_isActiveEffectCreate = true; @@ -431,6 +434,24 @@ HRESULT CEffectPool::Ready_Effect() return pEffect; } ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::AVADAKEDAVRA, 3, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CAvadakedavra* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; + + if (FAILED(Create_Effect(SKILL_TYPE::AVADAKEDAVRA_SIDE, 3, g_iStaticLevel, g_iStaticLevel, [&](_uint iPrototypeLevel, _uint iCloneLevel) -> CEffect_Container* { + + CAvadakedavraSide* pEffect = nullptr; + + pEffect = m_pGameInstance->Clone_Prototype(iPrototypeLevel, nullptr); + + return pEffect; } + ))) return E_FAIL; return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp index b26fcaa24..8d0710d35 100644 --- a/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp +++ b/Jusin154_Team3D/Client/Private/Level_GamePlay.cpp @@ -27,6 +27,7 @@ #include "Goblin_Mage.h" #include "Goblin_Spector.h" #include "NPC_Ollivander.h" +#include "NPC_EleazarFig.h" #include "BroomRacerAI.h" #include "Ranrok.h" #pragma endregion @@ -580,9 +581,21 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag) return E_FAIL; } - - if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag))) { - return E_FAIL; + { + CNPC_Ollivander::NPCDESC NPCDesc{}; + NPCDesc.vPos = _float4(40.f, 4.f, 68.9f, 1.f); + NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) { + return E_FAIL; + } + } + { + CNPC_EleazarFig::NPCDESC NPCDesc{}; + NPCDesc.vPos = _float4(101.f, 14.f, 100.f, 1.f); + NPCDesc.vRotQ = _float4(0.f, 0.f, 0.f, 1.f); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, strLayerTag, &NPCDesc))) { + return E_FAIL; + } } return S_OK; diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index d99b4e667..9e04c2271 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -31,6 +31,7 @@ #include "Goblin_Spector.h" #include "Troll.h" #include "NPC_Ollivander.h" +#include "NPC_EleazarFig.h" #include "BroomRacerAI.h" #include "Ranrok.h" @@ -149,6 +150,7 @@ #include "BombardSide.h" #include "LeviosoSide.h" #include "TransformationSide.h" +#include "AvadakedavraSide.h" #include "TrailObject.h" #include "Instance_Model.h" @@ -158,6 +160,7 @@ #include "Lumos.h" #include "Accio.h" #include "Blink.h" +#include "Avadakedavra.h" #include "Goblin_Teleport.h" @@ -1874,6 +1877,11 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Professor_EleazarFig_Model"), + CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Troll_Model"), CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity())))){ return E_FAIL; @@ -1992,6 +2000,10 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CAvadakedavraSide::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CTrollSwing::Create(m_pDevice, m_pContext)))) { return E_FAIL; } @@ -2061,6 +2073,10 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CAvadakedavra::Create(m_pDevice, m_pContext)))) { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CGoblin_Teleport::Create(m_pDevice, m_pContext)))) { @@ -2764,6 +2780,11 @@ HRESULT CLoader::Loading_For_GamePlay() return E_FAIL; } + /* For.Prototype_GameObject_EleazarFig */ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CNPC_EleazarFig::Create(m_pDevice, m_pContext)))){ + return E_FAIL; + } + /* For.Prototype_GameObject_Ranrok */ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CRanrok::Create(m_pDevice, m_pContext)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp index 72c108d92..025f96a04 100644 --- a/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp +++ b/Jusin154_Team3D/Client/Private/MapElement_Interactable.cpp @@ -487,7 +487,7 @@ void CMapElement_Interactable::Free() SAFE_RELEASE(m_pRigidBody); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pEffectPool); - + if (nullptr != m_pInfoInstance) { CInfoInstance* pInfo = m_pInfoInstance; m_pInfoInstance = nullptr; diff --git a/Jusin154_Team3D/Client/Private/NPC_EleazarFig.cpp b/Jusin154_Team3D/Client/Private/NPC_EleazarFig.cpp index 690100725..8f0bff5d1 100644 --- a/Jusin154_Team3D/Client/Private/NPC_EleazarFig.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_EleazarFig.cpp @@ -4,6 +4,8 @@ #include "GameInstance.h" #include "InfoInstance.h" #include "Player.h" +#include "CallBack_NonPlayable_Behavior.h" +#include "CallBack_NonPlayable_HitReport.h" CNPC_EleazarFig::CNPC_EleazarFig(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) : CUnit(pDevice, pContext) @@ -25,23 +27,27 @@ void CNPC_EleazarFig::Priority_Update(_float fTimeDelta) void CNPC_EleazarFig::Update(_float fTimeDelta) { m_pFSM->Update_State(fTimeDelta); - if (m_pModelCom->IsFinishedAnim()) { - m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); - } m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom); __super::Update(fTimeDelta); #ifdef _DEBUG Describe_Entity(); #endif // _DEBUG + { // 세트 + m_pCallBack_HitReport->BeginFrame(); + m_pCharacter_Controller->Move(fTimeDelta); + m_pCallBack_HitReport->Set_CurrentSlop(); + } } void CNPC_EleazarFig::Late_Update(_float fTimeDelta) { - m_pTransformCom->Set_State(STATE::POSITION, m_pTransformCom->Get_EstimatedPositionByMomentum()); + m_pTransformCom->Set_State(STATE::POSITION, m_pCharacter_Controller->Get_FootPosition()); m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this); + Set_Shadow(m_pGameInstance->IsIn_ShadowViewFrustum(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_Radius())); + __super::Late_Update(fTimeDelta); } @@ -72,6 +78,7 @@ HRESULT CNPC_EleazarFig::Render() } 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; @@ -145,6 +152,19 @@ HRESULT CNPC_EleazarFig::Bind_ShaderResources() return S_OK; } +_bool CNPC_EleazarFig::CastToPlayer() +{ + _vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION); + _vector vTargetPos = {}; + pair pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION)); + vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION); + _float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos)); + if (fLength < m_fEncounterDistance) { + return true; + } + return false; +} + HRESULT CNPC_EleazarFig::Initialize_Prototype() { return S_OK; @@ -158,14 +178,28 @@ HRESULT CNPC_EleazarFig::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) { return E_FAIL; } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f)); - m_pModelCom->Set_AnimationIndex(m_pGameInstance->Random_Int(0, 19), false); + NPCDESC* pDesc = static_cast(pArg); + + _vector vPos = XMLoadFloat4(&pDesc->vPos); + m_pTransformCom->Set_State(STATE::POSITION, vPos); + m_pCharacter_Controller->Set_Position(vPos); + m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ)); + + m_pModelCom->Set_AnimationIndex(0, true); + m_pCallBack_Behavior->Initialize(m_pCharacter_Controller); + m_pCallBack_HitReport->Initialize(m_pCharacter_Controller); return S_OK; } HRESULT CNPC_EleazarFig::Ready_Components(void* pArg) { - if (FAILED(__super::Ready_Components(pArg))) { + CTransform::TRANSFORM_DESC Desc = {}; + + Desc.fSpeedPerSec = 10.f; + Desc.fRotationPerSec = XMConvertToRadians(180.0f); + Desc.fRadius = 10.f; + + if (FAILED(__super::Ready_Components(&Desc))) { return E_FAIL; } @@ -174,11 +208,33 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg) reinterpret_cast(&m_pShaderCom)))) { return E_FAIL; } - if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_GerboldOlivander_Model"), + if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_Professor_EleazarFig_Model"), reinterpret_cast(&m_pModelCom)))) { return E_FAIL; } + { // CCT + CCharacter_Controller::Character_Controller_DESC Desc{}; + + Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER); + Desc.pTransform = m_pTransformCom; + Desc.eBodyType = ACTOR::CAPSULE; + Desc.fContactOffset = 0.0001f; + Desc.fMaterial = { 1.2f, 1.0f, 0.0f }; + Desc.bAutoStepping = { false }; + Desc.fStepOffset = { 0.02f }; + Desc.fRadius = 0.5f; + Desc.fHeight = 0.6f; + Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create(); + Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create(); + Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY; + Desc.fWalkableSlope = 45.f; + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), (CComponent**)&m_pCharacter_Controller, &Desc))) { + return E_FAIL; + } + m_pCharacter_Controller->SetGravity(true); + } + return S_OK; } @@ -209,30 +265,25 @@ CGameObject* CNPC_EleazarFig::Clone(void* pArg, CGameObject* pOwner) void CNPC_EleazarFig::Free() { __super::Free(); + + SAFE_RELEASE(m_pCharacter_Controller); + if (nullptr != m_pInfoInstance) { + CInfoInstance* pInfo = m_pInfoInstance; + m_pInfoInstance = nullptr; + } + if (nullptr != m_pCallBack_Behavior) { + m_pCallBack_Behavior->Finalize(); + } + if (nullptr != m_pCallBack_HitReport) { + m_pCallBack_HitReport->Finalize(); + } + Safe_Delete(m_pCallBack_Behavior); + Safe_Delete(m_pCallBack_HitReport); } #ifdef _DEBUG void CNPC_EleazarFig::Describe_Entity() { - GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG); - if (GUI::CollapsingHeader("Ollivander")) { - m_pModelCom->Describe_Entity(); - if (ImGui::TreeNode("ANIM STATE")) { - - for (auto& pState : m_States) - { - if (ImGui::Button(to_string(pState.first).c_str())) - { - m_pFSM->Change_State(pState.first); - } - } - - GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str()); - - ImGui::TreePop(); - } - } - GUI::End(); } #endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp index 722ee994c..8a23fc94b 100644 --- a/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp +++ b/Jusin154_Team3D/Client/Private/NPC_Ollivander.cpp @@ -237,8 +237,14 @@ HRESULT CNPC_Ollivander::Initialize(void* pArg) if (FAILED(Ready_Components(pArg))) { return E_FAIL; } - m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(40.f, 4.f, 68.9f, 1.f)); - m_pCharacter_Controller->Set_Position(XMVectorSet(40.f, 4.f, 68.9f, 1.f)); + + NPCDESC* pDesc = static_cast(pArg); + + _vector vPos = XMLoadFloat4(&pDesc->vPos); + m_pTransformCom->Set_State(STATE::POSITION, vPos); + m_pCharacter_Controller->Set_Position(vPos); + m_pTransformCom->Rotation(XMLoadFloat4(&pDesc->vRotQ)); + m_pModelCom->Set_AnimationIndex(0, true); m_pCallBack_Behavior->Initialize(m_pCharacter_Controller); m_pCallBack_HitReport->Initialize(m_pCharacter_Controller); diff --git a/Jusin154_Team3D/Client/Private/Player_States.cpp b/Jusin154_Team3D/Client/Private/Player_States.cpp index 078179dfa..afe398a69 100644 --- a/Jusin154_Team3D/Client/Private/Player_States.cpp +++ b/Jusin154_Team3D/Client/Private/Player_States.cpp @@ -2482,9 +2482,18 @@ void CPlayer::Add_SpellEvent(_uint AnimIndex,_float fRatio) pairAnimInfo = m_Animation[STATEANIM::DISILLUSION_ENTER]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); break; - case ENUM_CLASS(SKILL_TYPE::AVADA_KEDAVRA): + case ENUM_CLASS(SKILL_TYPE::AVADAKEDAVRA): pairAnimInfo = m_Animation[STATEANIM::AVADA_KEDAVRA]; m_pModelCom->Set_AnimationIndex(pairAnimInfo.first, pairAnimInfo.second, 1.f, true); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::AVADAKEDAVRA, this); }, + 0.45f); + + Add_Event(pairAnimInfo.first, + [this]() {m_pEffectPool->Use_Skill(SKILL_TYPE::AVADAKEDAVRA_SIDE, Get_PartObject()); }, + 0.f); + break; case ENUM_CLASS(SKILL_TYPE::LUMOS): if (m_pModelCom->Get_SecondAnimIndex() != m_Animation[STATEANIM::LUMOS].first) diff --git a/Jusin154_Team3D/Client/Private/Ranrok.cpp b/Jusin154_Team3D/Client/Private/Ranrok.cpp index e90d1b168..e38eb542f 100644 --- a/Jusin154_Team3D/Client/Private/Ranrok.cpp +++ b/Jusin154_Team3D/Client/Private/Ranrok.cpp @@ -184,7 +184,7 @@ HRESULT CRanrok::Render() hr = Render_Nonblend(); } else if (RENDER::BLEND == eCurrentPass) { - //hr = Render_Blend(); + hr = Render_Blend(); hr = S_OK; } return hr; diff --git a/Jusin154_Team3D/Client/Public/Avadakedavra.h b/Jusin154_Team3D/Client/Public/Avadakedavra.h index dc6062414..eadec81a5 100644 --- a/Jusin154_Team3D/Client/Public/Avadakedavra.h +++ b/Jusin154_Team3D/Client/Public/Avadakedavra.h @@ -38,7 +38,7 @@ class CAvadakedavra final : public CEffect_Container _float4 m_vStartPos = { 0.f, 0.f, 0.f, 1.f }; // 현재 발사 된 위치 _float4 m_vTargetPos = { 0.f, 0.f, 10.f, 1.f }; // 현재 타게팅 된 위치 - _float m_fLinearSpeed = 0.7f; + _float m_fLinearSpeed = 10.f; _float3 m_vCameraLook = {}; public: static CAvadakedavra* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/AvadakedavraSide.h b/Jusin154_Team3D/Client/Public/AvadakedavraSide.h new file mode 100644 index 000000000..f49fe1308 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/AvadakedavraSide.h @@ -0,0 +1,54 @@ +#pragma once + +#include "Client_Define.h" +#include "Effect_Container.h" + +NS_BEGIN(Engine) +NS_END + +NS_BEGIN(Client) + +class CAvadakedavraSide final : public CEffect_Container +{ +private: + CAvadakedavraSide(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CAvadakedavraSide(const CAvadakedavraSide& rhs); + virtual ~CAvadakedavraSide() = 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 = {}; + + _bool m_isParticleEnd = {}; + _bool m_isTrailEnd = {}; + _float4x4 m_TrailStopMat = {}; + + class CEffectParts* m_pWandLight = { nullptr }; + class CTrailObject* m_pWandTrail = { nullptr }; + class CEffectParts* m_pWandParticle = { nullptr }; + class CEffectParts* m_pWandGoo = { nullptr }; + +public: + static CAvadakedavraSide* 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 diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index 2428c25c1..a7263ef00 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -42,7 +42,7 @@ namespace Client CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색 DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색 CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색 - AVADA_KEDAVRA, CRUCIO, IMPERIO, // 진녹색 + AVADAKEDAVRA, CRUCIO, IMPERIO, // 진녹색 BEAST_PETTING_BRUSH, BEAST_FEED, NAB_SACK, // 하늘색 JAP, REVELIO, PROTEGO, STUPEFY, // 검은색 ANCIENT_MAGIC_THROW, ANCIENT_MAGIC, ALOHOMORA, PETRIFICUS_TOTALUS, LIGHTNING, @@ -57,7 +57,7 @@ namespace Client SCREEN_WIND, /*사이드*/ - JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, LIGHTNING_SIDE, TRANSFORMATION_SIDE, + JAP_SIDE, BOMBARDA_SIDE, DESCENDO_SIDE, LEVIOSO_SIDE, WAND_END, LIGHTNING_SIDE, TRANSFORMATION_SIDE, AVADAKEDAVRA_SIDE, /*트롤*/ TROLL_ATTACK, TROLL_RUSH_HIT, TROLL_NOMAL_SMOKE, GOBLIN_PROTEGO, diff --git a/Jusin154_Team3D/Client/Public/NPC_EleazarFig.h b/Jusin154_Team3D/Client/Public/NPC_EleazarFig.h index 8529509dd..a66506c75 100644 --- a/Jusin154_Team3D/Client/Public/NPC_EleazarFig.h +++ b/Jusin154_Team3D/Client/Public/NPC_EleazarFig.h @@ -7,6 +7,11 @@ NS_BEGIN(Client) class CNPC_EleazarFig final : public CUnit { +public: + typedef struct tagNpcInitDesc { + _float4 vPos; + _float4 vRotQ; + }NPCDESC; protected: CNPC_EleazarFig(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CNPC_EleazarFig(const CNPC_EleazarFig& Prototype); @@ -20,12 +25,21 @@ class CNPC_EleazarFig final : public CUnit virtual HRESULT Render_Shadow(SHADOW eType) override; protected: CInfoInstance* m_pInfoInstance = { nullptr }; + CCharacter_Controller* m_pCharacter_Controller = { nullptr }; + class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr }; + class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr }; + CUnit* m_pPlayerAllyUnit = { nullptr }; + + _bool m_bEntered = { false }; + _float2 m_vEnteringTimer = { 0.f, 1.f }; + _float m_fEncounterDistance = { 10.f }; protected: virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; HRESULT Ready_Components(void* pArg); HRESULT Bind_ShaderResources() override; + _bool CastToPlayer(); public: static CNPC_EleazarFig* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h index 97af286d0..547328f2f 100644 --- a/Jusin154_Team3D/Client/Public/NPC_Ollivander.h +++ b/Jusin154_Team3D/Client/Public/NPC_Ollivander.h @@ -7,6 +7,11 @@ NS_BEGIN(Client) class CNPC_Ollivander final : public CUnit { +public: + typedef struct tagNpcInitDesc { + _float4 vPos; + _float4 vRotQ; + }NPCDESC; protected: CNPC_Ollivander(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CNPC_Ollivander(const CNPC_Ollivander& Prototype); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_0.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_0.bin index 2d3e1d52f..e840a671b 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_0.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_0.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bd78db3118b605dea45d1087f7b139bcddc40eb0432ba28f98de7c4d01e9cda +oid sha256:1295bc10a9f760555ca19f786ec4782a3fdd11560fb0f163990808fae71c7acc size 1092 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_1.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_1.bin new file mode 100644 index 000000000..351fd323f --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e63a691216b82b902ffc5a67c412370077d7d38d7954d9f8fceb3d237341f876 +size 1111 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur.bin index 0436357e5..992cf7c28 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c4e2f66b0f064b0309e4db2de901d93fbd9d870b21410199af13288042c04c1 +oid sha256:12e688b9e03ee482208c28085ae65c487dac4be4780522c01a14ffde7833624f size 990 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur_Big.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur_Big.bin new file mode 100644 index 000000000..0fd7f7f23 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Circle_Blur_Big.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:095cdf1454f44b5da70b7befd3b55dc705ab840df7839842c550512a15e61651 +size 990 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G.bin index 35ef0b6a5..bf067c93e 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d68281b323a5d6d1ead7d4cdf4187df99359f1cdd6354190fcb2416aa849e95e +oid sha256:01ed3094896ea21a047f9d0c2dccc559010ea9a51012c4b3d362ed214076c3d1 size 1136 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G_Small.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G_Small.bin new file mode 100644 index 000000000..aebe9a4f3 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Hit_PT_G_Small.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38156441233e74045eba4a6535fee6174571e84926833ea4d17597f53edd5bcf +size 1136 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin index da9aaf9b1..2d9843609 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Ray_G.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8e530b9f94c05a383b92dec510eb166a3803490789e611f466902179798e853 -size 1138 +oid sha256:78be34f2173d3f86a2e12f9a8f95dc1c87a7e3bcb7c5ad875194446d6291ab9d +size 1180 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Smoke_Black.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Smoke_Black.bin index 00297f3b2..c35faf50a 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Smoke_Black.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Avadakedavra/Smoke_Black.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3fa8e77770ae25a7b56e7451569ac21a22f51245e7d43a365058443974e7156 +oid sha256:c9a95d93c93e8cf0b2541355a00978512e8186c2123520ee24a2cc8ce6cfdaeb size 1074 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/AvadakedavraSide/Trail_G.trail b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/AvadakedavraSide/Trail_G.trail index cdd5389f2..5f2a7d799 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/AvadakedavraSide/Trail_G.trail and b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/AvadakedavraSide/Trail_G.trail differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Avadakedavra.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Avadakedavra.bin index 98cad3e0e..15ea36d03 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Avadakedavra.bin +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/Avadakedavra.bin @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b9766d984f31a26e77035d3bbbe88151621ff6b402c48e5ce6fa841f5680dac -size 386 +oid sha256:2eacafd700660613de1ddc1fb4a73ac0720b6bca1cae33468911f5b0f9d5bf8f +size 588 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/AvadakedavraSide.bin b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/AvadakedavraSide.bin new file mode 100644 index 000000000..d0bd0d4ab --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/Effect/Package/AvadakedavraSide.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ddffc359c7d599b71b6694dc445452e073cd3e16c9372873ec409053369aa82 +size 282 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin new file mode 100644 index 000000000..afd1d0a80 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3105f242284fd06024b2f92a482b7a644c17b7c99f476b289f24cadfcefc7741 +size 7419042 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.fbx new file mode 100644 index 000000000..4fcd3ad04 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:036ae502f672f524c65c103522c570ba654673b919ef5e26dfac41954b035a72 +size 3493500 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/EleazarFig.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.xml similarity index 79% rename from Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/EleazarFig.xml rename to Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.xml index b9e85f8d1..63a17c1c2 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/EleazarFig.xml +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.xml @@ -30,7 +30,7 @@ - + @@ -57,17 +57,17 @@ - + - + - + - + @@ -231,4 +231,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.bin b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.bin new file mode 100644 index 000000000..784640f73 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc8fd14903a2b807e279d7ee07f54756662c6ed08f6333dd03ce14e244c643ea +size 35685852 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.fbx b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.fbx new file mode 100644 index 000000000..da8d64f2e --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98fa7d2d6035652e7c191f33f7f8c5a54cea77b46d0f52ae7fe181ee59df406f +size 38783980 diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.xml b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.xml new file mode 100644 index 000000000..63a17c1c2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.xml @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/T_Eye_Sclera_D.png b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/T_Eye_Sclera_D.png new file mode 100644 index 000000000..6e082532d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Models/Human/Npc/EleazarFig/T_Eye_Sclera_D.png differ diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 7a7ca6c8a..ef25aec72 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -357,11 +357,6 @@ HRESULT CLoader::Loading_For_Logo() VTXANIMMESH::Elements, VTXANIMMESH::iNumElements)))) { return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_NPC_PBR_ANIM, - CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl"), - VTXANIMMESH::Elements, VTXANIMMESH::iNumElements)))) { - return E_FAIL; - } if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_CELL, @@ -2286,6 +2281,11 @@ HRESULT CLoader::Loading_For_ObjectViewer() { m_strMessage = TEXT("Texture Loading.."); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_NPC_PBR_ANIM, + CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_NPC_PBR_Anim.hlsl"), + VTXANIMMESH::Elements, VTXANIMMESH::iNumElements)))) { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("TerrainTest"), CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) { return E_FAIL; @@ -2435,6 +2435,16 @@ HRESULT CLoader::Loading_For_ObjectViewer() TEXT("Prototype_Component_ConjuredDragon_Model") )); + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Professor_EleazarFig_Model") + )); + + futures.emplace_back(Deferred_ModelLoad( + MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/EleazarFig/Professor_EleazarFig_Anim.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(), + TEXT("Prototype_Component_Professor_EleazarFig_Model") + )); + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_ConjuredDragon_Model"), // CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f))* XMMatrixIdentity())))) // return E_FAIL; diff --git a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp index 379ec78d2..6bdb144b7 100644 --- a/Jusin154_Team3D/Engine/Private/Instance_Model.cpp +++ b/Jusin154_Team3D/Engine/Private/Instance_Model.cpp @@ -341,9 +341,10 @@ HRESULT CInstance_Model::Load_InstanceModel(INSTANCE_DESC InstanceDesc) m_InstanceDesc = InstanceDesc; - if (m_InstanceDesc.fTimeMult >= 0) + if (m_InstanceDesc.fTimeMult <= 0) m_InstanceDesc.fTimeMult = 1.f; + Change_NumInstance(); return S_OK; @@ -357,9 +358,10 @@ HRESULT CInstance_Model::Load_InstanceModel(HANDLE hFile) return E_FAIL; } - if (m_InstanceDesc.fTimeMult >= 0) + if (m_InstanceDesc.fTimeMult <= 0) m_InstanceDesc.fTimeMult = 1.f; + Change_NumInstance(); return S_OK;