[Modify] 릭 나는거 고침
This commit is contained in:
@@ -32,6 +32,7 @@ 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;
|
||||
@@ -45,7 +46,6 @@ float2 g_fItemPosition1;
|
||||
float2 g_fItemImageSizes1;
|
||||
float2 g_fItemPosition2;
|
||||
float2 g_fItemImageSizes2;
|
||||
float2 g_fPosition[4];
|
||||
float2 g_fImageSizes[4];
|
||||
float4 g_fImagesUV[4];
|
||||
|
||||
@@ -1774,7 +1774,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
Color = tex;
|
||||
|
||||
tex1 *= 0.95f;
|
||||
|
||||
|
||||
Color.a = tex1;
|
||||
|
||||
Color.a *= Alpha;
|
||||
@@ -1783,6 +1783,49 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
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 rectSize = g_fCurrent_Size;
|
||||
|
||||
float2 itemPos = g_fItemPosition1;
|
||||
float2 itemSize = g_fItemImageSizes1;
|
||||
|
||||
float x0 = max(rectPos.x, itemPos.x);
|
||||
float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
|
||||
float y0 = max(rectPos.y, itemPos.y);
|
||||
float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
|
||||
|
||||
float uMin = (x0 - rectPos.x) / rectSize.x;
|
||||
float uMax = (x1 - rectPos.x) / rectSize.x;
|
||||
float vMin = (y0 - rectPos.y) / rectSize.y;
|
||||
float vMax = (y1 - rectPos.y) / rectSize.y;
|
||||
|
||||
vMin = 1.0f - vMin;
|
||||
vMax = 1.0f - vMax;
|
||||
|
||||
if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
|
||||
In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
|
||||
{
|
||||
Color.rgb = float3(0.f, 0.f, 1.f);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2363,6 +2406,16 @@ technique11 PosTexTechnique11
|
||||
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 Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -420,6 +420,7 @@ void CInfoInstance::Release_Information()
|
||||
DestroyInstance();
|
||||
|
||||
|
||||
SAFE_RELEASE(m_pSpellLearn_Data);
|
||||
SAFE_RELEASE(m_pMapInfo);
|
||||
SAFE_RELEASE(m_pPlayerInfo);
|
||||
SAFE_RELEASE(m_pMonsterInfo);
|
||||
|
||||
@@ -258,7 +258,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Background = true;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = true;
|
||||
isReady_Background = false;
|
||||
#endif //
|
||||
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Background = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Background = flase;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
@@ -953,6 +953,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#pragma endregion
|
||||
#if 진우
|
||||
#elif 기무리
|
||||
#elif 인혁
|
||||
#elif Bin
|
||||
#elif gimch
|
||||
#else
|
||||
|
||||
@@ -101,4 +101,6 @@ CSpellLearn_Data* CSpellLearn_Data::Create(ID3D11Device* pDevice, ID3D11DeviceCo
|
||||
void CSpellLearn_Data::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
m_SpellLearnInfos.clear();
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ 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;
|
||||
@@ -45,7 +46,6 @@ float2 g_fItemPosition1;
|
||||
float2 g_fItemImageSizes1;
|
||||
float2 g_fItemPosition2;
|
||||
float2 g_fItemImageSizes2;
|
||||
float2 g_fPosition[4];
|
||||
float2 g_fImageSizes[4];
|
||||
float4 g_fImagesUV[4];
|
||||
|
||||
@@ -1774,7 +1774,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
Color = tex;
|
||||
|
||||
tex1 *= 0.95f;
|
||||
|
||||
|
||||
Color.a = tex1;
|
||||
|
||||
Color.a *= Alpha;
|
||||
@@ -1783,6 +1783,49 @@ PS_OUT PS_SpellLearn(PS_IN In)
|
||||
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 rectSize = g_fCurrent_Size;
|
||||
|
||||
float2 itemPos = g_fItemPosition1;
|
||||
float2 itemSize = g_fItemImageSizes1;
|
||||
|
||||
float x0 = max(rectPos.x, itemPos.x);
|
||||
float x1 = min(rectPos.x + rectSize.x, itemPos.x + itemSize.x);
|
||||
float y0 = max(rectPos.y, itemPos.y);
|
||||
float y1 = min(rectPos.y + rectSize.y, itemPos.y + itemSize.y);
|
||||
|
||||
float uMin = (x0 - rectPos.x) / rectSize.x;
|
||||
float uMax = (x1 - rectPos.x) / rectSize.x;
|
||||
float vMin = (y0 - rectPos.y) / rectSize.y;
|
||||
float vMax = (y1 - rectPos.y) / rectSize.y;
|
||||
|
||||
vMin = 1.0f - vMin;
|
||||
vMax = 1.0f - vMax;
|
||||
|
||||
if (In.vTexcoord.x >= min(uMin, uMax) && In.vTexcoord.x <= max(uMin, uMax) &&
|
||||
In.vTexcoord.y >= min(vMin, vMax) && In.vTexcoord.y <= max(vMin, vMax))
|
||||
{
|
||||
Color.rgb = float3(0.f, 0.f, 1.f);
|
||||
}
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct VS_IN3D
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -2363,6 +2406,16 @@ technique11 PosTexTechnique11
|
||||
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 Enemy_Detection
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "SpellLearn.h"
|
||||
#include "GameInstance.h"
|
||||
#include "SpellLearn_MovePointer.h"
|
||||
|
||||
CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -96,6 +97,11 @@ void CSpellLearn::Late_Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
if (m_pPointer != nullptr)
|
||||
{
|
||||
m_vPointerPosition = m_pPointer->Get_Position();
|
||||
m_vPointerScale = m_pPointer->Get_Current_Size();
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
@@ -106,7 +112,7 @@ HRESULT CSpellLearn::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::COLOR)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELLLEARNCOLOR)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -166,6 +172,23 @@ HRESULT CSpellLearn::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vPointerPosition, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes1", &m_vPointerScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fPosition", &m_fCurrent_Position, sizeof(_float2))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -207,6 +230,11 @@ HRESULT CSpellLearn::Change_Image(_int SpellID)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpellLearn::Set_Pointer(CSpellLearn_MovePointer* Pointer)
|
||||
{
|
||||
m_pPointer = Pointer;
|
||||
}
|
||||
|
||||
CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext);
|
||||
|
||||
@@ -45,6 +45,7 @@ HRESULT CSpellLearn_Panel::Initialize(void* pArg)
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.05f;
|
||||
m_fDelayTime = 1.f;
|
||||
static_cast<CSpellLearn*>(m_pSpellLearn)->Set_Pointer(static_cast<CSpellLearn_MovePointer*>(m_pSpellLearn_MovePointer));
|
||||
Visible(true);
|
||||
ElementAllVisible(true);
|
||||
return S_OK;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Editor
|
||||
REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER,
|
||||
SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN,
|
||||
ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK,
|
||||
SPELL_LEARN,
|
||||
SPELL_LEARN, SPELLLEARNCOLOR,
|
||||
ENEMY_DETECTION, INTERACTION_OBJECT, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END };
|
||||
|
||||
@@ -27,13 +27,17 @@ class CSpellLearn final : public CElementObject
|
||||
|
||||
public:
|
||||
HRESULT Change_Image(_int SpellID);
|
||||
|
||||
void Set_Pointer(class CSpellLearn_MovePointer* Pointer);
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom1 = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
class CSpellLearn_MovePointer* m_pPointer = { nullptr };
|
||||
|
||||
_float2 m_vPointerPosition{};
|
||||
_float3 m_vPointerScale{};
|
||||
public:
|
||||
static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -27,6 +27,7 @@ class CSpellLearn_MovePointer final : public CElementObject
|
||||
|
||||
public:
|
||||
void Set_SpellLearn(_int Index);
|
||||
|
||||
private:
|
||||
void Line(_float fTime);
|
||||
|
||||
@@ -36,6 +37,7 @@ class CSpellLearn_MovePointer final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_bool m_bMoveStart = { false };
|
||||
|
||||
_int m_iLineIndex{};
|
||||
|
||||
@@ -888,10 +888,6 @@ HRESULT CGameInstance::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTar
|
||||
{
|
||||
return m_pRenderTarget_Manager->Bind_CS_RenderTarget(iIndex, strTargetTag);
|
||||
}
|
||||
_float2 CGameInstance::Get_RenderTargetSize(const _wstring& wstrTargetKey)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Get_RenderTargetSize(wstrTargetKey);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
|
||||
@@ -138,6 +138,11 @@ void CUIObject::Move(_float fX, _float fY)
|
||||
m_fY = fY;
|
||||
}
|
||||
|
||||
_float2 CUIObject::Get_Position()
|
||||
{
|
||||
return _float2(m_fX, m_fY);
|
||||
}
|
||||
|
||||
void CUIObject::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
|
||||
@@ -29,7 +29,6 @@ class CRenderTarget_Manager final : public CBase
|
||||
// 랜더 타겟의 크기를 dest로 다시 맞춤
|
||||
HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass);
|
||||
_float2 Get_RenderTargetSize(const _wstring& wstrRenderTargetOriginal);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
|
||||
@@ -99,6 +99,7 @@ typedef struct tagSpellLearnInfo
|
||||
virtual void MoveX(_float fX);
|
||||
virtual void MoveY(_float fY);
|
||||
virtual void Move(_float fX, _float fY);
|
||||
virtual _float2 Get_Position();
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY);
|
||||
virtual void SizeUpX(_float fSizeX);
|
||||
virtual void SizeUpY(_float fSizeY);
|
||||
|
||||
Reference in New Issue
Block a user