Merge pull request #597 from SpicyGangjeong/Develope

[Follow]
This commit is contained in:
qordlsgur
2025-12-30 22:26:45 +09:00
committed by GitHub
69 changed files with 1364 additions and 1237 deletions
+1 -1
View File
@@ -48,6 +48,6 @@
# lfs
*.fbx filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs
*.png binary
@@ -94,7 +94,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -120,7 +120,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -131,7 +131,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_Texture_Color(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
@@ -145,7 +145,7 @@ PS_OUT PS_Texture_Color(PS_IN In)
PS_OUT PS_Logo(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -166,7 +166,7 @@ PS_OUT PS_Logo(PS_IN In)
PS_OUT PS_Logo_Text(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -192,7 +192,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
PS_OUT PS_Logo_Glow(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -213,7 +213,7 @@ PS_OUT PS_Logo_Glow(PS_IN In)
PS_OUT PS_AlphaBlend(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -228,7 +228,7 @@ PS_OUT PS_AlphaBlend(PS_IN In)
PS_OUT PS_Clamp(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -243,7 +243,7 @@ PS_OUT PS_Clamp(PS_IN In)
PS_OUT PS_Cursor(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
@@ -293,7 +293,7 @@ PS_OUT PS_Cursor(PS_IN In)
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -366,7 +366,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In)
PS_OUT PS_Mission(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
@@ -388,7 +388,7 @@ PS_OUT PS_Mission(PS_IN In)
PS_OUT PS_Sptire_Sheet(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
float2 UV = In.vTexcoord;
@@ -423,7 +423,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
PS_OUT PS_QuestType(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -444,7 +444,7 @@ PS_OUT PS_QuestType(PS_IN In)
PS_OUT PS_Spell_Anim(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -470,7 +470,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
PS_OUT PS_NineSlice(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -534,7 +534,7 @@ PS_OUT PS_NineSlice(PS_IN In)
PS_OUT PS_Rotation(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(0.f, 0.f, 0.f, 0.f);
@@ -562,7 +562,7 @@ PS_OUT PS_Rotation(PS_IN In)
PS_OUT PS_Slot(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float2 center = float2(0.5f, 0.5f);
@@ -584,7 +584,7 @@ PS_OUT PS_Slot(PS_IN In)
PS_OUT PS_SpellAnim(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
@@ -686,7 +686,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
PS_OUT PS_HpBar(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
@@ -783,7 +783,7 @@ PS_OUT PS_HpBar(PS_IN In)
PS_OUT PS_Magic_Meter(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
@@ -814,7 +814,7 @@ PS_OUT PS_Magic_Meter(PS_IN In)
PS_OUT PS_Magic_Icon(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -850,7 +850,7 @@ PS_OUT PS_Magic_Icon(PS_IN In)
PS_OUT PS_RemapUV(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -873,7 +873,7 @@ PS_OUT PS_RemapUV(PS_IN In)
PS_OUT PS_Revelio(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -912,7 +912,7 @@ PS_OUT PS_Revelio(PS_IN In)
PS_OUT PS_Potion(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f);
@@ -955,7 +955,7 @@ PS_OUT PS_Potion(PS_IN In)
PS_OUT PS_Magic_Item(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1079,7 +1079,7 @@ PS_OUT PS_Magic_Item(PS_IN In)
PS_OUT PS_Spell_Preview(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1154,7 +1154,7 @@ PS_OUT PS_Spell_Preview(PS_IN In)
PS_OUT PS_Spell_Header(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1200,7 +1200,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
PS_OUT PS_Spell_Header_Line(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1262,7 +1262,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In)
PS_OUT PS_Spell_Drag(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1291,7 +1291,7 @@ PS_OUT PS_Spell_Drag(PS_IN In)
PS_OUT PS_Camera_LockOn(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1333,7 +1333,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
PS_OUT PS_Loding_Screen(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1364,7 +1364,7 @@ PS_OUT PS_Loding_Screen(PS_IN In)
PS_OUT PS_Enemy_HpBer(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1450,7 +1450,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In)
PS_OUT PS_Boss_HpBer(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1522,7 +1522,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
PS_OUT PS_Quest_Border(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1589,7 +1589,7 @@ PS_OUT PS_Quest_Border(PS_IN In)
PS_OUT PS_Quest_Info(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1652,7 +1652,7 @@ PS_OUT PS_Quest_Info(PS_IN In)
PS_OUT PS_Quest_Status(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1723,7 +1723,7 @@ PS_OUT PS_Quest_Status(PS_IN In)
PS_OUT PS_Broomstick(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1776,7 +1776,7 @@ PS_OUT PS_Broomstick(PS_IN In)
PS_OUT PS_SpellLearn(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1797,7 +1797,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
PS_OUT PS_SpellLearnColor(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1869,7 +1869,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
PS_OUT PS_SpellLearnBooster(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1913,7 +1913,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In)
PS_OUT PS_NPCInteraction(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1986,7 +1986,7 @@ PS_OUT PS_NPCInteraction(PS_IN In)
PS_OUT PS_CanvasFade(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
@@ -2112,7 +2112,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
PS_OUT PS_Enemy_Detection(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
@@ -2260,7 +2260,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
PS_OUT PS_Interaction_Object(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
@@ -2278,7 +2278,7 @@ PS_OUT PS_Interaction_Object(PS_IN In)
PS_OUT PS_Interaction_Npc(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -174,7 +174,6 @@ call Update_Resources.bat
<ClInclude Include="..\Public\CallBack_NonPlayable_Behavior.h" />
<ClInclude Include="..\Public\CallBack_NonPlayable_HitReport.h" />
<ClInclude Include="..\Public\CallBack_Ranrok_HitReport.h" />
<ClInclude Include="..\Public\Camera_Model.h" />
<ClInclude Include="..\Public\Goblin_Assassin.h" />
<ClInclude Include="..\Public\Goblin_Assassin_Spector.h" />
<ClInclude Include="..\Public\Goblin_Sword.h" />
@@ -432,7 +431,6 @@ call Update_Resources.bat
<ClCompile Include="..\Private\CallBack_NonPlayable_Behavior.cpp" />
<ClCompile Include="..\Private\CallBack_NonPlayable_HitReport.cpp" />
<ClCompile Include="..\Private\CallBack_Ranrok_HitReport.cpp" />
<ClCompile Include="..\Private\Camera_Model.cpp" />
<ClCompile Include="..\Private\Goblin_Assassin.cpp" />
<ClCompile Include="..\Private\Goblin_Assassin_Spector.cpp" />
<ClCompile Include="..\Private\Goblin_Assassin_States.cpp" />
@@ -749,9 +749,6 @@
<ClInclude Include="..\Public\PlayerRobe.h">
<Filter>02.GameObjects\Player\Robe</Filter>
</ClInclude>
<ClInclude Include="..\Public\Camera_Model.h">
<Filter>02.GameObjects\Cameras\Camera_Model</Filter>
</ClInclude>
<ClInclude Include="..\Public\Goblin_Assassin.h">
<Filter>02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin</Filter>
</ClInclude>
@@ -1605,9 +1602,6 @@
<Filter Include="02.GameObjects\Player\Robe">
<UniqueIdentifier>{f3c7cf8d-2b83-49d3-85da-fe135e376a11}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\Cameras\Camera_Model">
<UniqueIdentifier>{f8d55057-c0f8-4cac-8a6c-6f11345a83bb}</UniqueIdentifier>
</Filter>
<Filter Include="02.GameObjects\NPC\Hostile\Monster\Goblin\Goblin_Assassin">
<UniqueIdentifier>{af9f5cf6-151a-49bc-9af4-28ba0bde1d37}</UniqueIdentifier>
</Filter>
@@ -174,15 +174,15 @@ HRESULT CBroomRacerAI::Render()
}
if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
{
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
}
else {
@@ -1,246 +0,0 @@
#include "pch.h"
#include "Camera_Model.h"
#include "Shader.h"
#include "Layer.h"
#include "Player.h"
CCamera_Model::CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CCamera(pDevice, pContext)
{
}
CCamera_Model::CCamera_Model(const CCamera_Model& rhs)
: CCamera(rhs)
{
}
void CCamera_Model::Priority_Update(_float fTimeDelta)
{
#ifdef _DEBUG
m_pGameInstance->Bind_Camera(NEXT_LEVEL, CAMERA_MODEL, false);
#endif // _DEBUG
if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
return;
}
//Transition(fTimeDelta);
_float3 vCamPos = {};
_float3 vSetPos = {};
XMStoreFloat3(&vCamPos, m_pTransformCom->Get_State(STATE::POSITION));
#ifdef _DEBUG
GUI::Text("Cam Coord %.2f, %.2f, %.2f", vCamPos.x, vCamPos.y, vCamPos.z);
#endif // _DEBUG
if (m_pGameInstance->Key_Up(DIK_GRAVE)) {
m_bMovable = !m_bMovable;
}
if (m_pGameInstance->Mouse_Down(DIM_MBUTTON)) {
m_pGameInstance->Toggle_MouseCenter();
}
__super::Bind_Matrices();
}
void CCamera_Model::Update(_float fTimeDelta)
{
m_pModelCom->Play_Animation(fTimeDelta, m_pTransformCom);
#ifdef _DEBUG
Describe_Entity();
#endif // _DEBUG
}
void CCamera_Model::Late_Update(_float fTimeDelta)
{
/*if (FAILED(m_pGameInstance->IsBinded_Camera(CAMERA_MODEL))) {
return;
}*/
auto M = m_pModelCom->Get_BoneMatrix("lookat_target");
GUI::Text("Bone T: %.3f %.3f %.3f", M.r[3].m128_f32[0], M.r[3].m128_f32[1], M.r[3].m128_f32[2]);
_vector vTargetPos = m_pModelCom->Get_BoneMatrix("lookat_target").r[3];
m_pTransformCom->LookAt(
XMVectorSetW(vTargetPos, 1.f)
);
// m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
}
HRESULT CCamera_Model::Render()
{
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
m_pModelCom->Get_OffsetMatrix(i).data(),
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
)))
{
return E_FAIL;
}
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_ANIM::DEFAULT)))) {
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
return S_OK;
}
HRESULT CCamera_Model::Initialize_Prototype()
{
return S_OK;
}
HRESULT CCamera_Model::Initialize(void* pArg)
{
CAMERA_MODEL_DESC* pDesc = static_cast<CAMERA_MODEL_DESC*>(pArg);
if (FAILED(__super::Initialize(pArg))) {
return E_FAIL;
}
if (FAILED(Ready_Components(pArg))) {
return E_FAIL;
}
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vEye), 1.f));
m_pTransformCom->LookAt(XMVectorSetW(XMLoadFloat3(&pDesc->vAt), 1.f));
m_matInitial = *m_pTransformCom->Get_WorldMatrixPtr();
m_bActive = true;
m_pModelCom->Set_Temp(true);
return S_OK;
}
HRESULT CCamera_Model::Ready_Components(void* pArg)
{
if (FAILED(__super::Ready_Components(pArg))) {
return E_FAIL;
}
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
reinterpret_cast<CComponent**>(&m_pModelCom)))) {
return E_FAIL;
}
if (FAILED(__super::Add_Asset_Component(g_iStaticLevel, FX_ANIMMESH,
reinterpret_cast<CComponent**>(&m_pShaderCom)))) {
return E_FAIL;
}
return S_OK;
}
HRESULT CCamera_Model::Bind_ShaderResources()
{
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ)))) {
return E_FAIL;
}
#ifdef 기무리
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevViewMatrix", D3DTS::VIEW))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
return E_FAIL;
}
#endif // 기무리
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) {
return E_FAIL;
}
return S_OK;
}
void CCamera_Model::Set_InitialPos()
{
m_pTransformCom->Set_WorldMatrix(m_matInitial);
}
CCamera_Model* CCamera_Model::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
{
CCamera_Model* pInstance = new CCamera_Model(pDevice, pContext);
if (FAILED(pInstance->Initialize_Prototype()))
{
MSG_BOX("Failed to Created : CCamera_Model");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
CGameObject* CCamera_Model::Clone(void* pArg, CGameObject* pOwner)
{
CCamera_Model* pInstance = new CCamera_Model(*this);
pInstance->m_pOwner = pOwner;
if (FAILED(pInstance->Initialize(pArg)))
{
MSG_BOX("Failed to Cloned : CCamera_Model");
SAFE_RELEASE(pInstance);
}
return pInstance;
}
void CCamera_Model::Free()
{
__super::Free();
SAFE_RELEASE(m_pModelCom);
SAFE_RELEASE(m_pShaderCom);
}
#ifdef _DEBUG
void CCamera_Model::Describe_Entity()
{
_float3 vPosition = {};
GUI::Begin("CameraAnim List");
for (_int i = 0; i < m_pModelCom->Get_AnimSize(); i++)
{
if (GUI::Button(m_pModelCom->Get_AnimList(i)))
{
m_pModelCom->Set_AnimationIndex(i);
}
}
GUI::End();
}
#endif // _DEBUG
@@ -138,7 +138,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색
if (iPos != std::string::npos)
if (iPos != string::npos)
{
strExt += strEffectPath.substr(iPos + 1);
strEffectName = strEffectPath.substr(0, iPos);
@@ -146,7 +146,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색
if (pos != std::string::npos)
if (pos != string::npos)
strEffectName = strEffectName.substr(pos + 1);
if (!strcmp(strExt.c_str(), "trail"))
@@ -229,8 +229,9 @@ HRESULT CGoblin_Assassin::Render_OutLine()
}
Compute_Depth();
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
m_fOutLineThickness = CMyTools::Lerp_f1D(0.01f, 0.1f, fRatio);
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
m_fOutLineThickness = CMyTools::Lerp_f1D(0.024f, 0.5f, fRatio);
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
return E_FAIL;
}
@@ -162,7 +162,6 @@ void CGoblin_Mage::Late_Update(_float fTimeDelta)
HRESULT CGoblin_Mage::Render()
{
if (!m_bVisible)
return S_OK;
if (FAILED(Bind_ShaderResources())) {
@@ -4,7 +4,6 @@
#include "Level_Loading.h"
#include "Light_Main.h"
#include "Camera_Debug.h"
#include "Camera_Model.h"
#include "InfoInstance.h"
#include "UI_Manager.h"
#include "Layer.h"
@@ -42,6 +41,7 @@ CLevel_GamePlay::CLevel_GamePlay(ID3D11Device* pDevice, ID3D11DeviceContext* pCo
HRESULT CLevel_GamePlay::Initialize(void* pArg)
{
#ifdef _DEBUG
// 낮, 밤 설정
#ifdef gimch
m_isDay = false;
@@ -58,6 +58,8 @@ HRESULT CLevel_GamePlay::Initialize(void* pArg)
#ifdef 인혁
m_isDay = true;
#endif //
#endif // _DEBUG
if (FAILED(Ready_Lights())) {
return E_FAIL;
@@ -311,6 +313,7 @@ HRESULT CLevel_GamePlay::Ready_Background()
_bool isReady_Background = { true };
_bool isReady_Hogsmeade = { true };
_bool isReady_Hogwart = { true };
#ifdef _DEBUG
#ifdef gimch
isReady_Background = true;
@@ -337,6 +340,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
isReady_Hogsmeade = false;
isReady_Hogwart = false;
#endif //
#endif // _DEBUG
/* Map Containters */
@@ -654,7 +659,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
#endif //
#ifdef 기무리
isLoad_NPC = true;
isLoad_NPC = false;
#endif //
#ifdef 인혁
@@ -738,7 +743,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
#endif //
#ifdef 기무리
isLoad_Monster = true;
isLoad_Monster = false;
#endif //
#ifdef 인혁
+4 -8
View File
@@ -14,7 +14,6 @@
#include "CamPosition_Socket.h"
#include "CamPosition_Target.h"
#include "CamPosition_AI.h"
#include "Camera_Model.h"
#include "SkyBox.h"
#include "Troll_Weapon.h"
#include "Troll_Rock.h"
@@ -365,7 +364,7 @@ HRESULT CLoader::Loading_For_GamePlay()
m_strMessage = TEXT("텍스쳐를(을) 로딩 중 입니다.");
_bool isLoad_Background = { true };
_bool isLoad_Hogwart = { false };
_bool isLoad_Hogwart = { true };
_bool isLoad_UI_SEQUANTIAL = { true };
_bool isLoad_NPC = { true };
_bool isLoad_Monster = { true };
@@ -385,8 +384,8 @@ HRESULT CLoader::Loading_For_GamePlay()
isLoad_Background = true;
isLoad_Hogwart = false;
isLoad_UI_SEQUANTIAL = false;
isLoad_NPC = true;
isLoad_Monster = true;
isLoad_NPC = false;
isLoad_Monster = false;
#endif //
#ifdef 인혁
isLoad_Background = false;
@@ -1267,6 +1266,7 @@ HRESULT CLoader::Loading_For_GamePlay()
#pragma region UI_ANI
if (true == isLoad_UI_SEQUANTIAL) {
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Ancient_Magic"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152))))
{
@@ -2949,10 +2949,6 @@ HRESULT CLoader::Loading_For_GamePlay()
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Arm>(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Camera_Model */
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Model>(g_iStaticLevel, CCamera_Model::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
return E_FAIL;
@@ -298,9 +298,9 @@ CGameObject* CMapElement_Door::Clone(void* pArg, CGameObject* pOwner)
void CMapElement_Door::Free()
{
if (nullptr != m_pRigidBody) {
m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
}
//if (nullptr != m_pRigidBody) {
// m_pGameInstance->Release_Actor(*m_pRigidBody->Get_Actor());
//}
__super::Free();
SAFE_RELEASE(m_pRigidBody);
@@ -285,8 +285,9 @@ HRESULT CMapElement_Interactable::Render_OutLine()
#endif // _DEBUG
Compute_Depth();
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
m_fOutLineThickness = CMyTools::Lerp_f1D(0.07f, 0.15f, fRatio);
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
m_fOutLineThickness = CMyTools::Lerp_f1D(1.5f, 2.f, fRatio);
if (m_fOutLineThickness > 0.15f) {
m_fOutLineThickness = 0.15f;
}
@@ -395,10 +395,6 @@ HRESULT CMapInfo::Load_LightElements(const _char* pFileName, const _wchar* pLaye
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMapElement_Light>(g_iStaticLevel, NEXT_LEVEL, pLayerTag, &Desc)))
return E_FAIL;
}
#ifndef 기무리
//MSG_BOX("Successed to Load File");
#endif
return S_OK;
}
+14 -3
View File
@@ -114,9 +114,11 @@ HRESULT CMonster::Render_OutLine()
if (FAILED(m_pGameInstance->Bind_PrevMatrix(m_pShaderCom, "g_PrevProjMatrix", D3DTS::PROJ))) {
return E_FAIL;
}
Compute_Depth();
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
m_fOutLineThickness = CMyTools::Lerp_f1D(2.5f, 3.f, fRatio);
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &m_vOutLineColor, sizeof(_float3)))) {
return E_FAIL;
}
@@ -136,10 +138,16 @@ HRESULT CMonster::Render_OutLine()
for (_uint i = 0; i < iNumMeshes; i++)
{
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
m_pModelCom->Get_OffsetMatrix(i).data(),
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
)))
{
return E_FAIL;
}
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
@@ -148,6 +156,9 @@ HRESULT CMonster::Render_OutLine()
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(31, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(32, 0);
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
+112 -58
View File
@@ -1,37 +1,22 @@
#include "pch.h"
#include "Player.h"
#include "GameInstance.h"
#include "InfoInstance.h"
#include "CamPosition_Socket.h"
#include "Camera_Gaze.h"
#include "CamPosition_Arm.h"
#include "Wand.h"
#include "Item_Potion.h"
#include "Character_Controller.h"
#include "CamPosition_Shoulder.h"
#include "Broom.h"
#include "BroomRaceManager.h"
#include "CallBack_Playable_Behavior.h"
#include "CallBack_Playable_HitReport.h"
#include "Monster.h"
#include "Broom.h"
#include "MapElement_Interactable.h"
#include "BroomRaceManager.h"
#include "RaceRing.h"
#include "PlayerRobe.h"
#pragma region STATE
#include "State_Idle.h"
#include "State_Dodge.h"
#include "State_Jump.h"
#include "State_Land.h"
#include "State_Move.h"
#include "State_Combat.h"
#include "State_Hit.h"
#include "State_Broom_Ride.h"
#pragma endregion
#include "Layer.h"
#include "CamPosition_Shoulder.h"
#include "Character_Controller.h"
#include "EffectPool.h"
#include "GameInstance.h"
#include "InfoInstance.h"
#include "Item_Potion.h"
#include "Layer.h"
#include "MapElement_Interactable.h"
#include "Monster.h"
#include "PlayerRobe.h"
#include "RaceRing.h"
#include "Wand.h"
CPlayer::CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CUnit(pDevice, pContext)
@@ -234,21 +219,19 @@ void CPlayer::Late_Update(_float fTimeDelta)
m_pTransformCom->Set_State(STATE::LOOK, look);
////////////////////////////////////////////////////////////////////////////
//#ifdef 기무리
// if (nullptr == m_pRobePart) {
// {
// CPlayerRobe::PlayerRobe_DESC Desc{};
// Desc.pModel = m_pModelCom;
// Desc.pParentTransform = m_pTransformCom;
// Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
// if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
// assert(false);
// }
// }
// }
//#endif // 기무리
#ifdef 기무리
if (nullptr == m_pRobePart) {
{
CPlayerRobe::PlayerRobe_DESC Desc{};
Desc.pModel = m_pModelCom;
Desc.pParentTransform = m_pTransformCom;
Desc.pSocketMatrix = m_pModelCom->Get_BoneMatrixPtr("Hips_Cloth");
if (FAILED(Add_PartObject<CPlayerRobe>("RobePart", g_iStaticLevel, &m_pRobePart, &Desc))) {
assert(false);
}
}
}
#endif // 기무리
}
@@ -260,6 +243,8 @@ HRESULT CPlayer::Render()
if (FAILED(Bind_ShaderResources())) {
return E_FAIL;
}
_float fIntensity = 0.f;
m_pShaderCom->Bind_RawValue("g_fMBIntensity", &fIntensity, sizeof(_float));
RENDER eType = m_pGameInstance->Get_CurrentRenderPass();
if (RENDER::NONBLEND == eType) {
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
@@ -269,7 +254,14 @@ HRESULT CPlayer::Render()
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
#ifdef _DEBUG
#ifdef 기무리
if (FAILED(m_pModelCom->Bind_BoneMatrices(i, m_pShaderCom, "g_BoneMatrices"))) {
return E_FAIL;
}
#endif // 기무리
#endif // _DEBUG
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
m_pModelCom->Get_OffsetMatrix(i).data(),
@@ -278,6 +270,9 @@ HRESULT CPlayer::Render()
{
return E_FAIL;
}
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
return E_FAIL;
}
@@ -285,16 +280,15 @@ HRESULT CPlayer::Render()
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
}
#ifdef _DEBUG
Render_CameraCoordinateSystem();
//m_pCharacter_Controller->Render();
#endif // _DEBUG
}
#ifdef _DEBUG
if (RENDER::NONLIGHT == eType) {
@@ -418,23 +412,14 @@ void CPlayer::Set_RaceRing(CRaceRing* pRaceRing)
_vector TargetPos = pRaceRing->Get_WorldPostion();
m_pInfoInstance->Event_CallBack(TEXT("BroomTargetGate"), &TargetPos);
}
SAFE_RELEASE(m_pRaceRing);
m_pRaceRing = pRaceRing;
SAFE_ADDREF(m_pRaceRing);
}
void CPlayer::Render_CameraCoordinateSystem()
{
m_Batch->Begin();
const _float fArrowLength = 2.0f;
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
GUI::Text("%d", m_LockOnInfo.pUnit);
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
@@ -471,6 +456,7 @@ void CPlayer::Render_CameraCoordinateSystem()
);
m_Batch->End();
}
}
HRESULT CPlayer::Ready_Components()
{
CTransform::TRANSFORM_DESC Desc = {};
@@ -647,6 +633,21 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
fMixerFactor = 0.658333f;
iColorMixerMethod = 1;
break;
#ifdef _DEBUG
#ifdef 기무리
case PLAYER_MESH_ORDER::ROBE_CLOTH:
if (FAILED(m_pModelCom->Bind_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_pShaderCom, "g_BoneMatrices"))) {
return E_FAIL;
}
if (nullptr != m_pRobePart) {
if (FAILED(m_pRobePart->Bind_PrevBoneMatrices(m_pShaderCom, "g_PrevBoneMatrices"))) {
return E_FAIL;
}
}
break;
#endif
#endif // _DEBUG
default:
break;
}
@@ -778,11 +779,64 @@ void CPlayer::Free()
}
#ifdef _DEBUG
void CPlayer::Render_CameraCoordinateSystem()
{
m_Batch->Begin();
const _float fArrowLength = 2.0f;
_vector xmvLook = XMVector4Normalize(XMVectorSetY(m_pTransformCom->Get_State(STATE::LOOK), 0.f));
_float2 vLook = { XMVectorGetX(xmvLook), XMVectorGetZ(xmvLook) };
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
GUI::Text("%d", m_LockOnInfo.pUnit);
GUI::Text("W : %.2f, %.2f, %.2f", m_vCameraLookDir.x, 0.f, m_vCameraLookDir.z);
GUI::Text("A : %.2f, %.2f, %.2f", -m_vCameraRightDir.x, 0.f, -m_vCameraRightDir.z);
GUI::Text("S : %.2f, %.2f, %.2f", -m_vCameraLookDir.x, 0.f, -m_vCameraLookDir.z);
GUI::Text("D : %.2f, %.2f, %.2f", m_vCameraRightDir.x, 0.f, m_vCameraRightDir.z);
_float fButtonSize = 45.f;
GUI::Button("##0", { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button(("W : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button("##2", { fButtonSize, fButtonSize });
GUI::Button(("A : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , -m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button("##4", { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button(("D : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })))).c_str(), { fButtonSize, fButtonSize });
GUI::Button("##6", { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button(("S : " + to_string(XMConvertToDegrees(CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , -m_vCameraLookDir.z })))).c_str(), { fButtonSize, fButtonSize }); GUI::SameLine();
GUI::Button("##8", { fButtonSize, fButtonSize });
//W CMyTools::Get_Direction2D(vLook, { m_vCameraLookDir.x , m_vCameraLookDir.z })
//A CMyTools::Get_Direction2D(vLook, { -m_vCameraRightDir.x , - m_vCameraRightDir.z })
//S CMyTools::Get_Direction2D(vLook, { m_vCameraRightDir.x , m_vCameraRightDir.z })
//D CMyTools::Get_Direction2D(vLook, { -m_vCameraLookDir.x , - m_vCameraLookDir.z })
}
GUI::End();
m_Batch->DrawLine( // W
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::GhostWhite),
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraLookDir), DirectX::Colors::Blue)
);
m_Batch->DrawLine( // D
VertexPositionColor(fArrowLength * -XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::GhostWhite),
VertexPositionColor(fArrowLength * XMLoadFloat3(&m_vCameraRightDir), DirectX::Colors::Red)
);
m_Batch->DrawLine( // PlayerLook
VertexPositionColor(XMVectorZero(), DirectX::Colors::GhostWhite),
VertexPositionColor(fArrowLength * xmvLook, DirectX::Colors::HotPink)
);
m_Batch->End();
}
void CPlayer::Describe_Entity()
{
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
GUI::PushItemWidth(80);
if (GUI::CollapsingHeader("PLAYER_DESC")) {
if (true == GUI::Button("ShaderRefresh")) {
m_pShaderCom->Shader_Refresh();
}
m_pCharacter_Controller->Describe_Entity();
_float4 vMomentum = {};
XMStoreFloat4(&vMomentum, m_pTransformCom->Get_CurrentMomentum());
+31 -12
View File
@@ -19,14 +19,16 @@ void CPlayerRobe::Update(_float fTimeDelta)
{
_matrix SocketMatrixFixed = (XMMatrixRotationZ(XM_PI) * XMLoadFloat4x4(m_pSocketMatrix)) *
XMLoadFloat4x4(m_pParentTransformCom->Get_WorldMatrixPtr());
m_pRobeMainAnchor->Move_Kinematic(SocketMatrixFixed, false);
m_pRobeMainAnchor->Get_Actor()->wakeUp();
Update_LegsPosition();
Update_RobeSocketPosition();
}
void CPlayerRobe::Late_Update(_float fTimeDelta)
{
Update_RobeSocketPosition();
#ifdef _DEBUG
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
PSX::PxConstraintFlags pxConstraintFlags = m_pDynamicJoints[i]->getConstraintFlags();
@@ -41,7 +43,9 @@ void CPlayerRobe::Late_Update(_float fTimeDelta)
HRESULT CPlayerRobe::Render()
{
#ifdef _DEBUG
Render_BonePhysX();
#endif // _DEBUG
return S_OK;
}
@@ -54,21 +58,31 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
pxTransform = m_pRobeJointAnchor[i]->Get_GlobalPosition();
WorldMatrix = XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTransform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTransform.p), 1.f));
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], WorldMatrix * OwnerInvWorldMatrix);
_fmatrix LocalMatrix = WorldMatrix* OwnerInvWorldMatrix;
XMStoreFloat4x4(&m_ReconstructedJointAnchorMatirces[i], LocalMatrix);
m_pModelCom->Set_BoneCombinedTransformation(PLAYER_JOINT_BONE_NAMES[i], LocalMatrix);
}
}
{
D3D11_MAPPED_SUBRESOURCE SubResource{};
if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
return E_FAIL;
}
memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
}
m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
//{
// D3D11_MAPPED_SUBRESOURCE SubResource{};
// if (FAILED(m_pContext->Map(m_pBoneCombinedMatrixBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &SubResource))) {
// return E_FAIL;
// }
// memcpy_s(SubResource.pData, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_ReconstructedJointAnchorMatirces, sizeof(_float4x4) * ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END));
// m_pContext->Unmap(m_pBoneCombinedMatrixBuffer, 0);
//}
//m_pModelCom->ComputeInsertionBoneBuffer(m_BoneInsertionDesc, m_pBoneCombinedMatrixSRV);
return S_OK;
}
HRESULT CPlayerRobe::Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant)
{
HRESULT hr = E_FAIL;
hr = pShader->Bind_Matrices(pConstant, m_PrevRobeBoneMatrices.data(), m_iBoneNum);
m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END), m_PrevRobeBoneMatrices);
return hr;
}
HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld)
{
@@ -210,7 +224,6 @@ HRESULT CPlayerRobe::Render_Legs()
return S_OK;
}
HRESULT CPlayerRobe::Render_BonePhysX()
{
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
@@ -491,6 +504,12 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
m_pSocketMatrix = pDesc->pSocketMatrix;
m_pModelCom = pDesc->pModel;
m_iBoneNum = m_pModelCom->Get_MeshInfluencedBoneNum(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH));
m_PrevRobeBoneMatrices.resize(m_iBoneNum);
if (FAILED(m_pModelCom->Capture_BoneMatrices(ENUM_CLASS(PLAYER_MESH_ORDER::ROBE_CLOTH), m_PrevRobeBoneMatrices))) {
return E_FAIL;
}
m_pLeftFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftFoot");
m_pLeftLegLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("LeftLeg");
m_pRightFootLocalMatrix = m_pModelCom->Get_BoneMatrixPtr("RightFoot");
+28 -15
View File
@@ -443,13 +443,36 @@ HRESULT CRanrok::Render_Nonblend()
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
m_pModelCom->Get_OffsetMatrix(i).data(),
(_int)m_pModelCom->Get_OffsetMatrix(i).size()
)))
{
return E_FAIL;
}
if (FAILED(m_pModelCom->Bind_Material(i, m_pShaderCom))) {
return E_FAIL;
}
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (true == m_bDrawOutLine) {
m_pGameInstance->Begin_OutLine_Write(2);
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
if (true == m_bDrawOutLine) {
m_pGameInstance->End_OutLine_Write();
}
@@ -512,20 +535,9 @@ HRESULT CRanrok::Render_Blend()
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (true == m_bDrawOutLine) {
m_pGameInstance->Begin_OutLine_Write(2);
}
if (FAILED(m_pModelCom->Render(i))) {
return E_FAIL;
}
if (true == m_bDrawOutLine) {
m_pGameInstance->End_OutLine_Write();
}
}
if (true == m_bDrawOutLine) {
Render_OutLine();
}
return S_OK;
}
@@ -537,8 +549,9 @@ HRESULT CRanrok::Render_OutLine()
}
Compute_Depth();
_float fRatio = CMyTools::Saturate((m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar()));
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
m_fOutLineThickness = CMyTools::Lerp_f1D(0.14f, 0.5f, fRatio);
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
return E_FAIL;
}
@@ -565,7 +578,7 @@ HRESULT CRanrok::Render_OutLine()
}
_uint iNumMeshes = m_pModelCom->Get_NumMeshes();
for (_uint i = 0; i < iNumMeshes; i++)
for (_uint i = ENUM_CLASS(RANROK_MESH_ORDER::WINGS); i < ENUM_CLASS(RANROK_MESH_ORDER::END); ++i)
{
if (FAILED(m_pShaderCom->Bind_Matrices(
"g_OffsetMatrix",
+3 -8
View File
@@ -252,14 +252,9 @@ HRESULT CTroll::Render_OutLine()
}
Compute_Depth();
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
m_fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
if (m_fOutLineThickness > 6.f) {
m_fOutLineThickness = 6.f;
}
else if (m_fOutLineThickness < 2.f) {
m_fOutLineThickness = 2.f;
}
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
m_fOutLineThickness = CMyTools::Lerp_f1D(2.5f, 3.f, fRatio);
if (FAILED(m_pShaderCom->Bind_Matrix("g_PrevWorldMatrix", m_pTransformCom->Get_PrevWorldMatrixPtr()))) {
return E_FAIL;
}
@@ -1,50 +0,0 @@
#pragma once
#include "Client_Define.h"
#include "Camera.h"
NS_BEGIN(Client)
class CCamera_Model final : public CCamera
{
public:
typedef struct tagCamera_Model : public CCamera::CAMERA_DESC
{
_float3 vEye{}, vAt{};
_float fMouseSensor{};
}CAMERA_MODEL_DESC;
private:
CCamera_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
CCamera_Model(const CCamera_Model& rhs);
virtual ~CCamera_Model() = default;
public:
virtual void Priority_Update(_float fTimeDelta) override;
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
private:
class CModel* m_pModelCom = { nullptr };
class CShader* m_pShaderCom = { nullptr };
_bool m_bMovable = true;
_float4x4 m_matInitial = {};
private:
virtual HRESULT Initialize_Prototype() override;
virtual HRESULT Initialize(void* pArg) override;
virtual HRESULT Ready_Components(void* pArg) override;
HRESULT Bind_ShaderResources() override;
void Set_InitialPos();
public:
static CCamera_Model* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
virtual CGameObject* Clone(void* pArg, CGameObject* pOwner) override;
virtual void Free() override;
#ifdef _DEBUG
void Describe_Entity() override;
#endif // _DEBUG
};
NS_END
+3 -2
View File
@@ -34,6 +34,7 @@ class CMonster abstract : public CUnit
virtual CStat* Get_Stat();
const _float4x4* Get_HeadMatrix();
void CameraShake(_float ClampValue, _float Min, _float Max, _float Time);
protected:
CInfoInstance* m_pInfoInstance = { nullptr };
CUnit* m_pTarget = { nullptr };
@@ -46,8 +47,8 @@ class CMonster abstract : public CUnit
_bool m_bLookAt = { true };
_float4 m_vOutLineColor = CMyTools::ColorRGBA_HEXtoFLOAT4(0xfefefe00);
_float m_fOutLineThickness = { 5.f };
_float m_fOutLineScale = { 1.f };
_float m_fOutLinePower = { 1.f };
_float m_fOutLineScale = { 2.f };
_float m_fOutLinePower = { 2.f };
_float m_fDisolveTime = { 0.f };
_bool m_bDisolve = { false };
_float m_fDegree = {};
+5 -2
View File
@@ -32,6 +32,8 @@ class CPlayerRobe final : public CPartObject
virtual void Update(_float fTimeDelta) override;
virtual void Late_Update(_float fTimeDelta) override;
virtual HRESULT Render() override;
HRESULT Update_RobeSocketPosition();
HRESULT Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant);
private:
_float4x4 m_PreTransformMatrix = { };
const _float4x4* m_pSocketMatrix = { nullptr };
@@ -42,7 +44,8 @@ class CPlayerRobe final : public CPartObject
const _float4x4* m_RobeJointAnchorMatrices[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
_float4x4 m_ReconstructedJointAnchorMatirces[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { };
CModel* m_pModelCom = { nullptr };
CModel* m_pModelCom = { nullptr };
_int m_iBoneNum = -1;
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
@@ -54,6 +57,7 @@ class CPlayerRobe final : public CPartObject
ID3D11ShaderResourceView* m_pBoneCombinedMatrixSRV = { nullptr };
CModel::BONEINSERTION_DESC m_BoneInsertionDesc = {};
vector<_float4x4> m_PrevRobeBoneMatrices = { };
#ifdef _DEBUG
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
unique_ptr<GeometricPrimitive> m_pSubShape = { nullptr };
@@ -68,7 +72,6 @@ class CPlayerRobe final : public CPartObject
HRESULT Bind_ShaderResources() { return S_OK; }
HRESULT Update_LegsPosition();
HRESULT Update_RobeSocketPosition();
HRESULT Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC& Desc_Body, ROUTE_DESC& Desc_Route, _matrix* xmAnchorMatricesWorld);
HRESULT Create_BoneCombinedMatrixSRV();
#ifdef _DEBUG
@@ -44,6 +44,7 @@ float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vSha
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
{
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
fRimLight = max(fRimLight, 1e-6f);
fRimLight = pow(fRimLight, fRimPower);
fRimLight = fRimLight * fRimStrength;
return fRimLight;
@@ -70,24 +71,55 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
float2 UV_Cutting(float2 originalUV, float2 uvCuttingCountFloat, int currentFrameIndex)
{
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;
// (1) 칸 개수는 정수로 취급 (0 방지)
int uvCuttingCountX = max((int) uvCuttingCountFloat.x, 1);
int uvCuttingCountY = max((int) uvCuttingCountFloat.y, 1);
int totalFrameCount = uvCuttingCountX * uvCuttingCountY;
// (2) currentFrameIndex를 [0, totalFrameCount)로 래핑 (정수 % 제거)
int wrappedFrameIndex = currentFrameIndex;
if (totalFrameCount > 0)
{
float inverseTotalFrameCount = 1.0f / (float) totalFrameCount;
// loopCount = floor(currentFrameIndex / totalFrameCount)
int loopCount = (int) floor((float) currentFrameIndex * inverseTotalFrameCount);
wrappedFrameIndex = currentFrameIndex - loopCount * totalFrameCount;
// 음수 프레임까지 방어(선택)
if (wrappedFrameIndex < 0)
{
wrappedFrameIndex += totalFrameCount;
}
}
else
{
wrappedFrameIndex = 0;
}
// (3) 가로 기준으로 행/열 구하기 (정수 /, % 제거)
float inverseCuttingCountX = 1.0f / (float) uvCuttingCountX;
float inverseCuttingCountY = 1.0f / (float) uvCuttingCountY;
// frameIndexY = floor(wrappedFrameIndex / uvCuttingCountX)
int frameIndexY = (int) floor((float) wrappedFrameIndex * inverseCuttingCountX);
// frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX (% 대체)
int frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX;
// (4) UV 변환
float2 resultUV = originalUV;
resultUV.x = resultUV.x * inverseCuttingCountX + (float) frameIndexX * inverseCuttingCountX;
resultUV.y = resultUV.y * inverseCuttingCountY + (float) frameIndexY * inverseCuttingCountY;
return resultUV;
}
// (Kd F(Lambert)) + (Ks F(cook-torrance))
//float LambertDiffuse(float c)
@@ -153,7 +185,7 @@ PBR_LIGHT_OUT PBR_Lighting(
float3 vAlbedo, float fMetallic, float fRoughness,
float3 vLightColor, float fLightIntensity, float fAttenuation, float3 vFO
) {
PBR_LIGHT_OUT Out;
PBR_LIGHT_OUT Out = (PBR_LIGHT_OUT)0;
Out.vShade = 0;
Out.vSpecular = 0;
float3 vLighting = vLightColor * fLightIntensity;
@@ -163,8 +195,8 @@ PBR_LIGHT_OUT PBR_Lighting(
float NdotV = saturate(dot(vNormal, vToView));
if (NdotL <= 0 || NdotV <= 0)
{
Out.vShade = 0;
Out.vSpecular = 0;
Out.vShade = float3(0.f, 0.f, 0.f);
Out.vSpecular = float3(0.f, 0.f, 0.f);
return Out;
}
@@ -475,12 +507,12 @@ float4 ApplyDissolve(Texture2D DisolveTexture, float fDisolveRatio, float fDisol
bool IsValidUV(float2 uv)
{
if (uv.x < 0 || uv.x >= 1
|| uv.y < 0 || uv.y >= 1)
bool bReturn = true;
if (uv.x < 0 || uv.x >= 1 || uv.y < 0 || uv.y >= 1)
{
return false;
bReturn = false;
}
return true;
return bReturn;
}
float4 BilinearFetches(float2 vGlobalTexelSize, Texture2D SrcTexture2D, float2 vCenterTexCoord, sampler samplerLinear)
@@ -535,9 +567,10 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
}
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIntensity = 1.f)
{
float2 vReturnVelocity = float2(0.5f, 0.5f);
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5)
{
return float2(0.5f, 0.5f);
return vReturnVelocity;
}
float2 currentNDC = vCurrentProjPos.xy / vCurrentProjPos.w;
@@ -553,6 +586,10 @@ float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIn
return velocityUV * 0.5f + 0.5f; // 0 속도 -> 0.5
}
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
{
return CalcVelocityUV(vCurrentProjPos, vPreviousProjPos, 1.0f);
}
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
{
@@ -51,7 +51,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -17,7 +17,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -40,7 +40,7 @@ struct PS_OUT
};
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
Out.vColor = g_vColor;
@@ -166,7 +166,7 @@ struct PS_OUT_VELOCITYTILE
};
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -180,7 +180,7 @@ VS_OUT VS_MAIN(VS_IN In)
}
VS_OUT VS_CAPTURE(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
float2 vClipPos = In.vPosition.xy * 2.0f; // → -1.0 ~ +1.0
@@ -191,7 +191,7 @@ VS_OUT VS_CAPTURE(VS_IN In)
}
VS_OUT VS_TONE_MAPPING(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -295,7 +295,7 @@ PS_OUT_VELOCITYBLUR PS_MOTIONBLUR(PS_IN In)
vReferenceVelocityPixel = vBlurVeloPixel;
}
float fCenterSpreadLengthPixel = clamp(abs(dot(vReferenceVelocityPixel, vBlurDirPixel)), 0.f, g_fMBBlurRadius);
[loop]
for (int iInterval = -iMaxRadius; iInterval <= iMaxRadius; ++iInterval) {
float fOffset = (float) abs(iInterval);
@@ -412,7 +412,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
{
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV);
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV).xy;
vSampleDiff = vSampleVel *2.f - 1.f;
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
if (fSampleSpeed > vMaxSpeed) {
@@ -685,6 +685,15 @@ PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
return Out;
};
PS_OUT_BACKBUFFER PS_MAIN_PRINT(PS_IN In)
{
PS_OUT_BACKBUFFER Out;
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
return Out;
};
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
@@ -795,7 +804,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_UPSAMPLE(PS_IN In)
for (int iCol = -1; iCol < 2; ++iCol) {
uv = In.vTexcoord + vTexcelSize * float2(iRow, iCol);
if (true == IsValidUV(uv)) {
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0);
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0).xyz;
fWeight += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol];
}
}
@@ -811,6 +820,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_X(PS_IN In)
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
float fWeight = 0.f;
float2 uv = float2(0.f, 0.f);
[loop]
for (int i = -15; i < 16; ++i)
{
uv.x = In.vTexcoord.x + ((float) i / g_vResolution.x);
@@ -838,6 +849,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_COMBINE(PS_IN In)
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
float fWeight = 0.f;
float2 uv = float2(0.f, 0.f);
[loop]
for (int i = -15; i < 16; ++i)
{
uv.x = In.vTexcoord.x;
@@ -867,7 +880,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
float2 uv = In.vTexcoord;
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
float3 vColor = (0.f, 0.f, 0.f);
float3 vColor = float3(0.f, 0.f, 0.f);
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
@@ -888,7 +901,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_DOWNSAMPLE(PS_IN In)
float2 uv = In.vTexcoord;
float fSrcAlpha = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
float3 vColor = (0.f, 0.f, 0.f);
float3 vColor = float3(0.f, 0.f, 0.f);
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
@@ -978,6 +991,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
}
float fAcc = 0.f;
[loop]
for (int i = -16; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x + ((float) i / g_vResolution.x) * fBlurAmount * g_fDOFBlurMultiplier;
@@ -1069,6 +1083,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In)
}
float fAcc = 0.f;
[loop]
for (int i = -16; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x;
@@ -1256,6 +1271,7 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In)
float3x3 toViewTBNMatrix = float3x3(vTangent, vBiNormal, vCenterViewNormal);
float fOcclusion = 0.f;
[loop]
for (uint i = 0; i < g_iKernelSize; ++i)
{
float3 vViewSamplePosVec = mul(g_SamplePos[i].xyz, toViewTBNMatrix); // TANSPACE -> VIEW
@@ -1522,4 +1538,13 @@ technique11 DefaultTechnique
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MOTIONBLUR_TENTSAMPLE();
}
pass PrintToBackBufferPass // 22
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MAIN_PRINT();
}
}
@@ -20,7 +20,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -46,7 +46,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
/* 디스토션 렌더타겟 텍스쳐 샘플링 */
@@ -72,7 +72,8 @@ Texture2D g_DeadDisolveTexture;
Texture2D g_DeadDisolveBurnTexture;
int g_iBinded_Texture[27];
matrix g_BoneMatrices[512];
matrix g_BoneMatrices[256];
matrix g_PrevBoneMatrices[256];
struct VS_IN_MESH
{
@@ -107,7 +108,7 @@ struct VS_OUT
};
VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
matWV = mul(g_WorldMatrix, g_ViewMatrix);
@@ -130,7 +131,7 @@ VS_OUT VS_MAIN_MESH(VS_IN_MESH In)
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
float4 w = In.vBlendWeight;
float sumW = max(dot(w, 1.0f), 1e-6f);
@@ -182,9 +183,63 @@ VS_OUT VS_MAIN(VS_IN In)
return Out;
}
VS_OUT VS_MAIN_LEGACY(VS_IN In)
{
VS_OUT Out = (VS_OUT)0;
float4 w = In.vBlendWeight;
float sumW = max(dot(w, 1.0f), 1e-6f);
w /= sumW;
matrix BoneMatrix =
mul(g_OffsetMatrix[In.vBlendIndex.x],
mul(g_BoneMatrices[In.vBlendIndex.x], w.x))
+ mul(g_OffsetMatrix[In.vBlendIndex.y],
mul(g_BoneMatrices[In.vBlendIndex.y], w.y))
+ mul(g_OffsetMatrix[In.vBlendIndex.z],
mul(g_BoneMatrices[In.vBlendIndex.z], w.z))
+ mul(g_OffsetMatrix[In.vBlendIndex.w],
mul(g_BoneMatrices[In.vBlendIndex.w], w.w));
matrix PrevBoneMatrix =
mul(g_OffsetMatrix[In.vBlendIndex.x],
mul(g_PrevBoneMatrices[In.vBlendIndex.x], w.x))
+ mul(g_OffsetMatrix[In.vBlendIndex.y],
mul(g_PrevBoneMatrices[In.vBlendIndex.y], w.y))
+ mul(g_OffsetMatrix[In.vBlendIndex.z],
mul(g_PrevBoneMatrices[In.vBlendIndex.z], w.z))
+ mul(g_OffsetMatrix[In.vBlendIndex.w],
mul(g_PrevBoneMatrices[In.vBlendIndex.w], w.w));
vector vPosition = mul(vector(In.vPosition, 1.f), BoneMatrix);
vector vPrevPosition = mul(vector(In.vPosition, 1.f), PrevBoneMatrix);
vector vNormal = mul(vector(In.vNormal, 0.f), BoneMatrix);
vector vBinormal = mul(vector(In.vBinormal, 0.f), BoneMatrix);
vector vTangent = mul(vector(In.vTangent, 0.f), BoneMatrix);
matrix matWV, matWVP;
matWV = mul(g_WorldMatrix, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
matrix matPrevWV, matPrevWVP;
matPrevWV = mul(g_PrevWorldMatrix, g_PrevViewMatrix);
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
Out.vPosition = mul(vPosition, matWVP);
Out.vNormal = normalize(mul(vNormal, g_WorldMatrix)).xyz;
Out.vBinormal = normalize(mul(vBinormal, g_WorldMatrix)).xyz;
Out.vTangent = normalize(mul(vTangent, g_WorldMatrix)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vWorldPos = mul(vPosition, g_WorldMatrix);
Out.vProjPos = Out.vPosition;
Out.vPrevProjPos = mul(vPrevPosition, matPrevWVP);
return Out;
}
VS_OUT VS_MAIN_OUTLINE_READ(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
float4 w = In.vBlendWeight;
float sumW = max(dot(w, 1.0f), 1e-6f);
@@ -331,9 +386,9 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
(In.vProjPos.w / g_fFar),
(float) AI_TEXTURE_TYPE_METALNESS / (float) AI_TEXTURE_TYPE_MAX,
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
Out.vSurface = float4(0.5f, 1.f, 1.f, 0.f);
@@ -344,7 +399,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -356,9 +411,8 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
float AlphaMask = vDAO_Mask.g;
float AoMask_Dao = vDAO_Mask.b;
if (AlphaMask < 0.2f) {
discard;
}
clip(AlphaMask - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -368,8 +422,8 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
float SpecMask = vTHV_Mask.g;
float AoMask_Thv = vTHV_Mask.b;
float3 vColorRoot = vDAO_Mask * 0.6f;
float3 vColorTip = vDAO_Mask;
float3 vColorRoot = vDAO_Mask.rgb.rgb * 0.6f;
float3 vColorTip = vDAO_Mask.rgb;
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
@@ -388,7 +442,7 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -396,9 +450,9 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
@@ -421,7 +475,7 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
PS_OUT PS_EYE_DN_SRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -429,9 +483,8 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
@@ -452,7 +505,7 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
PS_OUT PS_EYE_OCC(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
discard;
return Out;
}
@@ -460,7 +513,7 @@ PS_OUT PS_EYE_OCC(PS_IN In)
PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -471,11 +524,9 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
float fDiffuseMask = vDAO_Mask.r;
float AlphaMask = vDAO_Mask.g;
float AoMask_Dao = vDAO_Mask.b;
clip(AlphaMask - 0.2f);
if (AlphaMask < 0.2f)
{
discard;
}
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -485,8 +536,8 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
float SpecMask = vTHV_Mask.g;
float AoMask_Thv = vTHV_Mask.b;
float3 vColorRoot = vDAO_Mask * 0.6f;
float3 vColorTip = vDAO_Mask;
float3 vColorRoot = vDAO_Mask.rgb * 0.6f;
float3 vColorTip = vDAO_Mask.rgb;
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
@@ -506,7 +557,7 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -517,11 +568,9 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
float fDiffuseMask = vDAO_Mask.r;
float AlphaMask = vDAO_Mask.g;
float AoMask_Dao = vDAO_Mask.b;
clip(AlphaMask - 0.2f);
if (AlphaMask < 0.2f)
{
discard;
}
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -531,16 +580,16 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
float SpecMask = vTHV_Mask.g;
float AoMask_Thv = vTHV_Mask.b;
float3 vColorRoot = vDAO_Mask * 0.6f;
float3 vColorTip = vDAO_Mask;
float3 vColorRoot = vDAO_Mask.rgb * 0.6f;
float3 vColorTip = vDAO_Mask.rgb;
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
Out.vAlbedo = float4(vBaseColor, AlphaMask);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 源딆씠 ( 0~ 1)
(In.vProjPos.w / g_fFar), // 酉??ㅽ럹?댁뒪 Z
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX, // ?쒗럹?댁뒪 ?뚮씪誘명꽣
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
(In.vProjPos.w / g_fFar),
(float) AI_TEXTURE_TYPE_SPECULAR / (float) AI_TEXTURE_TYPE_MAX,
1.f);
Out.vColor = float4(0.f, 0.f, 0.f, 1.f);
Out.vSurface = float4(lerp(0.7f, 0.3f, SpecMask), SpecMask * 0.5f, AoMask_Dao * AoMask_Thv, 0.f);
@@ -551,7 +600,7 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -559,9 +608,9 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -583,7 +632,7 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -591,9 +640,9 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -615,7 +664,7 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -623,9 +672,9 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -647,7 +696,7 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -655,9 +704,9 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -679,7 +728,7 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
@@ -689,9 +738,9 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
vDiffuse.rgb += vEmissive.rgb * 3.f;
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -713,7 +762,7 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
PS_OUT PS_DNMRO_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
@@ -723,9 +772,9 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
vDiffuse.rgb += vEmissive.rgb * 3.f;
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -747,7 +796,7 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -757,9 +806,9 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
}
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse.rgb += vEmissive.rgb;
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -781,7 +830,7 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -790,10 +839,9 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
}
float4 vAlpha = g_TransmissionTexture.Sample(DefaultSampler, In.vTexcoord);
if (vAlpha.r < 0.2f)
{
discard;
}
clip(vAlpha.r - 0.2f);
vDiffuse.a = vAlpha.r;
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
@@ -821,7 +869,7 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (true == g_bDisolve)
@@ -833,9 +881,9 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
float4 vAmbient = g_AmbientTexture.Sample(DefaultSampler, In.vTexcoord);
vDiffuse.rgb += vEmissive.rgb;
vDiffuse.rgb += vAmbient.rgb;
if (vDiffuse.a < 0.2f) {
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -861,7 +909,7 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
}
PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float2 center = float2(0.5f, 0.5f);
float2 p = uv - center;
@@ -890,10 +938,8 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
float3 vColorTip = vColorHair;
float3 vBaseColor = lerp(vColorRoot, vColorTip, RootTip);
if (fAlpha < 0.3f)
{
discard;
}
clip(fAlpha - 0.2f);
Out.vAlbedo = float4(vBaseColor, fAlpha);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
@@ -908,7 +954,7 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
}
PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -938,7 +984,7 @@ PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
}
PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -970,7 +1016,7 @@ PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
}
PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -1000,7 +1046,7 @@ PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
}
PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -1031,10 +1077,9 @@ PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
float fAlphaRoot = AlphaMask;
float fBaseAlpha = lerp(fAlphaRoot, fAlphaTip, (1.f - RootTip));
float fAlpha = (fBaseAlpha);
if (fAlpha < 0.2f)
{
discard;
}
clip(fAlpha - 0.2f);
Out.vAlbedo = float4(vBaseColor, fAlpha);
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
@@ -1089,7 +1134,7 @@ PS_OUT_BLEND PS_Dragon_EtherealWings(PS_IN In)
PS_OUT PS_Dragon_Body(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -1099,10 +1144,9 @@ PS_OUT PS_Dragon_Body(PS_IN In)
}
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uv).r;
vDiffuse.a = fOppacity;
if (vDiffuse.a < 0.2f)
{
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -1126,7 +1170,7 @@ PS_OUT PS_Dragon_Body(PS_IN In)
PS_OUT PS_Dragon_Wings(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 uv = In.vTexcoord;
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
if (true == g_bDisolve)
@@ -1137,10 +1181,9 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, uv);
vDiffuse += vEmissive;
if (vDiffuse.a < 0.2f)
{
discard;
}
clip(vDiffuse.a - 0.2f);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
float3 vNormal = normalize(mul(vNormalDecoded, WorldMatrix));
@@ -1435,7 +1478,7 @@ technique11 DefaultTechnique
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
VertexShader = compile vs_5_0 VS_MAIN_LEGACY();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_Player_Suit_DSRON_ToSRO();
}
@@ -1462,7 +1505,7 @@ technique11 DefaultTechnique
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_Default, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
VertexShader = compile vs_5_0 VS_MAIN_LEGACY();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_Player_Robe_ToMRO();
}
@@ -94,7 +94,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -120,7 +120,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -131,7 +131,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_Texture_Color(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
float4 Color = g_Texture1.Sample(DefaultSampler, In.vTexcoord);
@@ -145,7 +145,7 @@ PS_OUT PS_Texture_Color(PS_IN In)
PS_OUT PS_Logo(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -166,7 +166,7 @@ PS_OUT PS_Logo(PS_IN In)
PS_OUT PS_Logo_Text(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -192,7 +192,7 @@ PS_OUT PS_Logo_Text(PS_IN In)
PS_OUT PS_Logo_Glow(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -213,7 +213,7 @@ PS_OUT PS_Logo_Glow(PS_IN In)
PS_OUT PS_AlphaBlend(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -228,7 +228,7 @@ PS_OUT PS_AlphaBlend(PS_IN In)
PS_OUT PS_Clamp(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -243,7 +243,7 @@ PS_OUT PS_Clamp(PS_IN In)
PS_OUT PS_Cursor(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
@@ -293,7 +293,7 @@ PS_OUT PS_Cursor(PS_IN In)
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -366,7 +366,7 @@ PS_OUT PS_Key_Hold_Rotation(PS_IN In)
PS_OUT PS_Mission(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
@@ -388,7 +388,7 @@ PS_OUT PS_Mission(PS_IN In)
PS_OUT PS_Sptire_Sheet(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 0.f);
float2 UV = In.vTexcoord;
@@ -423,7 +423,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
PS_OUT PS_QuestType(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Color = float3(253.f, 207.f, 11.f) / 255.f;
float4 Texture1 = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -444,7 +444,7 @@ PS_OUT PS_QuestType(PS_IN In)
PS_OUT PS_Spell_Anim(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -470,7 +470,7 @@ PS_OUT PS_Spell_Anim(PS_IN In)
PS_OUT PS_NineSlice(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -534,7 +534,7 @@ PS_OUT PS_NineSlice(PS_IN In)
PS_OUT PS_Rotation(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(0.f, 0.f, 0.f, 0.f);
@@ -562,7 +562,7 @@ PS_OUT PS_Rotation(PS_IN In)
PS_OUT PS_Slot(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float2 center = float2(0.5f, 0.5f);
@@ -584,7 +584,7 @@ PS_OUT PS_Slot(PS_IN In)
PS_OUT PS_SpellAnim(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
@@ -686,7 +686,7 @@ PS_OUT PS_SpellAnim(PS_IN In)
PS_OUT PS_HpBar(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float4 Color1 = float4(1.f, 1.f, 1.f, 1.f);
@@ -783,7 +783,7 @@ PS_OUT PS_HpBar(PS_IN In)
PS_OUT PS_Magic_Meter(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
@@ -814,7 +814,7 @@ PS_OUT PS_Magic_Meter(PS_IN In)
PS_OUT PS_Magic_Icon(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -850,7 +850,7 @@ PS_OUT PS_Magic_Icon(PS_IN In)
PS_OUT PS_RemapUV(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -873,7 +873,7 @@ PS_OUT PS_RemapUV(PS_IN In)
PS_OUT PS_Revelio(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -912,7 +912,7 @@ PS_OUT PS_Revelio(PS_IN In)
PS_OUT PS_Potion(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(214.f / 255.f, 225 / 255.f, 36 / 255.f, 1.f);
@@ -955,7 +955,7 @@ PS_OUT PS_Potion(PS_IN In)
PS_OUT PS_Magic_Item(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1079,7 +1079,7 @@ PS_OUT PS_Magic_Item(PS_IN In)
PS_OUT PS_Spell_Preview(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1154,7 +1154,7 @@ PS_OUT PS_Spell_Preview(PS_IN In)
PS_OUT PS_Spell_Header(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1200,7 +1200,7 @@ PS_OUT PS_Spell_Header(PS_IN In)
PS_OUT PS_Spell_Header_Line(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1262,7 +1262,7 @@ PS_OUT PS_Spell_Header_Line(PS_IN In)
PS_OUT PS_Spell_Drag(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1291,7 +1291,7 @@ PS_OUT PS_Spell_Drag(PS_IN In)
PS_OUT PS_Camera_LockOn(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1333,7 +1333,7 @@ PS_OUT PS_Camera_LockOn(PS_IN In)
PS_OUT PS_Loding_Screen(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1364,7 +1364,7 @@ PS_OUT PS_Loding_Screen(PS_IN In)
PS_OUT PS_Enemy_HpBer(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1450,7 +1450,7 @@ PS_OUT PS_Enemy_HpBer(PS_IN In)
PS_OUT PS_Boss_HpBer(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1522,7 +1522,7 @@ PS_OUT PS_Boss_HpBer(PS_IN In)
PS_OUT PS_Quest_Border(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1589,7 +1589,7 @@ PS_OUT PS_Quest_Border(PS_IN In)
PS_OUT PS_Quest_Info(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1652,7 +1652,7 @@ PS_OUT PS_Quest_Info(PS_IN In)
PS_OUT PS_Quest_Status(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1723,7 +1723,7 @@ PS_OUT PS_Quest_Status(PS_IN In)
PS_OUT PS_Broomstick(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1776,7 +1776,7 @@ PS_OUT PS_Broomstick(PS_IN In)
PS_OUT PS_SpellLearn(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1797,7 +1797,7 @@ PS_OUT PS_SpellLearn(PS_IN In)
PS_OUT PS_SpellLearnColor(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1869,7 +1869,7 @@ PS_OUT PS_SpellLearnColor(PS_IN In)
PS_OUT PS_SpellLearnBooster(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
@@ -1913,7 +1913,7 @@ PS_OUT PS_SpellLearnBooster(PS_IN In)
PS_OUT PS_NPCInteraction(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -1986,7 +1986,7 @@ PS_OUT PS_NPCInteraction(PS_IN In)
PS_OUT PS_CanvasFade(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(0.f, 0.f, 0.f, 1.f);
@@ -2112,7 +2112,7 @@ VS_OUT3D VS_MAIN3D(VS_IN3D In)
PS_OUT PS_Enemy_Detection(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
@@ -2260,7 +2260,7 @@ VS_OUT3D VS_NONESIZE3D(VS_IN3D In)
PS_OUT PS_Interaction_Object(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 Color = float4(1.f, 1.f, 1.f, 0.f * g_fAlpha);
@@ -2278,7 +2278,7 @@ PS_OUT PS_Interaction_Object(PS_IN In)
PS_OUT PS_Interaction_Npc(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha;
float4 Color = float4(1.f, 1.f, 1.f, 1.f);
float2 uv = In.vTexcoord;
@@ -46,7 +46,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matVP = mul(g_ViewMatrix, g_ProjMatrix);
float3 vLocalPos = In.vPosition;
@@ -87,7 +87,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float2 center = float2(0.5f, 0.5f);
@@ -109,7 +109,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_Alpha_Blend(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = g_Texture.Sample(ClampSampler, In.vTexcoord);
@@ -126,7 +126,7 @@ PS_OUT PS_Alpha_Blend(PS_IN In)
PS_OUT PS_UVAlpha_Blend(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = g_Texture.Sample(ClampSampler, In.vUV);
@@ -143,7 +143,7 @@ PS_OUT PS_UVAlpha_Blend(PS_IN In)
PS_OUT PS_Megic_Meter(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
@@ -169,7 +169,7 @@ PS_OUT PS_Megic_Meter(PS_IN In)
PS_OUT PS_Spell_List(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 Blue = float3(41.f, 165.f, 255.f) / 255.f;
@@ -195,7 +195,7 @@ PS_OUT PS_Spell_List(PS_IN In)
PS_OUT PS_Eessential_Spell_Slot(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -215,7 +215,7 @@ PS_OUT PS_Eessential_Spell_Slot(PS_IN In)
PS_OUT PS_Eessential_Spell(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -232,7 +232,7 @@ PS_OUT PS_Eessential_Spell(PS_IN In)
PS_OUT PS_Color_Image(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -275,7 +275,7 @@ PS_OUT PS_Color_Image(PS_IN In)
PS_OUT PS_Spell_Hover(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float3 HoverOff = g_Texture2.Sample(DefaultSampler, In.vTexcoord).rgb;
@@ -310,7 +310,7 @@ PS_OUT PS_Spell_Hover(PS_IN In)
PS_OUT PS_Spell_Effect(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
if (In.bHover == 0)
discard;
@@ -355,7 +355,7 @@ PS_OUT PS_Spell_Effect(PS_IN In)
PS_OUT PS_Spell_Slot(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 center = float2(0.5f, 0.5f);
float2 uv = In.vTexcoord - center;
@@ -415,7 +415,7 @@ PS_OUT PS_Spell_Slot(PS_IN In)
PS_OUT PS_Spell_Lock(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
@@ -439,7 +439,7 @@ PS_OUT PS_Spell_Lock(PS_IN In)
PS_OUT PS_Quest_Slot(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha;
float4 color = float4(1.f, 1.f, 1.f, 1.f);
@@ -114,7 +114,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
float4 w = In.vBlendWeight;
float sumW = max(dot(w, 1.0f), 1e-6f);
@@ -363,7 +363,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -528,7 +528,7 @@ PS_OUT_BLUR PS_MAIN_BLUR(PS_IN_BLUR In)
PS_OUT PS_HAIR(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 DAO = g_DAOTexture.Sample(DefaultSampler, In.vTexcoord);
float alpha = DAO.a;
@@ -565,7 +565,7 @@ PS_OUT PS_HAIR(PS_IN In)
PS_OUT PS_EYELASH(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
if (vMtrlDiffuse.a < 0.4f)
@@ -595,7 +595,7 @@ PS_OUT PS_EYELASH(PS_IN In)
PS_OUT PS_SPECTOR_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -198,7 +198,7 @@ VS_OUT_SHADOW VS_MAIN_SHADOW(VS_IN In)
}
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
matWV = mul(g_WorldMatrix, g_ViewMatrix);
@@ -349,7 +349,7 @@ struct PS_OUT
};
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
@@ -450,7 +450,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_MAIN_SELECT(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
@@ -467,7 +467,7 @@ PS_OUT PS_MAIN_SELECT(PS_IN In)
PS_OUT PS_GLASS(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vGlassDiffuse = g_GlassTexture.Sample(DefaultSampler, In.vTexcoord);
vector vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -486,7 +486,7 @@ PS_OUT PS_GLASS(PS_IN In)
PS_OUT PS_GLASS_CUBE(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
vector vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -729,7 +729,7 @@ PS_OUT_CAPTUREDMODEL PS_CAPTUREDMODEL(PS_IN_CAPTUREDMODEL In)
PS_OUT PS_LAKE(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 vUV = float2(In.vTexcoord.x + cos(g_fTime * g_vUVSpeed1.x), In.vTexcoord.y + cos(g_fTime * g_vUVSpeed1.y)) * g_fNormalValue1;
float2 vUVLarge = float2(In.vTexcoord.x + cos(g_fTime * g_vUVSpeed2.x), In.vTexcoord.y + cos(g_fTime * g_vUVSpeed2.y)) * g_fNormalValue2;
@@ -775,7 +775,7 @@ PS_OUT PS_LAKE(PS_IN In)
PS_OUT PS_LAND(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 10.f);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord * 10.f);
@@ -811,7 +811,7 @@ PS_OUT PS_LAND(PS_IN In)
PS_OUT PS_NONMRO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -839,7 +839,7 @@ PS_OUT PS_NONMRO(PS_IN In)
PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_EmissiveTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -880,7 +880,7 @@ PS_OUT PS_SPECTOR_WEAPON_MAIN(PS_IN In)
}
PS_OUT PS_LEVIOSO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float4 vMtrlDiffuse = g_DiffuseTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
float4 vSurface = g_SurfaceParamsTexture.Sample(AnisoTropy_BLUR_Sampler, In.vTexcoord);
@@ -86,7 +86,7 @@ float g_fWinSizeX;
float g_fWinSizeY;
/* 디퓨즈 */
vector g_vColor;
float4 g_vColor;
float g_fDiffuseAlpha;
float2 g_vDiffuseUVGainAmount;
@@ -302,18 +302,18 @@ VS_BULR_MESH_OUT VS_MAIN(VS_IN In, uint iGPUIndex : SV_InstanceID)
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vLifeTime = In.vLifeTime;
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
return Out;
}
@@ -329,7 +329,7 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
@@ -345,7 +345,7 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
row_major matrix PreWolrd_NonPosMatrix = g_PrevWorldMatrix;
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
matrix matPrevW, matPrevWV, matPrevWVP;
@@ -357,18 +357,18 @@ VS_BULR_MESH_OUT VS_MAIN_NO_POS(VS_IN In, uint iGPUIndex : SV_InstanceID)
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vLifeTime = In.vLifeTime;
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
return Out;
}
@@ -386,15 +386,15 @@ VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vLifeTime = In.vLifeTime;
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
@@ -411,7 +411,7 @@ VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
@@ -420,15 +420,15 @@ VS_OUT VS_NONPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vLifeTime = In.vLifeTime;
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
return Out;
@@ -455,18 +455,18 @@ VS_BULR_MESH_OUT VS_BLUR_MESH(VS_IN In, uint iGPUIndex : SV_InstanceID)
matPrevWVP = mul(matPrevWV, g_PrevProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
Out.vNormal = normalize(mul(float4(In.vNormal, 0.f), matW));
Out.vTangent = normalize(mul(float4(In.vTangent, 0.f), matW)).xyz;
Out.vBinormal = normalize(mul(float4(In.vBinormal, 0.f), matW)).xyz;
Out.vTexcoord = In.vTexcoord;
Out.vLifeTime = In.vLifeTime;
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
Out.vWorldPos = mul(float4(In.vPosition, 1.f), matW);
Out.iGPUIndex = iGPUIndex;
Out.vProjPos = vPosition;
Out.vPrevProjPos = mul(vector(In.vPosition, 1.f), matPrevWVP);
Out.vPrevProjPos = mul(float4(In.vPosition, 1.f), matPrevWVP);
return Out;
}
@@ -503,11 +503,11 @@ struct PS_NOMAL_OUT
float4 DrawEffect(PS_IN In)
{
vector vMtrlDiffuse = vector(0.f ,0.f ,0.f ,0.f);
vector vMtrlMask;
vector vMtrlNoise;
vector vMtrlDissolve;
vector vMtrlDistortion;
float4 vMtrlDiffuse = float4(0.f ,0.f ,0.f ,0.f);
float4 vMtrlMask;
float4 vMtrlNoise;
float4 vMtrlDissolve;
float4 vMtrlDistortion;
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
@@ -555,7 +555,7 @@ float4 DrawEffect(PS_IN In)
}
vector vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
if (g_isDiffuse_R)
vMtrlDiffuse.r = vDiffuse.r;
@@ -611,7 +611,7 @@ float4 DrawEffect(PS_IN In)
if (g_isNoiseColor)
{
float fNoiseValue = vMtrlNoise.rgb;
float fNoiseValue = vMtrlNoise.r;
if (g_isNoise_G == true)
fNoiseValue = vMtrlNoise.g;
@@ -623,7 +623,7 @@ float4 DrawEffect(PS_IN In)
}
if (length(g_vNoiseColor) > FLT_EPSILON5)
vMtrlDiffuse.rgb *= g_vNoiseColor;
vMtrlDiffuse.rgb *= g_vNoiseColor.rgb;
}
@@ -696,10 +696,7 @@ float4 DrawEffect(PS_IN In)
vMtrlDiffuse.a *= g_fDiffuseAlpha;
if (vMtrlDiffuse.a <= FLT_EPSILON5)
discard;
clip(vMtrlDiffuse.a - FLT_EPSILON5);
if (g_isDissolve == true)
{
@@ -775,16 +772,14 @@ float4 DrawEffect(PS_IN In)
if (g_isNoDissolveSmoothStep == true)
{
fFade = smoothstep(fTimeRatio, fTimeRatio, vMtrlDissolve.r);
fFade = fTimeRatio;
}
vMtrlDiffuse.a *= fFade;
}
if (vMtrlDiffuse.a <= FLT_EPSILON5)
discard;
clip(vMtrlDiffuse.a - FLT_EPSILON5);
}
@@ -793,7 +788,7 @@ float4 DrawEffect(PS_IN In)
float4 EmissiveDraw(PS_IN In, float4 Diffuse)
{
float4 vEmissiveMtrl = vector(0.f, 0.f, 0.f, 0.f);
float4 vEmissiveMtrl = float4(0.f, 0.f, 0.f, 0.f);
float2 CenteredUV = In.vTexcoord - 0.5f;
float fEmissive = 0.f;
float fEmissiveStrength = g_fEmissiveStrength;
@@ -846,9 +841,9 @@ float4 EmissiveDraw(PS_IN In, float4 Diffuse)
}
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
PS_OUT BlendedWeight(float4 fDiffuse, float fLinearZ)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float3 vColor = fDiffuse.rgb;
float fAlpha = fDiffuse.a;
@@ -869,9 +864,11 @@ PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
//float fWeight = pow(fLinearZ, -2.5);
float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
float linearZPositive = max(fLinearZ, 1e-6f);
float fWeight = clamp(pow(linearZPositive, -2.5f), 1.0f, 1000.0f);
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
Out.vDiffuse = float4(vColor.rgb * fAlpha, fAlpha) * fWeight;
Out.vRevealage.r = fAlpha;
@@ -986,7 +983,7 @@ PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
PS_In.vProjPos = In.vProjPos;
PS_In.iGPUIndex = In.iGPUIndex;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
float4 vSurface = g_SurfaceParamsTexture.Sample(DefaultSampler, In.vTexcoord);
float3 vNormalDecoded = DecodeNormalFromRG(g_NormalTexture, DefaultSampler, In.vTexcoord);
@@ -1025,9 +1022,9 @@ PS_NOMAL_OUT PS_MAIN(PS_BLUR_MESH_IN In)
PS_OUT PS_NON_NORMALMAP(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
@@ -1065,7 +1062,7 @@ VS_OUT VS_BLUR(VS_IN In, uint iGPUIndex : SV_InstanceID)
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vTexcoord = In.vTexcoord;
@@ -1088,7 +1085,7 @@ VS_OUT VS_BLUR_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vTexcoord = In.vTexcoord;
@@ -1109,7 +1106,7 @@ VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
row_major matrix Wolrd_NonPosMatrix = g_WorldMatrix;
Wolrd_NonPosMatrix[3] = vector(0.f, 0.f, 0.f, 1.f);
Wolrd_NonPosMatrix[3] = float4(0.f, 0.f, 0.f, 1.f);
matW = mul(TransformMatrix, Wolrd_NonPosMatrix);
@@ -1118,7 +1115,7 @@ VS_OUT VS_BLUR_NOPOS(VS_IN In, uint iGPUIndex : SV_InstanceID)
matWV = mul(matW, g_ViewMatrix);
matWVP = mul(matWV, g_ProjMatrix);
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
float4 vPosition = mul(float4(In.vPosition, 1.f), matWVP);
Out.vPosition = vPosition;
Out.vTexcoord = In.vTexcoord;
@@ -1148,19 +1145,15 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
{
PS_BLUR_OUT Out;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
if (g_isBlurColor == true)
{
if (length(vMtrlDiffuse.rgb) < FLT_EPSILON5)
{
discard;
}
clip(length(vMtrlDiffuse.rgb) - FLT_EPSILON5);
vMtrlDiffuse = vector(g_vBlurColor.rgb, vMtrlDiffuse.a);
vMtrlDiffuse = float4(g_vBlurColor.rgb, vMtrlDiffuse.a);
}
vMtrlDiffuse = SoftEffect(In, vMtrlDiffuse);
@@ -1178,7 +1171,7 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
fBulrIntensity = saturate(fBulrIntensity);
}
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
Out.vDiffuse = float4(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
return Out;
}
@@ -1187,19 +1180,15 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
{
PS_BLUR_OUT Out;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
if(g_isBlurColor == true)
{
if (length(vMtrlDiffuse.rgb) < FLT_EPSILON5)
{
discard;
}
clip(length(vMtrlDiffuse.rgb) - FLT_EPSILON5);
vMtrlDiffuse = vector(g_vBlurColor.rgb, vMtrlDiffuse.a);
vMtrlDiffuse = float4(g_vBlurColor.rgb, vMtrlDiffuse.a);
}
@@ -1220,7 +1209,7 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
fBulrIntensity = saturate(fBulrIntensity);
}
Out.vDiffuse = vector(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
Out.vDiffuse = float4(vMtrlDiffuse.rgb * fBulrIntensity, vMtrlDiffuse.a);
return Out;
}
@@ -1233,7 +1222,7 @@ PS_BLOOM_OUT PS_BLOOM(PS_IN In)
if (FLT_EPSILON5 >= (In.vLifeTime.x / In.vLifeTime.y))
discard;
vector vMtrlDiffuse = vector(0.f, 0.f, 0.f, 0.f);
float4 vMtrlDiffuse = float4(0.f, 0.f, 0.f, 0.f);
vMtrlDiffuse = DrawEffect(In);
@@ -1269,7 +1258,7 @@ PS_BLNED_OUT PS_BLEND(PS_IN In)
{
PS_BLNED_OUT Out;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
@@ -1287,7 +1276,7 @@ PS_BLNED_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
{
PS_BLNED_OUT Out;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
@@ -1304,9 +1293,9 @@ PS_BLNED_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
PS_OUT PS_NO_DEPTH_COMPARE(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
@@ -1323,7 +1312,7 @@ PS_BLOOM_OUT PS_DISTORTION(PS_IN In)
{
PS_BLOOM_OUT Out;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(In);
@@ -1365,7 +1354,6 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
{
PS_BLUR_MESH_OUT Out;
PS_OUT PS_Out;
PS_IN PS_In;
PS_In.vPosition = In.vPosition;
@@ -1378,7 +1366,7 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
PS_In.vProjPos = In.vProjPos;
PS_In.iGPUIndex = In.iGPUIndex;
vector vMtrlDiffuse;
float4 vMtrlDiffuse;
vMtrlDiffuse = DrawEffect(PS_In);
@@ -1393,7 +1381,7 @@ PS_BLUR_MESH_OUT PS_BLUR_MESH(PS_BLUR_MESH_IN In)
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w), // NDC 깊이 ( 0~ 1)
(In.vProjPos.w / g_fFar), // 뷰 스페이스 Z
0.f, // 서페이스 파라미터
1.f);
1.f).rg;
return Out;
}
@@ -38,7 +38,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -80,7 +80,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 tileUV = In.vWorldPos.xz / 16.f;
@@ -139,7 +139,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_MAIN_TERRAIN_ANISO(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 tileUV = In.vWorldPos.xz / 16.f;
@@ -32,7 +32,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
vector vPosition = mul(vector(In.vPosition, 1.f), In.TransformMatrix);
@@ -121,7 +121,7 @@ struct PS_OUT
/* 픽셀 쉐이더 : 픽셀의 최종적인 색을 결정하낟. */
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
@@ -24,7 +24,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -48,7 +48,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
Out.vColor = float4(0.f, 0.f, 0.f, 0.f);
@@ -57,7 +57,7 @@ PS_OUT PS_MAIN(PS_IN In)
PS_OUT PS_DECAL(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 vDepthUV;
vDepthUV.x = In.vPosition.x / 1920.f;
@@ -99,7 +99,7 @@ PS_OUT PS_DECAL(PS_IN In)
PS_OUT PS_DEBUG(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
Out.vColor = float4(1.f, 0.5f, 0.5f, 1.f);
@@ -84,7 +84,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
@@ -104,7 +104,7 @@ VS_OUT VS_MAIN(VS_IN In)
VS_OUT VS_TRAIL(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWVP;
@@ -137,7 +137,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
Out.vColor = g_Texture.Sample(DefaultSampler, In.vTexcoord);
@@ -145,7 +145,7 @@ PS_OUT PS_MAIN(PS_IN In)
}
PS_OUT PS_UVMove(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
float2 vMovedUV = Get_MovedUV(In.vTexcoord, g_fDeltaU, g_fDeltaV, g_iIndexU, g_iIndexV);
@@ -297,7 +297,7 @@ float4 EmissiveDraw(PS_IN In)
PS_TRAILOUT PS_Trail(PS_IN In)
{
PS_TRAILOUT Out;
PS_TRAILOUT Out = (PS_TRAILOUT)0;
int2 iTexel = int2(In.vPosition.xy);
@@ -367,7 +367,7 @@ struct PS_BLOOM_OUT
PS_BLUR_OUT PS_TRAIL_BLOOM(PS_IN In)
{
PS_BLUR_OUT Out;
PS_BLUR_OUT Out = (PS_BLUR_OUT)0;
vector vMtrlDiffuse;
@@ -94,7 +94,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
@@ -20,7 +20,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -46,12 +46,12 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMixedDiffuse = g_MixedDiffuseTexture.Sample(PointSampler, In.vTexcoord);
float fRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord);
float fRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord).r;
Out.vBackBuffer = vector(vMixedDiffuse.rgb / fRevealage , fRevealage);
@@ -452,6 +452,7 @@ call Update_Shaders.bat
<ClCompile Include="..\Private\Goblin_Spector.cpp" />
<ClCompile Include="..\private\Interaction_Panel.cpp" />
<ClCompile Include="..\private\LightSpawner.cpp" />
<ClCompile Include="..\Private\Loader_ObjectViewer.cpp" />
<ClCompile Include="..\private\MapElement_Chest.cpp" />
<ClCompile Include="..\private\MapElement_Door.cpp" />
<ClCompile Include="..\private\MapElement_Chest_Lid.cpp" />
@@ -727,6 +728,10 @@ call Update_Shaders.bat
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</TreatWarningAsError>
<TreatWarningAsError Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</TreatWarningAsError>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_VtxPos.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
@@ -2137,6 +2137,9 @@
<ClCompile Include="..\Private\Ranrok_Breath.cpp">
<Filter>02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\Breath</Filter>
</ClCompile>
<ClCompile Include="..\Private\Loader_ObjectViewer.cpp">
<Filter>01.Level\00.Loading\Loader</Filter>
</ClCompile>
<ClCompile Include="..\Private\Ranrok_Point.cpp">
<Filter>02.GameObjects\Layer_Effect\Effect\Monster_Effect\Ranrok\Point</Filter>
</ClCompile>
@@ -87,13 +87,13 @@ if (m_pModelCom->Get_Type() == MODEL::PBR_ANIM)
if (FAILED(m_pModelCom->Begin(i, m_pShaderCom))) {
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
if (FAILED(Bind_ShaderParameters(i))) {
return E_FAIL;
}
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
}
else {
@@ -107,7 +107,7 @@ HRESULT CEffect_Container::Load_Directory(const _char* pPath)
size_t iPos = {};
_string strFilePath = szFilePath;
while ((iPos = strFilePath.find(".trail")) != std::string::npos) {
while ((iPos = strFilePath.find(".trail")) != string::npos) {
strFilePath.erase(iPos, 6);
};
@@ -149,7 +149,7 @@ HRESULT CEffect_Container::Load_Directory(const _char* pPath)
size_t iPos = {};
_string strFilePath = szFilePath;
while ((iPos = strFilePath.find(".bin")) != std::string::npos) {
while ((iPos = strFilePath.find(".bin")) != string::npos) {
strFilePath.erase(iPos, 4);
};
@@ -227,7 +227,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
size_t iPos = strEffectPath.rfind('.'); // 뒤에서부터 '/' 검색
if (iPos != std::string::npos)
if (iPos != string::npos)
{
strExt += strEffectPath.substr(iPos + 1);
strEffectName = strEffectPath.substr(0, iPos);
@@ -235,7 +235,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
size_t pos = strEffectName.rfind('\\'); // 뒤에서부터 '/' 검색
if (pos != std::string::npos)
if (pos != string::npos)
strEffectName = strEffectName.substr(pos + 1);
if (!strcmp(strExt.c_str(), "trail"))
@@ -255,7 +255,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
/*이펙트 로드 로드*/
size_t iPos = {};
while ((iPos = strEffectPath.find(".trail")) != std::string::npos) {
while ((iPos = strEffectPath.find(".trail")) != string::npos) {
strEffectPath.erase(iPos, 6);
};
@@ -291,7 +291,7 @@ HRESULT CEffect_Container::Load_Package(const _char* pPath)
size_t iPosition = {};
_string strFilePath = strEffectPath;
while ((iPosition = strFilePath.find(".bin")) != std::string::npos) {
while ((iPosition = strFilePath.find(".bin")) != string::npos) {
strFilePath.erase(iPosition, 4);
};
@@ -158,7 +158,7 @@ HRESULT CEffect_Editor::Packaging(const _char* pDirectoryPath)
size_t pos = strDirectoryPath.rfind('/'); // 뒤에서부터 '/' 검색
if (pos != std::string::npos)
if (pos != string::npos)
strPerfectFilePath += strDirectoryPath.substr(pos + 1);
strPerfectFilePath += ".bin";
@@ -281,7 +281,7 @@ HRESULT CEffect_Editor::ReSaveFile(const _char* pDirectoryPath)
size_t iPos;
while ((iPos = strPath.find(ext)) != std::string::npos) {
while ((iPos = strPath.find(ext)) != string::npos) {
strPath.erase(iPos, ext.length());
};
+7 -7
View File
@@ -47,14 +47,14 @@ void CIMGUIUI::CanvaswstringTostring(vector<wstring>& panelNames)
wname.c_str(), (int)wname.size(),
nullptr, 0, nullptr, nullptr);
std::string result(size, 0);
string result(size, 0);
WideCharToMultiByte(CP_UTF8, 0,
wname.c_str(), (int)wname.size(),
&result[0], size, nullptr, nullptr);
// 변환된 string 저장
m_iCanvasNamestring.push_back(std::move(result));
m_iCanvasNamestring.push_back(move(result));
}
// vector<const char*> 업데이트
@@ -64,7 +64,7 @@ void CIMGUIUI::CanvaswstringTostring(vector<wstring>& panelNames)
m_iCanvasCount = 999;
}
void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
void CIMGUIUI::PanelwstringTostring(vector<wstring>& panelNames)
{
m_iPanelNamestring.clear();
m_iPanelName.clear();
@@ -79,14 +79,14 @@ void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
wname.c_str(), (int)wname.size(),
nullptr, 0, nullptr, nullptr);
std::string result(size, 0);
string result(size, 0);
WideCharToMultiByte(CP_UTF8, 0,
wname.c_str(), (int)wname.size(),
&result[0], size, nullptr, nullptr);
// 변환된 string 저장
m_iPanelNamestring.push_back(std::move(result));
m_iPanelNamestring.push_back(move(result));
}
// vector<const char*> 업데이트
@@ -111,14 +111,14 @@ void CIMGUIUI::ElementwstringTostring(vector<wstring>& panelNames)
wname.c_str(), (int)wname.size(),
nullptr, 0, nullptr, nullptr);
std::string result(size, 0);
string result(size, 0);
WideCharToMultiByte(CP_UTF8, 0,
wname.c_str(), (int)wname.size(),
&result[0], size, nullptr, nullptr);
// 변환된 string 저장
m_pElementNamestring.push_back(std::move(result));
m_pElementNamestring.push_back(move(result));
}
// vector<const char*> 업데이트
-328
View File
@@ -2396,334 +2396,6 @@ future<pair<_wstring, CModel*>*> CLoader::Deferred_ModelLoad(MODEL eType, const
return m_pGameInstance->EnqueueJob(&Deferred_ModelLoad_Main, m_pDevice, m_pContext, eType, pDirectoryPath, pPrototypeTag, PreTransform);
}
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;
}
m_strMessage = TEXT("Model Loading..");
// Heavy Wall
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
{
Desc.eType = ACTOR::BOX;
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
Desc.fContactOffset = { 0.05f };
Desc.vhalfGeometryInfo = { 2.5f, 4.5f, 3.5f };
Desc.fDensity = 10.f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
Desc.vAutoDamping = { 100.f, 100.f };
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
vector<future<pair<_wstring, CModel*>*>> futures = {};
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Anim_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_SmallSword.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
#pragma region MONSTER
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Goblin_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
TEXT("Prototype_Component_GoblinMage_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model")
));
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
// CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
// return E_FAIL;
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_TombProtector_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_troll_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Dragon_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
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/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Ghost_Peeves_Model")
));
#pragma endregion
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Troll_Weapon/Troll_Weapon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Weapon_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock.bin",XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Rock_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Rock_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/Goblin_Dagger.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f)* XMMatrixIdentity(),
TEXT("Prototype_Component_Dagger_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f))* XMMatrixIdentity(),
TEXT("Prototype_Component_Npc_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin",XMMatrixIdentity(),
TEXT("Prototype_Component_Wand_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Broom_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_SkyboxModel")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity(),
TEXT("Desc_Box")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_GerboldOlivander_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VictorRookWood_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin",XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Playable_Model")
));
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
for (auto& job : futures) {
pair<_wstring, CModel*>* pResult = job.get();
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) {
assert(false);
return E_FAIL;
}
Safe_Delete(pResult);
}
m_strMessage = TEXT("Shader Loading..");
m_strMessage = TEXT("Prototype Loading..");
///* For.Prototype_Component_VIBuffer_Terrain */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
// CVIBuffer_Terrain::Create(m_pDevice, m_pContext, nullptr, 100, 100))))
// return E_FAIL;
/* For.Prototype_GameObject_RootModelPart */
if (FAILED(m_pGameInstance->Add_Prototype<CRootModelPart>(g_iStaticLevel, CRootModelPart::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Body */
if (FAILED(m_pGameInstance->Add_Prototype<CBody>(g_iStaticLevel, CBody::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Head */
if (FAILED(m_pGameInstance->Add_Prototype<CHead>(g_iStaticLevel, CHead::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Hair */
if (FAILED(m_pGameInstance->Add_Prototype<CHair>(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_DummyObject */
if (FAILED(m_pGameInstance->Add_Prototype<CDummyObject>(g_iStaticLevel, CDummyObject::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_DummySkyBox */
if (FAILED(m_pGameInstance->Add_Prototype<CDummySkyBox>(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
return E_FAIL;
///* For.Prototype_GameObject_Terrain */
//if (FAILED(m_pGameInstance->Add_Prototype<CTerrain>(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
// return E_FAIL;
/* For.Prototype_Component_FSM */
if (FAILED(m_pGameInstance->Add_Prototype<CFSM>(g_iStaticLevel, CFSM::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Player */
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Goblin */
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin>(g_iStaticLevel, CGoblin::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Broom */
if (FAILED(m_pGameInstance->Add_Prototype<CBroom>(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Camera_Gaze */
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Gaze>(g_iStaticLevel, CCamera_Gaze::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Player */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Socket>(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Shoulder */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Shoulder>(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Target */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Target>(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Arm */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Arm>(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Prototype<CTrail>(g_iStaticLevel, CTrail::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CTrailObject>(g_iStaticLevel, CTrailObject::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CBombard>(g_iStaticLevel, CBombard::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CEffectPool>(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext))))
return E_FAIL;
m_strMessage = TEXT("Loading Success!");
m_isFinished = true;
return S_OK;
}
HRESULT CLoader::Loading_For_MapViewer()
{
#pragma region PLAYER_AND_RANROK
@@ -0,0 +1,358 @@
#include "pch.h"
#include "GameInstance.h"
#include "Loader.h"
#pragma region EFFECT_HEADER
#include "TrailObject.h"
#include "Bombard.h"
#include "EffectPool.h"
#pragma endregion
#pragma region OBJECT_HEADER
#include "RootModelPart.h"
#include "Head.h"
#include "Body.h"
#include "Hair.h"
#include "DummySkyBox.h"
#include "DummyObject.h"
#include "Player.h"
#include "Goblin.h"
#include "Broom.h"
#include "Camera_Gaze.h"
#include "CamPosition_Socket.h"
#include "CamPosition_Target.h"
#include "CamPosition_Shoulder.h"
#include "CamPosition_Arm.h"
#include "Wand.h"
#pragma endregion
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;
}
m_strMessage = TEXT("Model Loading..");
// Heavy Wall
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
{
Desc.eType = ACTOR::BOX;
Desc.ePxRigidBodyFlags = { /*PSX::PxRigidBodyFlag::eKINEMATIC*/ };
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
Desc.vMatInfo = { 0.5f, 0.5f, 0.6f };
Desc.fContactOffset = { 0.05f };
Desc.vhalfGeometryInfo = { 2.5f, 4.5f, 3.5f };
Desc.fDensity = 10.f;
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
Desc.eLockFlag = {};
Desc.vAutoDamping = { 100.f, 100.f };
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
Desc.vLocalTranslation = { 0.f, 0.f, 0.f };
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_HEAVY_WALL"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_BOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_CCT_CAPSULE"), CCharacter_Controller::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
vector<future<pair<_wstring, CModel*>*>> futures = {};
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Anim_Model"),
// CModel::Create(m_pDevice, m_pContext, MODEL::ANIM_LOCAL, "C:/MeshTable\\Game\\RiggedObjects\\Props\\Weapons\\Goblins\\SK_WPN_GOB_SmallSword.fbx", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
// return E_FAIL;
#pragma region MONSTER
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin/Goblin.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Goblin_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Goblin_Mage/GoblinMage.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_GoblinMage_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/Goblin_Assassin/SK_GOB_M_Assassin_Master.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_SK_GOB_M_Assassin_Master_Model")
));
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_GoblinSpector_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Monster/GoblinSpector/GoblinSpector.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_Playable_Model"),
// CModel::Create(m_pDevice, m_pContext, MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
// return E_FAIL;
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/TombProtector/TombProtector.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_TombProtector_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/SubTroll/troll.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_troll_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Monster/Dragon/Dragon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Dragon_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Monster/ConjuredDragon/ConjuredDragon.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
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/Ghost_Peeves/Ghost_Peeves.bin", XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Ghost_Peeves_Model")
));
#pragma endregion
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Troll_Weapon/Troll_Weapon.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Weapon_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Rock_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Troll_Rock/Troll_Rock_Big.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Troll_Rock_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Object/Goblin_Dagger/Goblin_Dagger.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixIdentity(),
TEXT("Prototype_Component_Dagger_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Human/Npc/Npc.bin", XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Npc_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::ANIM, "../Bin/Resources/Models/Object/Wand/Wand.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_Wand_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Object/Broom/Broom.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationY(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Broom_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_SkyboxModel")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::NONANIM, "../Bin/Resources/Models/Box/Box.bin", XMMatrixIdentity(),
TEXT("Desc_Box")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/GerboldOllivander/GerboldOlivander.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_GerboldOlivander_Model")
));
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/Npc/VictorRookWood/VictorRookWood.bin", XMMatrixIdentity(),
TEXT("Prototype_Component_VictorRookWood_Model")
));
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::STATIC), TEXT("Prototype_Component_CCL_CameraRig.001_Model"),
CModel::Create(m_pDevice, m_pContext, MODEL::ANIM, "../Bin/Resources/Models/Object/Camera/CCL_CameraRig.001.bin", XMMatrixScaling(0.0001f, 0.0001f, 0.0001f) * XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity()))))
return E_FAIL;
futures.emplace_back(Deferred_ModelLoad(
MODEL::PBR_ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable.bin", XMMatrixRotationZ(XMConvertToRadians(180.f)) * XMMatrixIdentity(),
TEXT("Prototype_Component_Playable_Model")
));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Rct.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Sneak.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Bm.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Broom.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Lightning.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Protego.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Spell_Learning.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_Spawn.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
//futures.emplace_back(Deferred_ModelLoad(
// MODEL::ANIM, "../Bin/Resources/Models/Human/PlayableCharacter/Playable_AvadaKedavra.fbx", XMMatrixIdentity(),
// TEXT("Prototype_Component_Student_Cmbt_Model")
//));
for (auto& job : futures) {
pair<_wstring, CModel*>* pResult = job.get();
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, pResult->first, pResult->second))) {
assert(false);
return E_FAIL;
}
Safe_Delete(pResult);
}
m_strMessage = TEXT("Shader Loading..");
m_strMessage = TEXT("Prototype Loading..");
///* For.Prototype_Component_VIBuffer_Terrain */
//if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"),
// CVIBuffer_Terrain::Create(m_pDevice, m_pContext, nullptr, 100, 100))))
// return E_FAIL;
/* For.Prototype_GameObject_RootModelPart */
if (FAILED(m_pGameInstance->Add_Prototype<CRootModelPart>(g_iStaticLevel, CRootModelPart::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Body */
if (FAILED(m_pGameInstance->Add_Prototype<CBody>(g_iStaticLevel, CBody::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Head */
if (FAILED(m_pGameInstance->Add_Prototype<CHead>(g_iStaticLevel, CHead::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Hair */
if (FAILED(m_pGameInstance->Add_Prototype<CHair>(g_iStaticLevel, CHair::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_DummyObject */
if (FAILED(m_pGameInstance->Add_Prototype<CDummyObject>(g_iStaticLevel, CDummyObject::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_DummySkyBox */
if (FAILED(m_pGameInstance->Add_Prototype<CDummySkyBox>(g_iStaticLevel, CDummySkyBox::Create(m_pDevice, m_pContext))))
return E_FAIL;
///* For.Prototype_GameObject_Terrain */
//if (FAILED(m_pGameInstance->Add_Prototype<CTerrain>(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
// return E_FAIL;
/* For.Prototype_Component_FSM */
if (FAILED(m_pGameInstance->Add_Prototype<CFSM>(g_iStaticLevel, CFSM::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Player */
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Goblin */
if (FAILED(m_pGameInstance->Add_Prototype<CGoblin>(g_iStaticLevel, CGoblin::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Broom */
if (FAILED(m_pGameInstance->Add_Prototype<CBroom>(g_iStaticLevel, CBroom::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Camera_Gaze */
if (FAILED(m_pGameInstance->Add_Prototype<CCamera_Gaze>(g_iStaticLevel, CCamera_Gaze::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Player */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Socket>(g_iStaticLevel, CCamPosition_Socket::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Shoulder */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Shoulder>(g_iStaticLevel, CCamPosition_Shoulder::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Target */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Target>(g_iStaticLevel, CCamPosition_Target::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_CamPosition_Arm */
if (FAILED(m_pGameInstance->Add_Prototype<CCamPosition_Arm>(g_iStaticLevel, CCamPosition_Arm::Create(m_pDevice, m_pContext))))
return E_FAIL;
/* For.Prototype_GameObject_Wand */
if (FAILED(m_pGameInstance->Add_Prototype<CWand>(g_iStaticLevel, CWand::Create(m_pDevice, m_pContext))))
return E_FAIL;
if (FAILED(m_pGameInstance->Add_Prototype<CTrail>(g_iStaticLevel, CTrail::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CTrailObject>(g_iStaticLevel, CTrailObject::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CBombard>(g_iStaticLevel, CBombard::Create(m_pDevice, m_pContext)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_Prototype<CEffectPool>(g_iStaticLevel, CEffectPool::Create(m_pDevice, m_pContext))))
return E_FAIL;
m_strMessage = TEXT("Loading Success!");
m_isFinished = true;
return S_OK;
}
+4 -4
View File
@@ -66,16 +66,16 @@ HRESULT CMonster::Render_OutLine()
GUI::SetNextItemWidth(80.f);
static _float3 vOutLineColor = _float3(1.f, 0.960784376f, 0.933333397f);
static _float fOutLineThickness = { 5.f }; // 카메라로부터 거리가 멀어지면 늘어나게끔 바꾸는걸 추천함
static _float fOutLineScale = { 1.f };
static _float fOutLinePower = { 1.f };
GUI::ColorPicker3("vOutLineColor", (_float*)&vOutLineColor);
GUI::SliderFloat("Thickness", &fOutLineThickness, 0.1f, 2.f, "%.1f");
GUI::SliderFloat("Scale", &fOutLineScale, 0.1f, 2.f, "%.1f");
GUI::SliderFloat("Power", &fOutLinePower, 0.1f, 2.f, "%.1f");
Compute_Depth();
_float fRatio = (m_fCamDepth / *m_pGameInstance->Get_CurrentCameraFar());
fOutLineThickness = CMyTools::Lerp_f1D(2.f, 6.f, fRatio);
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
_float fOutLineThickness = CMyTools::Lerp_f1D(1.5f, 2.f, fRatio);
if (FAILED(m_pShaderCom->Bind_RawValue("g_vOutLineColor", &vOutLineColor, sizeof(_float3)))) {
return E_FAIL;
}
@@ -44,6 +44,7 @@ float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vSha
float GetRimLight(float3 vCamPosition, float3 vPosition, float3 vNormal, float fRimPower, float fRimStrength)
{
float fRimLight = (1 - dot(normalize(vCamPosition - vPosition), vNormal));
fRimLight = max(fRimLight, 1e-6f);
fRimLight = pow(fRimLight, fRimPower);
fRimLight = fRimLight * fRimStrength;
return fRimLight;
@@ -70,24 +71,55 @@ float2 Get_MovedUV(float2 vOriginalUV, float fDeltaU, float fDeltaV, uint iIndex
return vOriginalUV * vDelta + vOffset;
}
float2 UV_Cutting(float2 vUV, float2 vUVCutting, int iCurrentFrame)
float2 UV_Cutting(float2 originalUV, float2 uvCuttingCountFloat, int currentFrameIndex)
{
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;
// (1) 칸 개수는 정수로 취급 (0 방지)
int uvCuttingCountX = max((int) uvCuttingCountFloat.x, 1);
int uvCuttingCountY = max((int) uvCuttingCountFloat.y, 1);
int totalFrameCount = uvCuttingCountX * uvCuttingCountY;
// (2) currentFrameIndex를 [0, totalFrameCount)로 래핑 (정수 % 제거)
int wrappedFrameIndex = currentFrameIndex;
if (totalFrameCount > 0)
{
float inverseTotalFrameCount = 1.0f / (float) totalFrameCount;
// loopCount = floor(currentFrameIndex / totalFrameCount)
int loopCount = (int) floor((float) currentFrameIndex * inverseTotalFrameCount);
wrappedFrameIndex = currentFrameIndex - loopCount * totalFrameCount;
// 음수 프레임까지 방어(선택)
if (wrappedFrameIndex < 0)
{
wrappedFrameIndex += totalFrameCount;
}
}
else
{
wrappedFrameIndex = 0;
}
// (3) 가로 기준으로 행/열 구하기 (정수 /, % 제거)
float inverseCuttingCountX = 1.0f / (float) uvCuttingCountX;
float inverseCuttingCountY = 1.0f / (float) uvCuttingCountY;
// frameIndexY = floor(wrappedFrameIndex / uvCuttingCountX)
int frameIndexY = (int) floor((float) wrappedFrameIndex * inverseCuttingCountX);
// frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX (% 대체)
int frameIndexX = wrappedFrameIndex - frameIndexY * uvCuttingCountX;
// (4) UV 변환
float2 resultUV = originalUV;
resultUV.x = resultUV.x * inverseCuttingCountX + (float) frameIndexX * inverseCuttingCountX;
resultUV.y = resultUV.y * inverseCuttingCountY + (float) frameIndexY * inverseCuttingCountY;
return resultUV;
}
// (Kd F(Lambert)) + (Ks F(cook-torrance))
//float LambertDiffuse(float c)
@@ -153,7 +185,7 @@ PBR_LIGHT_OUT PBR_Lighting(
float3 vAlbedo, float fMetallic, float fRoughness,
float3 vLightColor, float fLightIntensity, float fAttenuation, float3 vFO
) {
PBR_LIGHT_OUT Out;
PBR_LIGHT_OUT Out = (PBR_LIGHT_OUT)0;
Out.vShade = 0;
Out.vSpecular = 0;
float3 vLighting = vLightColor * fLightIntensity;
@@ -163,8 +195,8 @@ PBR_LIGHT_OUT PBR_Lighting(
float NdotV = saturate(dot(vNormal, vToView));
if (NdotL <= 0 || NdotV <= 0)
{
Out.vShade = 0;
Out.vSpecular = 0;
Out.vShade = float3(0.f, 0.f, 0.f);
Out.vSpecular = float3(0.f, 0.f, 0.f);
return Out;
}
@@ -475,12 +507,12 @@ float4 ApplyDissolve(Texture2D DisolveTexture, float fDisolveRatio, float fDisol
bool IsValidUV(float2 uv)
{
if (uv.x < 0 || uv.x >= 1
|| uv.y < 0 || uv.y >= 1)
bool bReturn = true;
if (uv.x < 0 || uv.x >= 1 || uv.y < 0 || uv.y >= 1)
{
return false;
bReturn = false;
}
return true;
return bReturn;
}
float4 BilinearFetches(float2 vGlobalTexelSize, Texture2D SrcTexture2D, float2 vCenterTexCoord, sampler samplerLinear)
@@ -535,9 +567,10 @@ float4 BlendDiffuse(float4 vDiffuseA, Texture2D DiffuseBlendTexture, float2 vTex
}
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIntensity = 1.f)
{
float2 vReturnVelocity = float2(0.5f, 0.5f);
if (vCurrentProjPos.w <= FLT_EPSILON5 || vPreviousProjPos.w <= FLT_EPSILON5)
{
return float2(0.5f, 0.5f);
return vReturnVelocity;
}
float2 currentNDC = vCurrentProjPos.xy / vCurrentProjPos.w;
@@ -553,6 +586,10 @@ float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos, float fIn
return velocityUV * 0.5f + 0.5f; // 0 속도 -> 0.5
}
float2 CalcVelocityUV(float4 vCurrentProjPos, float4 vPreviousProjPos)
{
return CalcVelocityUV(vCurrentProjPos, vPreviousProjPos, 1.0f);
}
float3 DownSampleFast(Texture2D SrcTexture2D, float2 vCenterTexcoord, float2 vSrcTexelSize, float2 vResolution)
{
@@ -51,7 +51,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -17,7 +17,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -40,7 +40,7 @@ struct PS_OUT
};
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
Out.vColor = g_vColor;
@@ -166,7 +166,7 @@ struct PS_OUT_VELOCITYTILE
};
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -180,7 +180,7 @@ VS_OUT VS_MAIN(VS_IN In)
}
VS_OUT VS_CAPTURE(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
float2 vClipPos = In.vPosition.xy * 2.0f; // → -1.0 ~ +1.0
@@ -191,7 +191,7 @@ VS_OUT VS_CAPTURE(VS_IN In)
}
VS_OUT VS_TONE_MAPPING(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -295,7 +295,7 @@ PS_OUT_VELOCITYBLUR PS_MOTIONBLUR(PS_IN In)
vReferenceVelocityPixel = vBlurVeloPixel;
}
float fCenterSpreadLengthPixel = clamp(abs(dot(vReferenceVelocityPixel, vBlurDirPixel)), 0.f, g_fMBBlurRadius);
[loop]
for (int iInterval = -iMaxRadius; iInterval <= iMaxRadius; ++iInterval) {
float fOffset = (float) abs(iInterval);
@@ -412,7 +412,7 @@ PS_OUT_VELOCITYTILE PS_MOTIONBLUR_TENTSAMPLE(PS_IN In)
{
vSampleUV.x = uv.x + vSrcTexelSize.x * i;
vSampleUV.y = uv.y + vSrcTexelSize.y * j;
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV);
vSampleVel = g_VelocityTexture.Sample(ClampSampler, vSampleUV).xy;
vSampleDiff = vSampleVel *2.f - 1.f;
fSampleSpeed = length(vSampleDiff * g_vResolution * g_iMBTileSize);
if (fSampleSpeed > vMaxSpeed) {
@@ -685,6 +685,15 @@ PS_OUT_BACKBUFFER PS_MAIN_DEBUG(PS_IN In)
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
return Out;
};
PS_OUT_BACKBUFFER PS_MAIN_PRINT(PS_IN In)
{
PS_OUT_BACKBUFFER Out;
Out.vBackBuffer = g_Texture.Sample(DefaultSampler, In.vTexcoord);
Out.vEnvironment = float4(0.f, 0.f, 0.f, 0.f);
return Out;
};
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
@@ -795,7 +804,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_UPSAMPLE(PS_IN In)
for (int iCol = -1; iCol < 2; ++iCol) {
uv = In.vTexcoord + vTexcelSize * float2(iRow, iCol);
if (true == IsValidUV(uv)) {
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0);
vColor += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol] * g_DiffuseTexture.SampleLevel(BorderZeroLinearSampler, uv, 0).xyz;
fWeight += g_fWeight_3x3_UPSAMPLE[1 + iRow][1 + iCol];
}
}
@@ -811,6 +820,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_X(PS_IN In)
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
float fWeight = 0.f;
float2 uv = float2(0.f, 0.f);
[loop]
for (int i = -15; i < 16; ++i)
{
uv.x = In.vTexcoord.x + ((float) i / g_vResolution.x);
@@ -838,6 +849,8 @@ PS_OUT_FLT4_SINGLE PS_MAIN_BLOOM_BLUR_COMBINE(PS_IN In)
float4 vSample = float4(0.f, 0.f, 0.f, 1.f);
float fWeight = 0.f;
float2 uv = float2(0.f, 0.f);
[loop]
for (int i = -15; i < 16; ++i)
{
uv.x = In.vTexcoord.x;
@@ -867,7 +880,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_EMBOSS(PS_IN In)
float2 uv = In.vTexcoord;
float fSrcAlpha = g_DiffuseTexture.Sample(PointSampler, uv).a;
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
float3 vColor = (0.f, 0.f, 0.f);
float3 vColor = float3(0.f, 0.f, 0.f);
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
@@ -888,7 +901,7 @@ PS_OUT_FLT4_SINGLE PS_MAIN_DOWNSAMPLE(PS_IN In)
float2 uv = In.vTexcoord;
float fSrcAlpha = g_DiffuseTexture.SampleLevel(BorderZeroSampler, uv, 0).a;
float2 vSrcTexelSize = float2(1.f / g_vSrcResolution.x, 1.f / g_vSrcResolution.y);
float3 vColor = (0.f, 0.f, 0.f);
float3 vColor = float3(0.f, 0.f, 0.f);
vColor = DownSampleFast(g_DiffuseTexture, In.vTexcoord, vSrcTexelSize, g_vSrcResolution);
@@ -978,6 +991,7 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X_ENV(PS_IN In)
}
float fAcc = 0.f;
[loop]
for (int i = -16; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x + ((float) i / g_vResolution.x) * fBlurAmount * g_fDOFBlurMultiplier;
@@ -1069,6 +1083,7 @@ PS_OUT_BACKBUFFER PS_MAIN_POSTCOMBINED(PS_IN In)
}
float fAcc = 0.f;
[loop]
for (int i = -16; i < 16; ++i)
{
vTexcoord.x = In.vTexcoord.x;
@@ -1256,6 +1271,7 @@ PS_OUT_SSAO_AMBIENT_OCCLUSION PS_SSAO_AMBIENT_OCCLUSION(PS_IN In)
float3x3 toViewTBNMatrix = float3x3(vTangent, vBiNormal, vCenterViewNormal);
float fOcclusion = 0.f;
[loop]
for (uint i = 0; i < g_iKernelSize; ++i)
{
float3 vViewSamplePosVec = mul(g_SamplePos[i].xyz, toViewTBNMatrix); // TANSPACE -> VIEW
@@ -1522,4 +1538,13 @@ technique11 DefaultTechnique
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MOTIONBLUR_TENTSAMPLE();
}
pass PrintToBackBufferPass // 22
{
SetRasterizerState(RS_Default);
SetDepthStencilState(DSS_None, 0);
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
VertexShader = compile vs_5_0 VS_MAIN();
GeometryShader = NULL;
PixelShader = compile ps_5_0 PS_MAIN_PRINT();
}
}
@@ -20,7 +20,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -46,7 +46,7 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
/* 디스토션 렌더타겟 텍스쳐 샘플링 */
@@ -20,7 +20,7 @@ struct VS_OUT
VS_OUT VS_MAIN(VS_IN In)
{
VS_OUT Out;
VS_OUT Out = (VS_OUT)0;
matrix matWV, matWVP;
@@ -46,12 +46,12 @@ struct PS_OUT
PS_OUT PS_MAIN(PS_IN In)
{
PS_OUT Out;
PS_OUT Out = (PS_OUT)0;
vector vMixedDiffuse = g_MixedDiffuseTexture.Sample(PointSampler, In.vTexcoord);
float fRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord);
float fRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord).r;
Out.vBackBuffer = vector(vMixedDiffuse.rgb / fRevealage , fRevealage);
@@ -647,8 +647,14 @@ call Update_Lib.bat
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Volumetric_Accumulate.hlsl" />
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Volumetric_Compute.hlsl" />
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Volumetric_Accumulate.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_Volumetric_Compute.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
</FxCompile>
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_WeightBlend.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
@@ -51,12 +51,19 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
}
}
}
#ifdef _DEBUG
#ifdef 기무리
m_pThreadHolder = CThreadHolder::Create(12);
#endif // 기무리
#ifndef 기무리
m_pThreadHolder = CThreadHolder::Create(6);
#endif // !기무리
#endif // _DEBUG
#ifndef _DEBUG
m_pThreadHolder = CThreadHolder::Create(12);
#endif // !_DEBUG
if (nullptr == m_pThreadHolder) {
+67 -16
View File
@@ -1,9 +1,8 @@
#include "pch.h"
#include "Bone.h"
#include "Mesh.h"
#include "Model.h"
#include "Bone.h"
#include "Shader.h"
#include "ComputeShader.h"
CMesh::CMesh(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CVIBuffer{ pDevice, pContext }
{
@@ -55,6 +54,16 @@ HRESULT CMesh::Render_Indexed(_uint IndexCount, _uint StartIndexLocation, _uint
m_pContext->DrawIndexed(IndexCount, StartIndexLocation, BaseVertexLocation);
return S_OK;
}
HRESULT CMesh::Copy_BoneMatrices(vector<_float4x4>& pDestination)
{
if (pDestination.size() != m_iNumBones) {
return E_FAIL;
}
memcpy_s(pDestination.data(), sizeof(_float4x4) * m_iNumBones, m_pBoneMatrices, sizeof(_float4x4) * m_iNumBones);
return S_OK;
}
#ifdef EDITOR_PROJECT
HRESULT CMesh::Initialize_Prototype(MODEL eType, vector<class CBone*>& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix)
{
@@ -591,6 +600,11 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const ai
m_pBoneMatrices = new _float4x4[0 == m_iNumBones ? 1 : m_iNumBones];
ZeroMemory(m_pBoneMatrices, sizeof(_float4x4) * m_iNumBones);
_float fMinimumEffectiveWeight = 0.0001f;
vector<vector<SaveBoneWeight>> influencesPerVertex;
influencesPerVertex.resize(m_iNumVertices);
_float4x4 OffSetMatrix;
XMStoreFloat4x4(&OffSetMatrix, XMMatrixIdentity());
@@ -612,22 +626,59 @@ HRESULT CMesh::Ready_VertexBuffer_For_Anim(vector<class CBone*>& Bones, const ai
for (_uint j = 0; j < iNumWeight; ++j) {
aiVertexWeight AIWeight = pAIBone->mWeights[j];
if (0.f == pVertices[AIWeight.mVertexId].vBlendWeight.x) {
pVertices[AIWeight.mVertexId].vBlendIndex.x = i;
pVertices[AIWeight.mVertexId].vBlendWeight.x = AIWeight.mWeight;
const aiVertexWeight& aiWeight = pAIBone->mWeights[j];
if (aiWeight.mVertexId >= m_iNumVertices) {
continue;
}
else if (0.f == pVertices[AIWeight.mVertexId].vBlendWeight.y) {
pVertices[AIWeight.mVertexId].vBlendIndex.y = i;
pVertices[AIWeight.mVertexId].vBlendWeight.y = AIWeight.mWeight;
}
else if (0.f == pVertices[AIWeight.mVertexId].vBlendWeight.z) {
pVertices[AIWeight.mVertexId].vBlendIndex.z = i;
pVertices[AIWeight.mVertexId].vBlendWeight.z = AIWeight.mWeight;
}
else {
pVertices[AIWeight.mVertexId].vBlendIndex.w = i;
pVertices[AIWeight.mVertexId].vBlendWeight.w = AIWeight.mWeight;
if (aiWeight.mWeight < fMinimumEffectiveWeight) {
continue;
}
influencesPerVertex[aiWeight.mVertexId].push_back(
SaveBoneWeight{ i, aiWeight.mWeight }
);
}
}
for (_uint iVertexIndex = 0; iVertexIndex < m_iNumVertices; ++iVertexIndex)
{
vector<SaveBoneWeight>& influences = influencesPerVertex[iVertexIndex];
if (influences.empty()) {
continue;
}
sort( influences.begin(), influences.end(), []
(const SaveBoneWeight& left, const SaveBoneWeight& right) {
return left.Weight > right.Weight;
});
// 상위 4개만 선택
_uint selectedCount = min<_uint>(4, static_cast<_uint>(influences.size()));
pVertices[iVertexIndex].vBlendIndex = XMUINT4(0, 0, 0, 0);
pVertices[iVertexIndex].vBlendWeight = _float4(0.f, 0.f, 0.f, 0.f);
float totalWeight = 0.f;
for (_uint iSelectedIndex = 0; iSelectedIndex < selectedCount; ++iSelectedIndex)
{
SaveBoneWeight& influence = influences[iSelectedIndex];
if (iSelectedIndex == 0) { pVertices[iVertexIndex].vBlendIndex.x = influence.VertexId; pVertices[iVertexIndex].vBlendWeight.x = influence.Weight; }
if (iSelectedIndex == 1) { pVertices[iVertexIndex].vBlendIndex.y = influence.VertexId; pVertices[iVertexIndex].vBlendWeight.y = influence.Weight; }
if (iSelectedIndex == 2) { pVertices[iVertexIndex].vBlendIndex.z = influence.VertexId; pVertices[iVertexIndex].vBlendWeight.z = influence.Weight; }
if (iSelectedIndex == 3) { pVertices[iVertexIndex].vBlendIndex.w = influence.VertexId; pVertices[iVertexIndex].vBlendWeight.w = influence.Weight; }
totalWeight += influence.Weight;
}
if (totalWeight > 0.f)
{
pVertices[iVertexIndex].vBlendWeight.x /= totalWeight;
pVertices[iVertexIndex].vBlendWeight.y /= totalWeight;
pVertices[iVertexIndex].vBlendWeight.z /= totalWeight;
pVertices[iVertexIndex].vBlendWeight.w /= totalWeight;
}
}
if (0 == m_iNumBones) {
+32 -6
View File
@@ -1,12 +1,12 @@
#include "pch.h"
#include "Model.h"
#include "Bone.h"
#include "Mesh.h"
#include "Material.h"
#include "Animation.h"
#include "GameObject.h"
#include "Transform.h"
#include "Bone.h"
#include "ComputeShader.h"
#include "GameObject.h"
#include "Material.h"
#include "Mesh.h"
#include "Model.h"
#include "Transform.h"
CModel::CModel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
: CComponent{ pDevice, pContext }
@@ -119,6 +119,22 @@ HRESULT CModel::Bind_BoneMatrices(_uint iMeshIndex, CShader* pShader, const _cha
return m_Meshes[iMeshIndex]->Bind_BoneMatrices(m_Bones, pShader, pConstantName);
}
HRESULT CModel::Capture_BoneMatrices(_uint iMeshIndex, vector<_float4x4>& pDestination)
{
if (iMeshIndex >= m_iNumMeshes) {
return E_FAIL;
}
return m_Meshes[iMeshIndex]->Copy_BoneMatrices(pDestination);
}
_int CModel::Get_MeshInfluencedBoneNum(_uint iMeshIndex)
{
if (iMeshIndex >= m_iNumMeshes) {
return E_FAIL;
}
return m_Meshes[iMeshIndex]->Get_NumBone();
}
_bool CModel::Play_Animation(_float fTimeDelta, CTransform* pTransform)
{
if (!m_bPlayAnim){
@@ -699,6 +715,16 @@ HRESULT CModel::Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix
return S_OK;
}
//HRESULT CModel::Set_BoneLocalTransformationMatrix(const _char* pBoneName, _fmatrix newTransformation)
//{
// _int iBoneIndex = Find_BoneIndex(pBoneName);
// if (iBoneIndex < 0) {
// return E_FAIL;
// }
// m_Bones[iBoneIndex]->Set_TransformationMatrix(newTransformation);
// return S_OK;
//}
void CModel::Set_CurrentTrackPosition(_float TrackPosition)
{
@@ -763,7 +763,7 @@ HRESULT CPhysX_Manager::Initialize(_uint iLevel)
sceneDesc.gravity = PSX::PxVec3(0.f, -GRAVITY, 0.f);
m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(2/*cpu 코어 갯수*/);
m_pDispatcher = PSX::PxDefaultCpuDispatcherCreate(4 /*cpu 코어 스레드 갯수에 따라 유동적으로 선택*/);
if (nullptr == m_pDispatcher) {
assert(false);
return E_FAIL;
+1 -1
View File
@@ -585,7 +585,7 @@ void CRenderer::Render_Fog()
return;
}
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::FOG));
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::PRINT_BACKBUFFER));
m_pVIBuffer->Bind_Resources();
m_pVIBuffer->Render();
@@ -345,6 +345,10 @@ HRESULT CRenderer::Initialize()
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_VelocityMapFinal"), (_uint)Viewport.Width, (_uint)Viewport.Height,
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_VelocityTile"), (_uint)(Viewport.Width / (_float)m_iMBTileSize), (_uint)(Viewport.Height / (_float)m_iMBTileSize),
DXGI_FORMAT_R32G32_FLOAT, _float4(0.5f, 0.5f, 0.f, 0.f)))) {
return E_FAIL;
@@ -509,6 +513,9 @@ HRESULT CRenderer::Initialize()
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_MotionBlur"), TEXT("Target_MotionBlur")))) {
return E_FAIL;
}
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_MotionBlur"), TEXT("Target_VelocityMapFinal")))) {
return E_FAIL;
}
/* MRT_Blur_Mesh */
@@ -14,8 +14,7 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath,
}
filesystem::path pathFile = pFilePath;
const _wstring wstrKeyOriginal = pathFile.filename().wstring();
{ // 브레이스 해제 금지
{ // 브레이스 해제 금지0
shared_lock<shared_mutex> sharedLock(m_smtxTexture);
auto iter = m_Resources[iLevel].find(wstrKeyOriginal);
@@ -28,22 +27,24 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath,
SAFE_ADDREF(iter->second);
return iter->second;
}
else {
#ifdef _DEBUG
else {
lock_guard<mutex> statisticsLock(m_mtxStatistics);
m_mapCacheMiss[wstrKeyOriginal]++;
#endif // _DEBUG
}
#endif // _DEBUG
// sharedLock 소멸
} // 브레이스 해제 금지
} // 브레이스 해제 금지0
#ifdef USE_LOWTEXTURE
Replacer_SrcFilePath(pathFile);
#endif // USE_LOWTEXTURE
ID3D11ShaderResourceView* pSRV = Load_SRV(pathFile);
if (pSRV == nullptr){
return nullptr;
}
{ // 브레이스 해제 금지
{ // 브레이스 해제 금지1
unique_lock<shared_mutex> uniqueLock(m_smtxTexture);
auto iter = m_Resources[iLevel].find(wstrKeyOriginal);
@@ -57,7 +58,7 @@ ID3D11ShaderResourceView* CResource_Manager::Add_Texture(const _char* pFilePath,
m_Resources[iLevel].emplace(wstrKeyOriginal, pSRV);
// sharedLock 소멸
} // 브레이스 해제 금지
} // 브레이스 해제 금지1
#ifdef _DEBUG
++m_iCount;
@@ -122,6 +123,35 @@ ID3D11ShaderResourceView* CResource_Manager::Load_SRV(const filesystem::path& pa
return pSRV;
}
HRESULT CResource_Manager::Replacer_SrcFilePath(filesystem::path& pathFile)
{
if (true == pathFile.is_absolute()) {
const std::filesystem::path inputRootPath = pathFile.root_path();
const std::filesystem::path inputRelativePath = pathFile.relative_path();
auto relativePathIterator = inputRelativePath.begin();
if (relativePathIterator == inputRelativePath.end()){
return E_FAIL;
}
else if ("MeshTable" != (*relativePathIterator).string()) {
return E_FAIL;
}
++relativePathIterator;
std::filesystem::path outputPath = inputRootPath / "MeshTableTexture";
for (; relativePathIterator != inputRelativePath.end(); ++relativePathIterator)
{
outputPath /= *relativePathIterator;
}
pathFile = outputPath;
}
else {
return E_FAIL;
}
return S_OK;
}
CResource_Manager* CResource_Manager::Create(ID3D11Device* pDevice, _uint iResourceCount, _uint iNumLevel)
{
CResource_Manager* pInstance = new CResource_Manager(pDevice);
+1 -1
View File
@@ -48,7 +48,7 @@ enum class SHADER_PASS_CELL { DEBUG, END };
enum class SHADER_PASS_DEFERRED { DEBUG, DIRECTIONAL, POINT, COMBINED, BLUR, SPOT,
UPSAMPLE, BLOOM_BLURX, BLOOM_BLURY, EMBOSSING, BLOOM_ACCUM, BLOOM_FINISH, BLURX_ENVIRONMENT,
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR, MOTIONBLUR, DOWNSAMPLE, MOTIONBLURTILE, MOTIONBLURTENT,
POSTCOMBINED, FOG, TONE_MAPPING, SSAO_OCCLUSION, SSAO_BLUR, MOTIONBLUR, DOWNSAMPLE, MOTIONBLURTILE, MOTIONBLURTENT, PRINT_BACKBUFFER,
END };
enum class SHADER_PASS_BLUR { BLUR_X , BLUR_Y , COMBINED, END};
+14 -1
View File
@@ -21,34 +21,47 @@
#define ASSERT_JINHO(expression)
#define ASSERT_HYUNBIN(expression)
#define ASSERT_INHYUK(expression)
#define OPTIONAL_TRUE_KEYINPUTGUICHECK
#define OPTIONAL_TRUE_KEYINPUTGUICHECK
#define USE_LOWTEXTURE
#ifndef _DEBUG
#undef USE_LOWTEXTURE
#endif // !_DEBUG
#ifdef _DEBUG
#ifdef 기무리
#undef ASSERT_NURI
#define ASSERT_NURI(expression) assert(expression)
#define MSG_BOX(_message) MessageBox(NULL, TEXT(_message), L"System Message", MB_OK); assert(false);
//#undef USE_LOWTEXTURE
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK true||
#elif 진우
#undef ASSERT_JINWOO
#define ASSERT_JINWOO(expression) assert(expression)
#undef USE_LOWTEXTURE
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK true||
#elif gimch
#undef ASSERT_JINHO
#define ASSERT_JINHO(expression) assert(expression)
#undef USE_LOWTEXTURE
#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
#define OPTIONAL_TRUE_KEYINPUTGUICHECK true||
#elif Bin
#undef ASSERT_HYUNBIN
#define ASSERT_HYUNBIN(expression) assert(expression)
#undef USE_LOWTEXTURE
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK ||true
#elif 인혁
#undef ASSERT_INHYUK
#define ASSERT_INHYUK(expression) assert(expression)
#undef USE_LOWTEXTURE
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true
#endif
#endif // _DEBUG
#pragma endregion
+1 -1
View File
@@ -92,7 +92,7 @@ class ENGINE_DLL CGameObject abstract
virtual HRESULT Initialize_Prototype();
virtual HRESULT Initialize(void* pArg);
void Compute_Depth();
virtual void Compute_Depth();
protected:
class CGameInstance* m_pGameInstance = { nullptr };
+1
View File
@@ -22,6 +22,7 @@ class ENGINE_DLL CMesh final : public CVIBuffer
HRESULT Bind_BoneMatrices(const vector<class CBone*>& Bones, class CShader* pShader, const _char* pConstantName);
HRESULT Bind_BoneMatrices(_float4x4* pCombinedMatrices, class CShader* pShader, const _char* pConstantName);
HRESULT Render_Indexed(_uint IndexCount, _uint StartIndexLocation, _uint BaseVertexLocation);
HRESULT Copy_BoneMatrices(vector<_float4x4>& pDestination);
#ifdef EDITOR_PROJECT
private:
virtual HRESULT Initialize_Prototype(MODEL eType, vector<class CBone*>& Bones, const aiMesh* pAIMesh, _fmatrix& PreTransformMatrix);
+18 -15
View File
@@ -95,6 +95,9 @@ class ENGINE_DLL CModel final : public CComponent
#pragma endregion
#pragma region Mesh
const _char* Get_MeshName(_uint iIndex);
HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName);
HRESULT Capture_BoneMatrices(_uint iMeshIndex, vector<_float4x4>& pDestination);
_int Get_MeshInfluencedBoneNum(_uint iMeshIndex);
_uint Get_NumMeshes() const { return m_iNumMeshes; }
void Update_RootBone(_float Amount = 1.f);
void Initialize_RootBone();
@@ -104,19 +107,19 @@ class ENGINE_DLL CModel final : public CComponent
void Mark_CPUChain(_int boneIdx);
#pragma endregion
#pragma region Bone
HRESULT Bind_BoneMatrices(_uint iMeshIndex, class CShader* pShader, const _char* pConstantName);
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName);
_matrix Get_BoneMatrix(const _char* pBoneName);
_matrix Get_BoneMatrix(const _char* pBoneName) const;
const _float4x4* Get_BoneLocalMatrixPtr(const _char* pBoneName);
_matrix Get_BoneLocalMatrix(const _char* pBoneName) const;
static _int Get_BoneIndex(const _char* pBoneName, vector<class CBone*> Bones); // 본의 벡터와 이름을 넘겨주면 인덱스를 넘겨줌 ( n 순회 )
_int Get_BoneIndex(const _char* pBoneName) const;
_matrix Get_BoneMatrix(_uint iBoneIndex);
void Combined_BoneMatrix();
void Combined_BoneMatrix(_int iStartBoneIndex, _uint iBoneCount);
_int Find_BoneIndex(const _char* pBoneName);
HRESULT Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation);
const _float4x4* Get_BoneMatrixPtr(const _char* pBoneName);
_matrix Get_BoneMatrix(const _char* pBoneName);
_matrix Get_BoneMatrix(const _char* pBoneName) const;
const _float4x4* Get_BoneLocalMatrixPtr(const _char* pBoneName);
_matrix Get_BoneLocalMatrix(const _char* pBoneName) const;
static _int Get_BoneIndex(const _char* pBoneName, vector<class CBone*> Bones); // 본의 벡터와 이름을 넘겨주면 인덱스를 넘겨줌 ( n 순회 )
_int Get_BoneIndex(const _char* pBoneName) const;
_matrix Get_BoneMatrix(_uint iBoneIndex);
void Combined_BoneMatrix();
void Combined_BoneMatrix(_int iStartBoneIndex, _uint iBoneCount);
_int Find_BoneIndex(const _char* pBoneName);
HRESULT Set_BoneCombinedTransformation(const _char* pBoneName, _fmatrix newTransformation);
// HRESULT Set_BoneLocalTransformationMatrix(const _char* pBoneName, _fmatrix newTransformation);
#pragma endregion
#pragma region Material
@@ -148,7 +151,7 @@ class ENGINE_DLL CModel final : public CComponent
HRESULT Ready_Bones(const aiNode* pAINode, _int iParentIndex);
// 바이너리
_bool SaveAssimpModel(const _char* filename);
_int SaveNodeRecursive(const aiNode* pAINode, std::vector<SaveNode>& outNodes, _int parentIndex);
_int SaveNodeRecursive(const aiNode* pAINode, vector<SaveNode>& outNodes, _int parentIndex);
//
#endif // EDITOR_PROJECT
@@ -304,7 +307,7 @@ class ENGINE_DLL CModel final : public CComponent
// 바이너리
HRESULT Ready_Meshes();
HRESULT Ready_Materials(const _char* pModelFilePath, _uint iLevel);
HRESULT Ready_Bones(const std::vector<SaveNode>& allNodes, _int currentIndex, _int parentIndex);
HRESULT Ready_Bones(const vector<SaveNode>& allNodes, _int currentIndex, _int parentIndex);
HRESULT Ready_Animations(const vector<CBone*>& Bones);
//
@@ -97,9 +97,8 @@ class CPhysX_Manager final : public CBase
PSX::PxScene* m_pScene = { nullptr }; // 피직스 시뮬레이션의 공간
PSX::PxControllerManager* m_pCCTManager = { nullptr }; // 피직스 캐릭터 컨트롤러를 전부 추적하고 매니징함
#ifdef _DEBUG
PSX::PxPvd* m_pPvd = { nullptr }; // 피직스 시뮬레이션 디버깅을 위한 도구
#endif // _DEBUG
PSX::PxPvd* m_pPvd = { nullptr }; // 피직스 시뮬레이션 디버깅을 위한 도구
PSX::PxCookingParams* m_pCookingParam = { nullptr };
PSX::PxPvdTransport* m_pTransport = { nullptr };
@@ -21,6 +21,7 @@ class CResource_Manager final : public CBase
private:
HRESULT Initialize(_uint iResourceCount, _uint iNumLevel);
ID3D11ShaderResourceView* Load_SRV(const filesystem::path& pathFile);
HRESULT Replacer_SrcFilePath(filesystem::path& pathFile);
private:
#ifdef _DEBUG