Merge pull request #167 from SpicyGangjeong/UI

[Add] 인스턴싱 및 나인 슬라이스
This commit is contained in:
qordlsgur
2025-11-20 10:30:02 +09:00
committed by GitHub
63 changed files with 428 additions and 911 deletions
@@ -7,258 +7,6 @@
#include "Engine_Shader_States.hlsli"
#include "Engine_Shader_Functions.hlsli"
float PI = 3.14592;
sampler DefaultSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = wrap;
AddressV = wrap;
};
sampler ClampSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = clamp;
AddressV = clamp;
};
sampler MirrorSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = mirror;
AddressV = mirror;
};
sampler BorderZeroSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = Border;
AddressV = Border;
BorderColor = float4(0, 0, 0, 0);
};
sampler PointSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = wrap;
AddressV = wrap;
};
RasterizerState RS_Default
{
FillMode = Solid;
CullMode = Back;
};
RasterizerState RS_Nocull
{
FillMode = Solid;
CullMode = None;
FrontCounterClockwise = false;
DepthClipEnable = false;
};
RasterizerState RS_Nocull_Wireframe
{
FillMode = Wireframe;
CullMode = None;
FrontCounterClockwise = false;
DepthBias = 0;
SlopeScaledDepthBias = 0.f;
DepthBiasClamp = 0.f;
DepthClipEnable = false;
ScissorEnable = false;
MultisampleEnable = false;
AntialiasedLineEnable = false;
};
RasterizerState RS_Scissor
{
FillMode = Solid;
CullMode = Back;
FrontCounterClockwise = false;
ScissorEnable = true;
};
DepthStencilState DSS_Default
{
DepthEnable = true;
DepthWriteMask = all;
DepthFunc = less_equal;
};
DepthStencilState DSS_None
{
DepthEnable = false;
DepthWriteMask = zero;
};
DepthStencilState DSS_Effect
{
DepthEnable = true;
DepthWriteMask = zero;
DepthFunc = less_equal;
StencilEnable = false;
};
BlendState BS_None
{
BlendEnable[0] = false;
};
BlendState BS_AlphaBlend // ALPHA_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * Aa + Bc * (1 - Aa);
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
};
BlendState BS_Blend // ADDITIVE_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * (1) + Bc * (1);
SrcBlend = one;
DestBlend = one;
BlendOp = Add;
};
BlendState BS_UIBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
SrcBlendAlpha = One;
DestBlendAlpha = Zero;
BlendOpAlpha = Add;
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
};
BlendState BS_WB_Acc
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = one;
DestBlend[0] = one;
BlendOp[0] = Add;
SrcBlend[1] = Inv_Src_Alpha;
DestBlend[1] = Zero;
BlendOp[1] = Add;
SrcBlend[2] = one;
DestBlend[2] = one;
BlendOp[2] = Add;
};
BlendState BS_WeightBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = Src_Alpha;
DestBlend[0] = Inv_Src_Alpha;
BlendOp[0] = Add;
};
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
{
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
float2 vTexel = 1.f / vShadowMapSize;
float fVisibility = 0.f;
for (int v = -1; v <= 1; ++v)
{
for (int u = -1; u <= 1; ++u)
{
float2 vOffset = float2(u, v) * vTexel;
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
}
}
return fVisibility / 9.f;
}
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
{
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
fRimLight = pow(fRimLight, fRimPower);
fRimLight = fRimLight * fRimStrength;
return fRimLight;
}
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
{
float2 vDelta = float2(fDeltaU, fDeltaV);
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
{
float2 UV = vUV; // 이미지의 UV값
int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다.
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다.
return UV;
}
#endif // ENGINE_SHADER_DEFINES_HLSLI
@@ -29,7 +29,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -7,258 +7,6 @@
#include "Engine_Shader_States.hlsli"
#include "Engine_Shader_Functions.hlsli"
float PI = 3.14592;
sampler DefaultSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = wrap;
AddressV = wrap;
};
sampler ClampSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = clamp;
AddressV = clamp;
};
sampler MirrorSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = mirror;
AddressV = mirror;
};
sampler BorderZeroSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = Border;
AddressV = Border;
BorderColor = float4(0, 0, 0, 0);
};
sampler PointSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = wrap;
AddressV = wrap;
};
RasterizerState RS_Default
{
FillMode = Solid;
CullMode = Back;
};
RasterizerState RS_Nocull
{
FillMode = Solid;
CullMode = None;
FrontCounterClockwise = false;
DepthClipEnable = false;
};
RasterizerState RS_Nocull_Wireframe
{
FillMode = Wireframe;
CullMode = None;
FrontCounterClockwise = false;
DepthBias = 0;
SlopeScaledDepthBias = 0.f;
DepthBiasClamp = 0.f;
DepthClipEnable = false;
ScissorEnable = false;
MultisampleEnable = false;
AntialiasedLineEnable = false;
};
RasterizerState RS_Scissor
{
FillMode = Solid;
CullMode = Back;
FrontCounterClockwise = false;
ScissorEnable = true;
};
DepthStencilState DSS_Default
{
DepthEnable = true;
DepthWriteMask = all;
DepthFunc = less_equal;
};
DepthStencilState DSS_None
{
DepthEnable = false;
DepthWriteMask = zero;
};
DepthStencilState DSS_Effect
{
DepthEnable = true;
DepthWriteMask = zero;
DepthFunc = less_equal;
StencilEnable = false;
};
BlendState BS_None
{
BlendEnable[0] = false;
};
BlendState BS_AlphaBlend // ALPHA_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * Aa + Bc * (1 - Aa);
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
};
BlendState BS_Blend // ADDITIVE_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * (1) + Bc * (1);
SrcBlend = one;
DestBlend = one;
BlendOp = Add;
};
BlendState BS_UIBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
SrcBlendAlpha = One;
DestBlendAlpha = Zero;
BlendOpAlpha = Add;
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
};
BlendState BS_WB_Acc
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = one;
DestBlend[0] = one;
BlendOp[0] = Add;
SrcBlend[1] = Inv_Src_Alpha;
DestBlend[1] = Zero;
BlendOp[1] = Add;
SrcBlend[2] = one;
DestBlend[2] = one;
BlendOp[2] = Add;
};
BlendState BS_WeightBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = Src_Alpha;
DestBlend[0] = Inv_Src_Alpha;
BlendOp[0] = Add;
};
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
{
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
float2 vTexel = 1.f / vShadowMapSize;
float fVisibility = 0.f;
for (int v = -1; v <= 1; ++v)
{
for (int u = -1; u <= 1; ++u)
{
float2 vOffset = float2(u, v) * vTexel;
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
}
}
return fVisibility / 9.f;
}
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
{
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
fRimLight = pow(fRimLight, fRimPower);
fRimLight = fRimLight * fRimStrength;
return fRimLight;
}
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
{
float2 vDelta = float2(fDeltaU, fDeltaV);
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
{
float2 UV = vUV; // 이미지의 UV값
int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다.
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다.
return UV;
}
#endif // ENGINE_SHADER_DEFINES_HLSLI
@@ -222,7 +222,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
int iTotalFrame = g_iImageCountX * g_iImageCountY;
int iCurrentFrame = int(floor(g_fTime / g_fFrame)) % iTotalFrame;
uint iCurrentFrame = uint(floor(g_fTime / g_fFrame)) % iTotalFrame;
int iFrameX = iCurrentFrame % g_iImageCountX;
int iFrameY = iCurrentFrame / g_iImageCountX;
@@ -285,46 +285,63 @@ PS_OUT PS_NineSlice(PS_IN In)
{
PS_OUT Out;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float Left = g_fNine_Slice.x / g_fOrigin_Size.x;
float Right = (g_fOrigin_Size.x - g_fNine_Slice.y) / g_fOrigin_Size.x;
float Top = g_fNine_Slice.z / g_fOrigin_Size.y;
float Bottom = (g_fOrigin_Size.y - g_fNine_Slice.w) / g_fOrigin_Size.y;
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;
float2 ratio = g_fCurrent_Size / g_fOrigin_Size;
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 UV = In.vTexcoord * 0.5f + 0.5f;
float2 ScaledUV = UV;
if (UV.x < Left)
float2 Finaluv = In.vTexcoord;
if(CurrentPixelPosition.x < CurrentLeft)
{
ScaledUV.x = UV.x;
Finaluv.x = CurrentPixelPosition.x / g_fOrigin_Size.x;
}
else if (UV.x > Right)
else if(CurrentPixelPosition.x >CurrentRight)
{
ScaledUV.x = 1.0f - ((1.0f - UV.x) / ratio.x);
float dist = CurrentPixelPosition.x - CurrentRight;
Finaluv.x = (OriginRight + dist) / g_fOrigin_Size.x;
}
else
{
ScaledUV.x = Left + (UV.x - Left) / ratio.x;
float scale = (CurrentPixelPosition.x - CurrentLeft) / (CurrentRight - CurrentLeft);
Finaluv.x = (OriginLeft / g_fOrigin_Size.x) + scale * ((OriginRight - OriginLeft) / g_fOrigin_Size.x);
}
if (UV.y < Top)
if(CurrentPixelPosition.y < CurrentTop)
{
ScaledUV.y = UV.y;
Finaluv.y = CurrentPixelPosition.y / g_fOrigin_Size.y;
}
else if (UV.y > Bottom)
else if(CurrentPixelPosition.y > CurrentBottom)
{
ScaledUV.y = 1.0f - ((1.0f - UV.y) / ratio.y);
float dist = CurrentPixelPosition.y - CurrentBottom;
Finaluv.y = (OriginBottom + dist) / g_fOrigin_Size.y;
}
else
{
ScaledUV.y = Top + (UV.y - Top) / ratio.y;
float scale = (CurrentPixelPosition.y - CurrentTop) / (CurrentBottom - CurrentTop);
Finaluv.y = (OriginTop / g_fOrigin_Size.y) + scale * ((OriginBottom - OriginTop) / g_fOrigin_Size.y);
}
float4 color = g_Texture.Sample(ClampSampler, ScaledUV);
float4 tex1 = g_Texture.Sample(ClampSampler, Finaluv);
float4 tex2 = g_Texture1.Sample(ClampSampler, Finaluv);
color.a *= Alpha;
Out.vColor = color;
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;
}
@@ -446,6 +463,7 @@ PS_OUT PS_Slot(PS_IN In)
PS_OUT PS_SpellAnim(PS_IN In)
{
PS_OUT Out;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
//float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
//float2 center = float2(0.5f, 0.5f);
@@ -460,7 +478,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
//color.a *= Alpha;
//Out.vColor = color;
Out.vColor = color;
return Out;
}
@@ -0,0 +1,90 @@
#include "Engine_Shader_Defines.hlsli"
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
Texture2D g_Texture;
float g_fAlpha;
float g_fOwnerAlpha;
float g_fCanvasAlpha;
float g_fAngle;
float g_fFar;
struct VS_IN
{
float3 vPosition : POSITION;
float2 vTexcoord : TEXCOORD0;
float2 vSize : TEXCOORD1;
float2 Pos : TEXCOORD2;
};
struct VS_OUT
{
float4 vPosition : SV_POSITION;
float2 vTexcoord : TEXCOORD0;
};
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
matrix matWV = mul(g_WorldMatrix, g_ViewMatrix);
matrix matWVP = mul(matWV, g_ProjMatrix);
float3 scaledPos = In.vPosition;
scaledPos.xy *= In.vSize; // 인스턴스 스케일 적용
scaledPos.xy += In.Pos; // 인스턴스 위치 적용
Out.vPosition = mul(float4(scaledPos, 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;
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;
}
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();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

@@ -29,7 +29,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -412,6 +412,7 @@
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_UI_Instance.hlsl" />
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxAnimMesh.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
@@ -989,5 +989,8 @@
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxModelInstance.hlsl">
<Filter>99.Define\SHADER</Filter>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_UI_Instance.hlsl">
<Filter>99.Define\SHADER</Filter>
</FxCompile>
</ItemGroup>
</Project>
@@ -316,6 +316,15 @@ void CIMGUIUI::Update(_float fTimeDelta)
{
static_cast<CElementObject*>(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y);
}
if (GUI::SliderFloat("X##Sizex", &m_fSize.x, 1.f, 1920.f))
{
static_cast<CElementObject*>(m_pElementObject)->SizeUpX(m_fSize.x);
}
if (GUI::SliderFloat("Y##Sizey", &m_fSize.y, 1.f, 1080.f))
{
static_cast<CElementObject*>(m_pElementObject)->SizeUpY(m_fSize.y);
}
if (GUI::SliderFloat("Size", &m_fSizeXY.x, 1.f, 1980.f))
{
+17
View File
@@ -405,7 +405,18 @@ HRESULT CLoader::Loading_For_UI()
m_strMessage = TEXT("Model Loading..");
CVIBuffer_UI_Instance::UI_INSTANCE_DESC UIDesc{};
UIDesc.iNum = 4;
UIDesc.vSize = _float2(1.f,1.f);
UIDesc.fPositionOffSetX = 75.f;
UIDesc.fPositionOffSetY = 0.f;
UIDesc.vPsition = _float2(100.f, 100.f);
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"),
CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &UIDesc)))) {
return E_FAIL;
}
m_strMessage = TEXT("Shader Loading..");
@@ -415,6 +426,12 @@ HRESULT CLoader::Loading_For_UI()
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, FX_UIINSTANCE,
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_UI_Instance.hlsl"),
VTX_POSTEX_INSTANCE_UI::Elements, VTX_POSTEX_INSTANCE_UI::iNumElements)))) {
return E_FAIL;
}
m_strMessage = TEXT("Prototype Loading..");
@@ -1,6 +1,8 @@
#include "pch.h"
#include "MissionBanner_Border.h"
#include "GameInstance.h"
#include "Mission_Icon.h"
CMissionBanner_Border::CMissionBanner_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
:CElementObject(pDevice, pContext)
@@ -22,9 +24,9 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg)
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = -207.f;
Desc.fY = 150.f;
Desc.fY = 115.f;
Desc.fSizeX = 256.f;
Desc.fSizeY = 128.f;
Desc.fSizeY = 175.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -37,20 +39,22 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg)
return E_FAIL;
}
m_fTimeMult = 3.f;
m_fTimeMult = 15.f;
m_fAlpha = 0.f;
m_fAlphaTime = 5.f;
m_fMoveSpeed = 5.f;
m_fMoveSpeed = 100.f;
m_fLerpX = m_fX;
m_fLerpY = 100.f;
m_fSortZ = 0.11f;
m_vUVScale = _float2(1.f, 1.f);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->LerpOn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->Set_FadeOut(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->LerpOff(); });
m_vNine_Slice = _float4(80, 200, 60, 90);
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_On"), [this](void* p) {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_Off"), [this](void* p) {this->Set_FadeOut(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_Off"), [this](void* p) {this->LerpOff(); });
return S_OK;
}
void CMissionBanner_Border::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
@@ -66,6 +70,7 @@ void CMissionBanner_Border::Update(_float fTimeDelta)
{
return;
}
m_fLerpTime = fTimeDelta * m_fTimeMult;
if (m_bFadeIn == true)
{
@@ -75,6 +80,10 @@ void CMissionBanner_Border::Update(_float fTimeDelta)
m_fAlpha += fTimeDelta * m_fAlphaTime;
}
if (m_fAlpha >= 0.5f)
{
LerpOn();
}
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
@@ -94,16 +103,18 @@ void CMissionBanner_Border::Update(_float fTimeDelta)
m_fAlpha = 0.f;
}
}
if (m_pGameInstance->Key_Down(DIK_1))
{
Lerp_PosY(100);
}
if (m_bLerpOn == true)
{
Start_Lerp(m_fMoveSpeed);
Size_LerpOn(m_fOrigin_Size.y + m_fLerpY, m_fLerpTime);
}
if (m_bLerpOff == true)
{
Reset_Pos(m_fMoveSpeed);
Size_LerpOff(m_fLerpTime);
}
m_fTime += fTimeDelta * m_fTimeMult;
@@ -129,7 +140,7 @@ HRESULT CMissionBanner_Border::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::MISSION)))) {
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::NINECLICE)))) {
return E_FAIL;
}
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
@@ -138,7 +149,7 @@ HRESULT CMissionBanner_Border::Render()
if (FAILED(m_pVIBufferCom->Render())) {
return E_FAIL;
}
m_pMission_Icon->Render();
return S_OK;
}
@@ -147,6 +158,49 @@ _vector CMissionBanner_Border::Get_WorldPostion()
return m_pTransformCom->Get_State(STATE::POSITION);
}
void CMissionBanner_Border::Size_LerpOn(_float LerpX, _float fTimeDelta)
{
_float fDir = LerpX - m_fSizeY;
_float move = m_fMoveSpeed * fTimeDelta;
if (fDir <= move)
{
m_fSizeY = LerpX;
m_bLerpOn = false;
}
else
{
m_fY -= move * 0.5f;
m_fSizeY += move;
static_cast<CUIObject*>(m_pMission_Icon)->MoveY(move * 0.5f);
}
}
void CMissionBanner_Border::Size_LerpOff(_float fTimeDelta)
{
_float fDir = m_fSizeY - m_fOrigin_Size.y;
_float move = m_fMoveSpeed * fTimeDelta;
if (fDir <= move)
{
m_fSizeY = m_fOrigin_Size.y;
m_fLerpY;
m_bLerpOn = false;
}
else
{
m_fSizeY -= move;
m_fY += move * 0.5f;
static_cast<CUIObject*>(m_pMission_Icon)->MoveY(-move * 0.5f);
}
}
HRESULT CMissionBanner_Border::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
@@ -197,6 +251,10 @@ HRESULT CMissionBanner_Border::Bind_ShaderResources()
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
{
return E_FAIL;
}
return S_OK;
}
@@ -219,10 +277,26 @@ HRESULT CMissionBanner_Border::Ready_Components(void* pArg)
{
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Icon**>(&m_pMission_Icon))))
{
return E_FAIL;
}
return S_OK;
}
void CMissionBanner_Border::SizeUpX(_float fSizeX)
{
m_fSizeX = fSizeX;
m_fX += (fSizeX - m_vScale.x) * 0.5f;
m_fLerpX += (fSizeX - m_vScale.x) * 0.5f;
static_cast<CUIObject*>(m_pMission_Icon)->MoveX((fSizeX - m_vScale.x) * 0.5f);
}
void CMissionBanner_Border::Lerp_PosY(_float fSizeY)
{
m_fLerpY = fSizeY;
}
CMissionBanner_Border* CMissionBanner_Border::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CMissionBanner_Border* pInstance = new CMissionBanner_Border(pDevice, pContext);
+34 -24
View File
@@ -21,8 +21,8 @@ HRESULT CMission_Icon::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = -275.f;
Desc.fY = 145.f;
Desc.fX = -70.f;
Desc.fY = -20.f;
Desc.fSizeX = 60.f;
Desc.fSizeY = 60.f;
@@ -38,16 +38,22 @@ HRESULT CMission_Icon::Initialize(void* pArg)
}
m_fTimeMult = 3.f;
m_fAlpha = 0.f;
m_fAlpha = 1.f;
m_fAlphaTime = 3.f;
m_fMoveSpeed = 5.f;
m_fLerpX = m_fX;
m_fLerpY = 45;
m_fSortZ = 0.1f;
m_eQuestType = QUESTYPE::MAIN;
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->Set_FadeIn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_On"), [this]() {this->LerpOn(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->Set_FadeOut(); });
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Missiom_Off"), [this]() {this->LerpOff(); });
//static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_SizeUp"), [this](void* p) {
// if (p == nullptr)
// return;
// _float fY = *reinterpret_cast<_float*>(p);
// this->Lerp_PosY(fY); });
//static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_On"), [this] (void* p) {this->Set_FadeIn(); });
////static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_On"), [this] (void* p) {this->LerpOn(); });
//static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_Off"), [this](void* p) {this->Set_FadeOut(); });
//static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Mission_Off"), [this](void* p) {this->LerpOff(); });
m_iType = ENUM_CLASS(m_eQuestType);
return S_OK;
}
@@ -59,25 +65,22 @@ void CMission_Icon::QuestType(QUESTYPE eType)
void CMission_Icon::Priority_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
__super::Priority_Update(fTimeDelta);
}
void CMission_Icon::Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
if (m_bFadeIn == true)
{
if (m_fAlpha <= 1.f)
{
m_fAlpha += fTimeDelta * m_fAlphaTime;
}
if (m_fAlpha >= 0.2f)
{
LerpOn();
}
if (m_fAlpha >= 1.f)
{
m_bFadeIn = false;
@@ -98,7 +101,6 @@ void CMission_Icon::Update(_float fTimeDelta)
}
if (m_bLerpOn == true)
{
Start_Lerp(m_fMoveSpeed);
}
@@ -113,14 +115,7 @@ void CMission_Icon::Update(_float fTimeDelta)
void CMission_Icon::Late_Update(_float fTimeDelta)
{
if (!__super::Chack_Visible())
{
return;
}
if (m_bVisible) {
if (m_pGameInstance->isIn_WorldFrustum(Get_WorldPostion(), m_pTransformCom->Get_Radius())) {
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
}
__super::Late_Update(fTimeDelta);
}
}
@@ -148,6 +143,21 @@ _vector CMission_Icon::Get_WorldPostion()
return m_pTransformCom->Get_State(STATE::POSITION);
}
void CMission_Icon::MoveX(_float fX)
{
m_fX -= fX;
}
void CMission_Icon::MoveY(_float fY)
{
m_fY -= fY;
}
void CMission_Icon::Lerp_PosY(_float fLerpY)
{
m_fLerpY -= fLerpY;
}
HRESULT CMission_Icon::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
@@ -21,10 +21,10 @@ HRESULT CMission_Key::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = -296.f;
Desc.fY = 158.f;
Desc.fSizeX = 37.f;
Desc.fSizeY = 37.f;
Desc.fX = -297.f;
Desc.fY = 159.f;
Desc.fSizeX = 40.f;
Desc.fSizeY = 40.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -21,10 +21,10 @@ HRESULT CMission_KeyHold::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = -296.f;
Desc.fX = -297.f;
Desc.fY = 158.f;
Desc.fSizeX = 86.f;
Desc.fSizeY = 86.f;
Desc.fSizeX = 94.f;
Desc.fSizeY = 94.f;
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
@@ -112,11 +112,11 @@ void CMission_KeyHold::Update(_float fTimeDelta)
if (m_bisHoldOn)
{
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Missiom_On"));
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Mission_On"));
}
else
{
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Missiom_Off"));
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Mission_Off"));
}
__super::Update(fTimeDelta);
@@ -1,10 +1,9 @@
#include "pch.h"
#include "pch.h"
#include "Mission_Panel.h"
#include "GameInstance.h"
#include "Mission_KeyHold.h"
#include "Mission_Key.h"
#include "Active_Icon.h"
#include "Mission_Icon.h"
#include "MissionBanner_Border.h"
#include "MissionBanner_Key.h"
@@ -148,13 +147,6 @@ HRESULT CMission_Panel::Ready_Element(void* pArg)
return E_FAIL;
}
Add_Element(TEXT("Mission_Key"), m_pMission_Key);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Icon**>(&m_pMission_Icon))))
{
return E_FAIL;
}
Add_Element(TEXT("Mission_Icon"), m_pMission_Icon);
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CActive_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CActive_Icon**>(&m_pActive_Icon))))
{
return E_FAIL;
@@ -21,8 +21,8 @@ HRESULT CSpell_Slot::Initialize(void* pArg)
{
CUIObject::UIOBJECT_DESC Desc{};
Desc.fX = -160.f;
Desc.fY = 50.f;
Desc.fX = 0.f;
Desc.fY = 98.f;
Desc.fSizeX = 140.f;
Desc.fSizeY = 140.f;
@@ -41,6 +41,9 @@ HRESULT CSpell_Slot::Initialize(void* pArg)
m_fTimeMult = 3.f;
m_fAngle = XMConvertToRadians(-135);
m_fAlphaTime = 1.f;
m_pVIBufferCom->Set_Cloned(true);
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
m_pVIBufferCom->Set_Pos(m_fX, m_fY, 150.f,0.f,4);
return S_OK;
}
@@ -85,7 +88,6 @@ void CSpell_Slot::Update(_float fTimeDelta)
}
m_fTime += fTimeDelta * m_fTimeMult;
__super::Update(fTimeDelta);
}
void CSpell_Slot::Late_Update(_float fTimeDelta)
@@ -110,7 +112,7 @@ HRESULT CSpell_Slot::Render()
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SLOT))))
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT))))
{
return E_FAIL;
}
@@ -174,7 +176,7 @@ HRESULT CSpell_Slot::Bind_ShaderResources()
HRESULT CSpell_Slot::Ready_Components(void* pArg)
{
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
{
return E_FAIL;
}
@@ -182,7 +184,7 @@ HRESULT CSpell_Slot::Ready_Components(void* pArg)
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr)))
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
{
return E_FAIL;
}
@@ -18,6 +18,7 @@ namespace Editor {
#define FX_PARTICLE TEXT("FX_PARTICLE")
#define FX_INSTANCE_MODEL TEXT("FX_INSTANCE_MODEL")
#define FX_UIEDITOR TEXT("FX_UIEDITOR")
#define FX_UIINSTANCE TEXT("FX_UIINSTANCE")
#pragma endregion
@@ -19,6 +19,10 @@ class CMissionBanner_Border final : public CElementObject
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
virtual void SizeUpX(_float fSizeX) override;
virtual void Lerp_PosY(_float fSizeY) override;
void Size_LerpOn(_float LerpX, _float fTimeDelta);
void Size_LerpOff(_float fTimeDelta);
private:
virtual HRESULT Bind_ShaderResources() override;
@@ -32,6 +36,9 @@ class CMissionBanner_Border final : public CElementObject
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
CGameObject* m_pMission_Icon = { nullptr };
_float m_fLerpTime{};
public:
static CMissionBanner_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+7 -5
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Editor_Define.h"
#include "ElementObject.h"
@@ -19,7 +19,9 @@ class CMission_Icon final : public CElementObject
virtual HRESULT Render() override;
virtual _vector Get_WorldPostion() override;
virtual void MoveX(_float fX)override;
virtual void MoveY(_float fY)override;
virtual void Lerp_PosY(_float fLerpY) override;
private:
virtual HRESULT Bind_ShaderResources() override;
virtual HRESULT Ready_Components(void* pArg) override;
@@ -30,8 +32,8 @@ class CMission_Icon final : public CElementObject
void QuestType(QUESTYPE eType);
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
QUESTYPE m_eQuestType = QUESTYPE::END;
_uint m_iType{};
@@ -43,4 +45,4 @@ class CMission_Icon final : public CElementObject
void Describe_Entity() override;
};
NS_END
NS_END
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "Editor_Define.h"
#include "PanelObject.h"
@@ -36,7 +36,6 @@ class CMission_Panel final : public CPanelObject
CGameObject* m_pMissionBanner_Key = { nullptr };
CGameObject* m_pMission_KeyHold = { nullptr };
CGameObject* m_pMission_Key = { nullptr };
CGameObject* m_pMission_Icon = { nullptr };
CGameObject* m_pActive_Icon = { nullptr };
public:
@@ -46,4 +45,4 @@ class CMission_Panel final : public CPanelObject
void Describe_Entity() override;
};
NS_END
NS_END
+1 -1
View File
@@ -29,7 +29,7 @@ class CSpell_Slot final : public CElementObject
private:
CTexture* m_pDiffuse_TextureCom = { nullptr };
CShader* m_pShaderCom = { nullptr };
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
public:
static CSpell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
@@ -7,258 +7,6 @@
#include "Engine_Shader_States.hlsli"
#include "Engine_Shader_Functions.hlsli"
float PI = 3.14592;
sampler DefaultSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = wrap;
AddressV = wrap;
};
sampler ClampSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = clamp;
AddressV = clamp;
};
sampler MirrorSampler = sampler_state
{
Filter = MIN_MAG_MIP_LINEAR;
AddressU = mirror;
AddressV = mirror;
};
sampler BorderZeroSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = Border;
AddressV = Border;
BorderColor = float4(0, 0, 0, 0);
};
sampler PointSampler = sampler_state
{
Filter = MIN_MAG_MIP_POINT;
AddressU = wrap;
AddressV = wrap;
};
RasterizerState RS_Default
{
FillMode = Solid;
CullMode = Back;
};
RasterizerState RS_Nocull
{
FillMode = Solid;
CullMode = None;
FrontCounterClockwise = false;
DepthClipEnable = false;
};
RasterizerState RS_Nocull_Wireframe
{
FillMode = Wireframe;
CullMode = None;
FrontCounterClockwise = false;
DepthBias = 0;
SlopeScaledDepthBias = 0.f;
DepthBiasClamp = 0.f;
DepthClipEnable = false;
ScissorEnable = false;
MultisampleEnable = false;
AntialiasedLineEnable = false;
};
RasterizerState RS_Scissor
{
FillMode = Solid;
CullMode = Back;
FrontCounterClockwise = false;
ScissorEnable = true;
};
DepthStencilState DSS_Default
{
DepthEnable = true;
DepthWriteMask = all;
DepthFunc = less_equal;
};
DepthStencilState DSS_None
{
DepthEnable = false;
DepthWriteMask = zero;
};
DepthStencilState DSS_Effect
{
DepthEnable = true;
DepthWriteMask = zero;
DepthFunc = less_equal;
StencilEnable = false;
};
BlendState BS_None
{
BlendEnable[0] = false;
};
BlendState BS_AlphaBlend // ALPHA_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * Aa + Bc * (1 - Aa);
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
};
BlendState BS_Blend // ADDITIVE_BLEND
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
// Ac * (1) + Bc * (1);
SrcBlend = one;
DestBlend = one;
BlendOp = Add;
};
BlendState BS_UIBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend = Src_Alpha;
DestBlend = Inv_Src_Alpha;
BlendOp = Add;
SrcBlendAlpha = One;
DestBlendAlpha = Zero;
BlendOpAlpha = Add;
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
};
BlendState BS_WB_Acc
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = one;
DestBlend[0] = one;
BlendOp[0] = Add;
SrcBlend[1] = Inv_Src_Alpha;
DestBlend[1] = Zero;
BlendOp[1] = Add;
SrcBlend[2] = one;
DestBlend[2] = one;
BlendOp[2] = Add;
};
BlendState BS_WeightBlend
{
BlendEnable[0] = true;
BlendEnable[1] = true;
BlendEnable[2] = true;
BlendEnable[3] = true;
BlendEnable[4] = true;
BlendEnable[5] = true;
BlendEnable[6] = true;
BlendEnable[7] = true;
SrcBlend[0] = Src_Alpha;
DestBlend[0] = Inv_Src_Alpha;
BlendOp[0] = Add;
};
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
{
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
float fDepthCenter = saturate(vLightClip.z / vLightClip.w);
float2 vTexel = 1.f / vShadowMapSize;
float fVisibility = 0.f;
for (int v = -1; v <= 1; ++v)
{
for (int u = -1; u <= 1; ++u)
{
float2 vOffset = float2(u, v) * vTexel;
float fDepth = ShadowMap.Sample(DefaultSampler, uv + vOffset).x;
fVisibility += (fDepthCenter - bias > fDepth) ? 0.f : 1.f;
}
}
return fVisibility / 9.f;
}
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
{
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
fRimLight = pow(fRimLight, fRimPower);
fRimLight = fRimLight * fRimStrength;
return fRimLight;
}
float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndexU, uint iIndexV)
{
float2 vDelta = float2(fDeltaU, fDeltaV);
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
{
float2 UV = vUV; // 이미지의 UV값
int iTotalFrame = vUVCutting.x * vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
int iFrameX = iCurrentFrame % (int) vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
int iFrameY = iCurrentFrame / (int) vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
float fFreamWidth = 1.0 / vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
float fFreamHeight = 1.0 / vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다.
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다.
return UV;
}
#endif // ENGINE_SHADER_DEFINES_HLSLI
@@ -29,7 +29,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v145</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -43,7 +43,6 @@ void CElementObject::Update(_float fTimeDelta)
m_fSortZ, 1.f));
m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f);
m_vNine_Slice = _float4(m_fLeft, m_fRight, m_fTop, m_fBottom);
m_vLerp_Position = XMVectorSet(m_fLerpX, m_fLerpY, 0.f, 1.f);
}
@@ -85,45 +84,45 @@ _bool CElementObject::Chack_Visible()
void CElementObject::Nine_Slice_Left(_float X)
{
m_fLeft = X;
m_vNine_Slice.x = X;
}
void CElementObject::Nine_Slice_Right(_float Y)
{
m_fRight = Y;
m_vNine_Slice.y = Y;
}
void CElementObject::Nine_Slice_Top(_float Z)
{
m_fTop = Z;
m_vNine_Slice.z = Z;
}
void CElementObject::Nine_Slice_Bottom(_float W)
{
m_fBottom = W;
m_vNine_Slice.w = W;
}
_float CElementObject::Get_Nine_Slice_Left()
{
return m_fLeft;
return m_vNine_Slice.x;
}
_float CElementObject::Get_Nine_Slice_Right()
{
return m_fRight;
return m_vNine_Slice.y;
}
_float CElementObject::Get_Nine_Slice_Top()
{
return m_fTop;
return m_vNine_Slice.z;
}
_float CElementObject::Get_Nine_Slice_Bottom()
{
return m_fBottom;
return m_vNine_Slice.w;
}
void CElementObject::Start_Lerp(_float fTimeDelta, _bool Alpha)
void CElementObject::Start_Lerp(_float fTimeDelta)
{
_vector Pos = m_fCurrent_Position;
@@ -150,7 +149,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta, _bool Alpha)
}
}
void CElementObject::Reset_Pos(_float fTimeDelta, _bool Alpha)
void CElementObject::Reset_Pos(_float fTimeDelta)
{
_vector Pos = m_fCurrent_Position;
@@ -166,7 +165,7 @@ void CElementObject::Reset_Pos(_float fTimeDelta, _bool Alpha)
{
m_fX = m_fOrigin_Position.x;
m_fY = m_fOrigin_Position.y;
m_bLerpOn = false;
m_bLerpOff = false;
}
else
@@ -177,6 +176,14 @@ void CElementObject::Reset_Pos(_float fTimeDelta, _bool Alpha)
}
}
void CElementObject::Start_Size_Lerp(_float fTimeDelta)
{
}
void CElementObject::Reset_Size_Lerp(_float fTimeDelta)
{
}
_vector CElementObject::Get_Lerp_Pos()
{
return m_vLerp_Position;
@@ -138,17 +138,17 @@ void CPanelObject::ElementAllVisible(_bool bVisible)
}
}
void CPanelObject::Add_Function(wstring Name, function<void()>Event)
void CPanelObject::Add_Function(wstring Name, function<void(void*)>Event)
{
m_ElementFunction_map.emplace(Name, Event);
}
void CPanelObject::Function_Callback(wstring Name)
void CPanelObject::Function_Callback(wstring Name, void* pArg)
{
auto range = m_ElementFunction_map.equal_range(Name);
for (auto it = range.first; it != range.second; ++it)
{
it->second();
it->second(pArg);
}
}
+30 -19
View File
@@ -83,13 +83,6 @@ HRESULT CUIObject::Initialize(void* pArg)
m_bVisible = true;
m_fLeft = 0.f;
m_fRight = m_fSizeX;
m_fTop = 0.f;
m_fBottom = m_fSizeY;
m_vNine_Slice = _float4(m_fLeft, m_fRight, m_fTop, m_fBottom);
return S_OK;
}
@@ -145,6 +138,16 @@ void CUIObject::SizeUpdate(_float fSizeX, _float fSizeY)
m_fSizeY = fSizeY;
}
void CUIObject::SizeUpX(_float fSizeX)
{
m_fSizeX = fSizeX;
}
void CUIObject::SizeUpY(_float fSizeY)
{
m_fSizeY = fSizeY;
}
void CUIObject::SizeUpdate_float(_float3 fSizeXY)
{
m_fSizeX = fSizeXY.x;
@@ -280,42 +283,42 @@ _float2 CUIObject::Get_UV()
void CUIObject::Nine_Slice_Left(_float X)
{
m_fLeft = -m_fSizeX * 0.5f + X;
m_vNine_Slice.x = X;
}
void CUIObject::Nine_Slice_Right(_float Y)
{
m_fRight = m_fSizeX * 0.5f - Y;
m_vNine_Slice.y =Y;
}
void CUIObject::Nine_Slice_Top(_float Z)
{
m_fTop = -m_fSizeY * 0.5f + Z;
m_vNine_Slice.z = Z;
}
void CUIObject::Nine_Slice_Bottom(_float W)
{
m_fBottom = m_fSizeY * 0.5f - W;
m_vNine_Slice.w = W;
}
_float CUIObject::Get_Nine_Slice_Left()
{
return m_fLeft;
return m_vNine_Slice.y;
}
_float CUIObject::Get_Nine_Slice_Right()
{
return m_fRight;
return m_vNine_Slice.y;
}
_float CUIObject::Get_Nine_Slice_Top()
{
return m_fTop;
return m_vNine_Slice.z;
}
_float CUIObject::Get_Nine_Slice_Bottom()
{
return m_fBottom;
return m_vNine_Slice.w;
}
_float2 CUIObject::Get_Origin_Position()
@@ -348,11 +351,19 @@ void CUIObject::Lerp_PosY(_float PosY)
m_fLerpY = PosY;
}
void CUIObject::Start_Lerp(_float fTimeDelta, _bool Alpha)
void CUIObject::Start_Lerp(_float fTimeDelta)
{
}
void CUIObject::Reset_Pos(_float fTimeDelta, _bool Alpha)
void CUIObject::Reset_Pos(_float fTimeDelta)
{
}
void CUIObject::Start_Size_Lerp(_float fTimeDelta)
{
}
void CUIObject::Reset_Size_Lerp(_float fTimeDelta)
{
}
@@ -442,11 +453,11 @@ _float CUIObject::Get_CoolTime()
return m_fCoolTime;
}
void CUIObject::Add_Function(wstring Name, function<void()> Evnet)
void CUIObject::Add_Function(wstring Name, function<void(void*)> Evnet)
{
}
void CUIObject::Function_Callback(wstring Name)
void CUIObject::Function_Callback(wstring Name, void* pArg)
{
}
@@ -11,6 +11,8 @@ CVIBuffer_UI_Instance::CVIBuffer_UI_Instance(const CVIBuffer_UI_Instance& Protot
: CVIBuffer_Instance{ Prototype }
, m_pInstanceVertices{ Prototype.m_pInstanceVertices }
, m_fSize{ Prototype.m_fSize }
, m_fPositionOffSetX{ Prototype.m_fPositionOffSetX }
, m_fPositionOffSetY{ Prototype.m_fPositionOffSetY }
, m_fPosition{ Prototype.m_fPosition }
{
}
@@ -118,10 +120,16 @@ HRESULT CVIBuffer_UI_Instance::Initialize_Prototype(const INSTANCE_DESC* pInstan
m_fPosition = new _float2[m_iNumInstance];
ZeroMemory(m_fPosition, sizeof(_float2) * m_iNumInstance);
m_fPositionOffSetX = new _float[m_iNumInstance];
ZeroMemory(m_fPositionOffSetX, sizeof(_float) * m_iNumInstance);
m_fPositionOffSetY = new _float[m_iNumInstance];
ZeroMemory(m_fPositionOffSetY, sizeof(_float) * m_iNumInstance);
for (size_t i = 0; i < m_iNumInstance; ++i)
{
m_pInstanceVertices[i].fSize = (pDesc->vSize);
m_pInstanceVertices[i].fPos = _float2(pDesc->vPsition.x + 75 * i, pDesc->vPsition.y);
m_pInstanceVertices[i].fPos = _float2(pDesc->vPsition.x, pDesc->vPsition.y);
}
m_InstanceInitialDesc.pSysMem = m_pInstanceVertices;
@@ -140,19 +148,23 @@ HRESULT CVIBuffer_UI_Instance::Initialize(void* pArg)
return S_OK;
}
void CVIBuffer_UI_Instance::Set_Pos(_float fX, _float fY, _float OffSet)
void CVIBuffer_UI_Instance::Set_Pos(_float fX, _float fY, _float OffSetX, _float OffSetY, _uint iCols)
{
D3D11_MAPPED_SUBRESOURCE SubResource{};
D3D11_MAPPED_SUBRESOURCE SubResource{};
m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
for (size_t i = 0; i < m_iNumInstance; i++)
for (_uint i = 0; i < m_iNumInstance; i++)
{
pVertices[i].fPos.x = fX + m_pInstanceVertices[i].fPos.x; // 인덱스 * 간격
pVertices[i].fPos.y = fY;
_uint col = i % iCols; // 가로 인덱스
_uint row = i / iCols; // 세로 인덱스
pVertices[i].fPos.x = fX + col * OffSetX;
pVertices[i].fPos.y = fY + row * OffSetY;
}
m_pContext->Unmap(m_pVBInstance, 0);
}
@@ -183,7 +195,7 @@ CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D
MSG_BOX("Failed to Created : CVIBuffer_UI_Instance");
Safe_Release(pInstance);
}
return pInstance;
}
@@ -30,8 +30,10 @@ class ENGINE_DLL CElementObject abstract : public CUIObject
virtual _float Get_Nine_Slice_Top() override;
virtual _float Get_Nine_Slice_Bottom() override;
virtual void Start_Lerp(_float fTimeDelta, _bool Alpha = false) override;
virtual void Reset_Pos(_float fTimeDelta, _bool Alpha = false) override;
virtual void Start_Lerp(_float fTimeDelta) override;
virtual void Reset_Pos(_float fTimeDelta)override;
virtual void Start_Size_Lerp(_float fTimeDelta) override;
virtual void Reset_Size_Lerp(_float fTimeDelta) override;
virtual _vector Get_Lerp_Pos() override;
protected:
+13 -1
View File
@@ -321,11 +321,23 @@ typedef struct tagVertexModelInstanceParticleDesc
#pragma endregion
typedef struct tagVertexInstance_UIDesc
{
static constexpr unsigned int iNumElements = {4};
static constexpr D3D11_INPUT_ELEMENT_DESC Elements[] = {
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},
{ "TEXCOORD", 1, DXGI_FORMAT_R32G32_FLOAT, 1, 0, D3D11_INPUT_PER_INSTANCE_DATA, 1 },
{ "TEXCOORD", 2, DXGI_FORMAT_R32G32_FLOAT, 1, 8, D3D11_INPUT_PER_INSTANCE_DATA, 1 }
};
}VTX_POSTEX_INSTANCE_UI;
typedef struct tagPhsXUserData {
PHYSX_KIND eKind = PHYSX_KIND::NOT_DEFINED;
class CGameObject* pOwner = { nullptr };
class CGameObject* pOwner = { nullptr };
_float4x4 BeforeMatrix = { };
_uint iSubKind = UINT_MAX;
+3 -3
View File
@@ -31,8 +31,8 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
virtual const vector<wstring> Element_Name();
virtual void ElementAllVisible(_bool bVisible);
virtual void Add_Function(wstring Name, function<void()> Evnet) override;
virtual void Function_Callback(wstring Name) override;
virtual void Add_Function(wstring Name, function<void(void*)> Evnet) override;
virtual void Function_Callback(wstring Name, void* pArg = nullptr) override;
protected:
virtual void Add_Element(wstring Name, class CGameObject* pElement);
virtual _bool Chack_Visible() override;
@@ -42,7 +42,7 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
vector<wstring> m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서
map<wstring, class CGameObject*> m_Elements_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
multimap<wstring, function<void()>> m_ElementFunction_map;
multimap<wstring, function<void(void*)>> m_ElementFunction_map;
_int m_iElements_Count{}; // 전체 엘리멘트의 갯수
+8 -8
View File
@@ -33,6 +33,8 @@ typedef struct tagUIObjectDesc
virtual void MoveX(_float fX);
virtual void MoveY(_float fY);
virtual void SizeUpdate(_float fSizeX, _float fSizeY);
virtual void SizeUpX(_float fSizeX);
virtual void SizeUpY(_float fSizeY);
virtual void SizeUpdate_float(_float3 fSizeXY);
virtual void Set_Time(_float fTime);
virtual void Set_TimeMult(_float Mult);
@@ -80,8 +82,10 @@ typedef struct tagUIObjectDesc
virtual void Lerp_PosX(_float PosX);
virtual void Lerp_PosY(_float PosY);
virtual void Start_Lerp(_float fTimeDelta, _bool Alpha = true);
virtual void Reset_Pos(_float fTimeDelta, _bool Alpha = true);
virtual void Start_Lerp(_float fTimeDelta);
virtual void Reset_Pos(_float fTimeDelta);
virtual void Start_Size_Lerp(_float fTimeDelta);
virtual void Reset_Size_Lerp(_float fTimeDelta);
virtual _vector Get_Lerp_Pos();
virtual void LerpOn();
virtual void LerpOff();
@@ -101,8 +105,8 @@ typedef struct tagUIObjectDesc
virtual void Set_CoolTime(_float CoolTime);
virtual _float Get_CoolTime();
virtual void Add_Function(wstring Name, function<void()> Evnet);
virtual void Function_Callback(wstring Name);
virtual void Add_Function(wstring Name, function<void(void*)> Evnet);
virtual void Function_Callback(wstring Name, void* pArg = nullptr);
protected:
_vector m_fOrigin_Position_vector{};
_float2 m_fOrigin_Position{};
@@ -151,10 +155,6 @@ typedef struct tagUIObjectDesc
_float m_fMoveSpeed{};
_float4 m_vNine_Slice{};
_float m_fLeft{};
_float m_fRight{};
_float m_fTop{};
_float m_fBottom{};
protected:
virtual HRESULT Initialize_Prototype();
@@ -10,7 +10,9 @@ class ENGINE_DLL CVIBuffer_Instance abstract : public CVIBuffer
typedef struct tagInstanceDesc
{
_uint iNum = {};
_float2 vSize = { };
_float2 vSize = {};
_float fPositionOffSetX{};
_float fPositionOffSetY{};
_float2 vPsition = {};
}INSTANCE_DESC;
protected:
@@ -20,7 +20,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
virtual HRESULT Initialize(void* pArg) override;
public:
virtual void Set_Pos(_float fX, _float fY,_float OffSet);
virtual void Set_Pos(_float fX, _float fY, _float OffSetX, _float OffSetY, _uint iCols);
virtual void Set_Size(_float fSizeX, _float fSizeY);
virtual void Set_Cloned(_bool isCloned) { m_isCloned = isCloned; }
@@ -28,6 +28,8 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };
_bool m_isCloned = { false };
_float2* m_fSize{ nullptr };
_float* m_fPositionOffSetX{};
_float* m_fPositionOffSetY{};
_float2* m_fPosition{ nullptr };
_float m_fAddPosition{};