1112
This commit is contained in:
@@ -190,3 +190,21 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
|
|||||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||||
return vOriginalUV * vDelta + vOffset;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ float2 g_vDiffuseNoiseUVGainAmount;
|
|||||||
float2 g_vMaskNoiseUVGainAmount;
|
float2 g_vMaskNoiseUVGainAmount;
|
||||||
|
|
||||||
float2 g_vUVCutting;
|
float2 g_vUVCutting;
|
||||||
|
float2 g_vUVMaskCutting;
|
||||||
|
|
||||||
|
|
||||||
float g_fBlurIntensity; //블러 세기
|
float g_fBlurIntensity; //블러 세기
|
||||||
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
||||||
@@ -224,7 +226,8 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
/* 최종 색깔 */
|
/* 최종 색깔 */
|
||||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||||
|
|
||||||
vMtrlDiffuse += g_vColor;
|
if (g_vColor.a > 0)
|
||||||
|
vMtrlDiffuse += g_vColor;
|
||||||
|
|
||||||
if (vMtrlDiffuse.a < 0.3f)
|
if (vMtrlDiffuse.a < 0.3f)
|
||||||
discard;
|
discard;
|
||||||
@@ -299,21 +302,17 @@ VS_BLUR_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
|||||||
{
|
{
|
||||||
VS_BLUR_OUT Out = (VS_BLUR_OUT) 0;
|
VS_BLUR_OUT Out = (VS_BLUR_OUT) 0;
|
||||||
|
|
||||||
matrix matWV, matWVP;
|
row_major matrix matW, matWV, matWVP;
|
||||||
|
|
||||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||||
|
|
||||||
float4 vProjPos = vector(In.vPosition, 1.f);
|
|
||||||
|
|
||||||
Out.vPosition = mul(vProjPos, matWVP);
|
|
||||||
|
|
||||||
|
matW = mul(g_WorldMatrix, TransformMatrix);
|
||||||
|
matWV = mul(matW, g_ViewMatrix);
|
||||||
matWVP = mul(matWV, g_ProjMatrix);
|
matWVP = mul(matWV, g_ProjMatrix);
|
||||||
|
|
||||||
matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||||
|
|
||||||
vector vPosition = mul(vector(In.vPosition, 1.f), TransformMatrix);
|
Out.vPosition = vPosition;
|
||||||
|
|
||||||
Out.vPosition = mul(vPosition, matWVP);
|
|
||||||
Out.vTexcoord = In.vTexcoord;
|
Out.vTexcoord = In.vTexcoord;
|
||||||
Out.vLifeTime = In.vLifeTime;
|
Out.vLifeTime = In.vLifeTime;
|
||||||
Out.iGPUIndex = iGPUIndex;
|
Out.iGPUIndex = iGPUIndex;
|
||||||
|
|||||||
@@ -190,3 +190,21 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
|
|||||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||||
return vOriginalUV * vDelta + vOffset;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ float2 g_vDiffuseNoiseUVGainAmount;
|
|||||||
float2 g_vMaskNoiseUVGainAmount;
|
float2 g_vMaskNoiseUVGainAmount;
|
||||||
|
|
||||||
float2 g_vUVCutting;
|
float2 g_vUVCutting;
|
||||||
|
float2 g_vUVMaskCutting;
|
||||||
|
|
||||||
|
|
||||||
float g_fBlurIntensity; //블러 세기
|
float g_fBlurIntensity; //블러 세기
|
||||||
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
||||||
@@ -181,21 +183,9 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
|
|
||||||
if (g_isDiffuse == true)
|
if (g_isDiffuse == true)
|
||||||
{
|
{
|
||||||
float2 UV = In.vTexcoord; // 이미지의 UV값
|
float2 UV; // 이미지의 UV값
|
||||||
|
|
||||||
int iTotalFrame = g_vUVCutting.x * g_vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
|
|
||||||
|
|
||||||
int iCurrentFrame = int(fAnimIndex.x); // 현재 프레임이 어디 위치인지
|
|
||||||
|
|
||||||
int iFrameX = iCurrentFrame % (int) g_vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
|
|
||||||
int iFrameY = iCurrentFrame / (int) g_vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
|
|
||||||
|
|
||||||
float fFreamWidth = 1.0 / g_vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
|
|
||||||
float fFreamHeight = 1.0 / g_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로 만든 다음에 한줄씩 밑으로 내려준다.
|
|
||||||
|
|
||||||
|
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||||
|
|
||||||
if (g_isDiffuseUVMove)
|
if (g_isDiffuseUVMove)
|
||||||
{
|
{
|
||||||
@@ -240,8 +230,11 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
{
|
{
|
||||||
float2 vMaskTexcoord = In.vTexcoord;
|
float2 vMaskTexcoord = In.vTexcoord;
|
||||||
|
|
||||||
|
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
|
||||||
|
|
||||||
if (g_isNoise == true)
|
if (g_isNoise == true)
|
||||||
{
|
{
|
||||||
|
float2 UV; // 이미지의 UV값
|
||||||
|
|
||||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
|
|||||||
|
|
||||||
void CEditEffect::Update(_float fTimeDelta)
|
void CEditEffect::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference_Mat_For_EditEffect();
|
||||||
|
|
||||||
if(m_isBillboard)
|
if(m_isBillboard)
|
||||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||||
|
|
||||||
@@ -72,25 +75,24 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
|||||||
|
|
||||||
if (ImGui::Combo("OPTION", &m_iSelectTextureNum, pCompute, 4))
|
if (ImGui::Combo("OPTION", &m_iSelectTextureNum, pCompute, 4))
|
||||||
{
|
{
|
||||||
switch (m_iSelectTextureNum)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect(m_pDiffuse_TextureCom , this);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect(m_pMasking_TextureCom, this);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect(m_pNoise_TextureCom, this);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect(m_pDissolve_TextureCom, this);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
switch (m_iSelectTextureNum)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDiffuse_TextureCom, this);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pMasking_TextureCom, this);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pNoise_TextureCom, this);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
dynamic_cast<CEffect_Editor*>(m_pOwner)->Reference_Mat_For_EditEffect((CComponent**)&m_pDissolve_TextureCom, this);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -177,7 +179,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
GUI::ColorEdit4("MixColor", (_float*)&m_vColor);
|
GUI::ColorEdit4("MixColor", (_float*)&m_vColor);
|
||||||
|
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
GUI::InputFloat2("UVCutting", (_float*)&m_vUVCutting);
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
if (GUI::TreeNode("BLUR"))
|
if (GUI::TreeNode("BLUR"))
|
||||||
@@ -235,9 +237,11 @@ void CEditEffect::Describe_Entity()
|
|||||||
{
|
{
|
||||||
if (GUI::TreeNode("DIFFUSE"))
|
if (GUI::TreeNode("DIFFUSE"))
|
||||||
{
|
{
|
||||||
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
|
||||||
|
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
|
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
||||||
|
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
|
||||||
|
|
||||||
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
||||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
||||||
@@ -258,6 +262,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
if (GUI::TreeNode("MASKING"))
|
if (GUI::TreeNode("MASKING"))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
GUI::InputFloat2("MaskUVCutting", (_float*)&m_vUVMaskCutting);
|
||||||
GUI::Checkbox("MaskUVMove", &m_isMaskUVMove);
|
GUI::Checkbox("MaskUVMove", &m_isMaskUVMove);
|
||||||
|
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
@@ -303,4 +308,5 @@ void CEditEffect::Describe_Entity()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,6 +170,11 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_vUVMaskCutting", &m_vUVMaskCutting, sizeof(_float2)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (m_pDiffuse_TextureCom != nullptr)
|
if (m_pDiffuse_TextureCom != nullptr)
|
||||||
{
|
{
|
||||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DiffuseTexture", 0))) {
|
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_DiffuseTexture", 0))) {
|
||||||
|
|||||||
@@ -249,10 +249,9 @@ void CEffect_Editor::ReadMaterial(_wstring wstrFileName, const char* pFilePath)
|
|||||||
wifs.close();
|
wifs.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEffect_Editor::Reference_Mat_For_EditEffect(CTexture* pTexture, CGameObject* pObject)
|
void CEffect_Editor::Reference_Mat_For_EditEffect(CComponent** pTexture, CGameObject* pObject)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
for (auto iter : m_MatFiles)
|
for (auto iter : m_MatFiles)
|
||||||
{
|
{
|
||||||
if (GUI::TreeNode(CMyTools::ToString(iter.first).c_str()))
|
if (GUI::TreeNode(CMyTools::ToString(iter.first).c_str()))
|
||||||
@@ -263,7 +262,7 @@ void CEffect_Editor::Reference_Mat_For_EditEffect(CTexture* pTexture, CGameObjec
|
|||||||
m_pGameInstance->Asset_Description<CTexture>(
|
m_pGameInstance->Asset_Description<CTexture>(
|
||||||
ENUM_CLASS(LEVEL::EFFECT),
|
ENUM_CLASS(LEVEL::EFFECT),
|
||||||
CMyTools::ToString(iter.first).c_str()
|
CMyTools::ToString(iter.first).c_str()
|
||||||
, (CComponent**)&pTexture
|
, pTexture
|
||||||
, nullptr
|
, nullptr
|
||||||
, pObject
|
, pObject
|
||||||
, wstrTextureInfo.first // À̸§
|
, wstrTextureInfo.first // À̸§
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class CEffectObject abstract : public CGameObject
|
|||||||
CInstance_Model* m_pInstance_ModelCom = { nullptr };
|
CInstance_Model* m_pInstance_ModelCom = { nullptr };
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
_float4 m_vColor = { 0.f ,0.f ,0.f ,0.f };
|
_float4 m_vColor = { 0.f ,0.f ,0.f ,1.f };
|
||||||
|
|
||||||
_float2 m_vDiffuseUVGainAmount = {};
|
_float2 m_vDiffuseUVGainAmount = {};
|
||||||
_float2 m_vMaskingUVGainAmount = {};
|
_float2 m_vMaskingUVGainAmount = {};
|
||||||
@@ -49,6 +49,7 @@ class CEffectObject abstract : public CGameObject
|
|||||||
_float2 m_vMaskNoiseUVGainAmount = {};
|
_float2 m_vMaskNoiseUVGainAmount = {};
|
||||||
|
|
||||||
_float2 m_vUVCutting = {1.f ,1.f};
|
_float2 m_vUVCutting = {1.f ,1.f};
|
||||||
|
_float2 m_vUVMaskCutting = { 1.f ,1.f };
|
||||||
|
|
||||||
_bool m_isDiffuse = {};
|
_bool m_isDiffuse = {};
|
||||||
_bool m_isMasking = {};
|
_bool m_isMasking = {};
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class CEffect_Editor final : public CEffectObject
|
|||||||
virtual void Late_Update(_float fTimeDelta) override;
|
virtual void Late_Update(_float fTimeDelta) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void Reference_Mat_For_EditEffect(class CTexture* pTexture, CGameObject* pObject);
|
void Reference_Mat_For_EditEffect(class CComponent** pTexture, CGameObject* pObject);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual HRESULT Initialize_Prototype() override;
|
virtual HRESULT Initialize_Prototype() override;
|
||||||
|
|||||||
@@ -190,3 +190,21 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
|
|||||||
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
float2 vOffset = float2(iIndexU * fDeltaU, iIndexV * fDeltaV);
|
||||||
return vOriginalUV * vDelta + vOffset;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -44,6 +44,20 @@ _bool CTexture::Compare_GroupName(_wstring wstrGroupName)
|
|||||||
return m_wstrPrototypeName == wstrGroupName;
|
return m_wstrPrototypeName == wstrGroupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
void CTexture::HoverName()
|
||||||
|
{
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
|
||||||
|
ImGui::BeginTooltip(); // 툴팁 창 시작
|
||||||
|
|
||||||
|
ImGui::TextUnformatted(CMyTools::ToString(m_wstrPrototypeName).c_str()); // 텍스트 출력 (Text 대신 Unformatted 추천)
|
||||||
|
|
||||||
|
ImGui::EndTooltip(); // 툴팁 창 종료
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName)
|
HRESULT CTexture::Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName)
|
||||||
{
|
{
|
||||||
switch (eType)
|
switch (eType)
|
||||||
|
|||||||
@@ -116,8 +116,12 @@ class CPrototype_Manager final : public CBase
|
|||||||
|
|
||||||
|
|
||||||
*ppOut = iter->second->Clone(pDesc, pOwner);
|
*ppOut = iter->second->Clone(pDesc, pOwner);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pTexture->HoverName();
|
||||||
|
|
||||||
if ((iIndex++ + 1) % 4 != 0)
|
if ((iIndex++ + 1) % 4 != 0)
|
||||||
GUI::SameLine(); // 같은 줄에 이어서
|
GUI::SameLine(); // 같은 줄에 이어서
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ class ENGINE_DLL CTexture final :
|
|||||||
_uint Get_Size();
|
_uint Get_Size();
|
||||||
_bool Compare_GroupName(_wstring wstrGroupName);
|
_bool Compare_GroupName(_wstring wstrGroupName);
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
void HoverName();
|
||||||
|
#endif
|
||||||
private:
|
private:
|
||||||
HRESULT Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName);
|
HRESULT Initialize_Prototype(TEXTURE_LOAD_TYPE eType, const _tchar* pTextureFilePath, _uint iNumTextures, _wstring wstrPrototypeName);
|
||||||
virtual HRESULT Initialize(void* pArg) override;
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
|
|||||||
Reference in New Issue
Block a user