[add] PlayerBones
This commit is contained in:
@@ -166,6 +166,7 @@ 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\Player_ENUM.h" />
|
||||
<ClInclude Include="..\Public\State_Fall.h" />
|
||||
<ClInclude Include="..\Public\State_FireBall.h" />
|
||||
<ClInclude Include="..\Public\TransformationSide.h" />
|
||||
|
||||
@@ -722,6 +722,9 @@
|
||||
<ClInclude Include="..\Public\State_FireBall.h">
|
||||
<Filter>04.Mechanic\State\State_Combat\State_FireBall</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Player_ENUM.h">
|
||||
<Filter>02.GameObjects\Player</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Client.ico">
|
||||
|
||||
@@ -84,8 +84,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
m_isActiveEffectCreate = false;
|
||||
|
||||
@@ -266,9 +266,9 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
isReady_Background = false;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isReady_Background = false;
|
||||
|
||||
@@ -359,8 +359,8 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
isLoad_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_Background = false;
|
||||
isLoad_Hogwart = false;
|
||||
#endif //
|
||||
#ifdef 인혁
|
||||
isLoad_Background = false;
|
||||
@@ -1762,7 +1762,44 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CVIBuffer_UI_Instance::Create(m_pDevice, m_pContext, &Quest_Slot_Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
{
|
||||
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.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.0025f, 0.15f, 0.0025f };
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.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_JOINT_ROUTE"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::CAPSULE;
|
||||
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.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.06f, 0.25f, 0.f };
|
||||
Desc.fDensity = 1.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1.f, 1.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_Player_Leg"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // LIGHT PHYSX DYNAMIC
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
@@ -1802,7 +1839,6 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -227,10 +227,10 @@ HRESULT CMonster::Render_Disolve()
|
||||
if (FLT_EPSILON3 * 10 < m_fDisolveTime)
|
||||
{
|
||||
m_bDrawOutLine = false;
|
||||
_bool bDisolve = true;
|
||||
_int bDisolve = 1;
|
||||
_float fDisolveAmount = 0.1f;
|
||||
_float fDisolveEdgeWidth = 0.1f;
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_bool)))) {
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_bDisolve", &bDisolve, sizeof(_int)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fDisolveRatio", &m_fDisolveTime, sizeof(_float)))) {
|
||||
|
||||
@@ -111,6 +111,16 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
m_BasicEffect->SetProjection(m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ));
|
||||
|
||||
m_Batch = make_unique<PrimitiveBatch<VertexPositionColor>>(m_pContext);
|
||||
m_pBoneShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 10, false, false));
|
||||
D3D11_DEPTH_STENCIL_DESC depthStencilDesc = {};
|
||||
depthStencilDesc.DepthEnable = FALSE;
|
||||
depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO;
|
||||
depthStencilDesc.DepthFunc = D3D11_COMPARISON_ALWAYS;
|
||||
depthStencilDesc.StencilEnable = FALSE;
|
||||
|
||||
HRESULT result = m_pDevice->CreateDepthStencilState(&depthStencilDesc, &m_pDepthStencilStateNone);
|
||||
if (FAILED(result))
|
||||
return E_FAIL;
|
||||
#endif // _DEBUG
|
||||
|
||||
// UI 연동 추가
|
||||
@@ -159,6 +169,9 @@ __super::Update(fTimeDelta);
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
Update_LegsPosition();
|
||||
|
||||
if (m_pGameInstance->Mouse_Down(DIM_RBUTTON)){
|
||||
m_pInfoInstance->Mouse_Input(ENUM_CLASS(KEYINPUT::DIM_RBUTTON_DOWN));
|
||||
}
|
||||
@@ -284,9 +297,15 @@ HRESULT CPlayer::Render()
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
m_pRobeJointRoute[i]->Render();
|
||||
}
|
||||
m_pCharacter_Controller->Render();
|
||||
//m_pRigidBody->Render();
|
||||
m_pLeftLeg->Render();
|
||||
m_pRightLeg->Render();
|
||||
Render_CameraCoordinateSystem();
|
||||
Render_BonePhysX();
|
||||
#endif
|
||||
|
||||
return S_OK;
|
||||
@@ -418,6 +437,30 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
);
|
||||
m_Batch->End();
|
||||
}
|
||||
HRESULT CPlayer::Render_BonePhysX()
|
||||
{
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0xffffff, 1.f);
|
||||
_fmatrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_cmatrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
ID3D11DepthStencilState* pPrevDSS = nullptr;
|
||||
UINT iPrevStencilRef = 0;
|
||||
m_pContext->OMGetDepthStencilState(&pPrevDSS, &iPrevStencilRef);
|
||||
|
||||
for (_uint iBoneIndex = 0; iBoneIndex < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++iBoneIndex)
|
||||
{
|
||||
_matrix WorldMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr(PLAYER_JOINT_BONE_NAMES[iBoneIndex]));
|
||||
|
||||
m_pBoneShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true,
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
}
|
||||
m_pContext->OMSetDepthStencilState(pPrevDSS, iPrevStencilRef);
|
||||
if (pPrevDSS != nullptr){
|
||||
pPrevDSS->Release();
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
HRESULT CPlayer::Ready_Components()
|
||||
@@ -492,6 +535,29 @@ HRESULT CPlayer::Ready_Components()
|
||||
m_pGameInstance->Detach_Actor(*m_pRigidBody->Get_Actor(), NEXT_LEVEL);
|
||||
}
|
||||
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pLeftLeg, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_Leg"), (CComponent**)&m_pRightLeg, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // RobeSocket
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::JOINT_ROUTE);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_JOINT_ROUTE"), (CComponent**)&m_pRobeJointRoute[i], &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -700,6 +766,14 @@ void CPlayer::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
#ifdef _DEBUG
|
||||
SAFE_RELEASE(m_pDepthStencilStateNone);
|
||||
#endif // _DEBUG
|
||||
SAFE_RELEASE(m_pRightLeg);
|
||||
SAFE_RELEASE(m_pLeftLeg);
|
||||
for (_uint i = 0; i < ENUM_CLASS(PXOBJECT::JOINT_ROUTE); ++i) {
|
||||
SAFE_RELEASE(m_pRobeJointRoute[i]);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
|
||||
@@ -2661,6 +2661,20 @@ void CPlayer::Play_SpellHitAnim()
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CPlayer::Update_LegsPosition()
|
||||
{
|
||||
_matrix WorldMatrix = m_pTransformCom->Get_XMWorldMatrix();
|
||||
_matrix FootMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("LeftFoot")) * WorldMatrix;
|
||||
_matrix LegMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("LeftLeg")) * WorldMatrix;
|
||||
m_pLeftLeg->Set_CenterTransform(WorldMatrix, FootMatrix.r[3], LegMatrix.r[3]);
|
||||
|
||||
FootMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("RightFoot")) * WorldMatrix;
|
||||
LegMatrix = XMLoadFloat4x4(m_pModelCom->Get_BoneMatrixPtr("RightLeg")) * WorldMatrix;
|
||||
m_pRightLeg->Set_CenterTransform(WorldMatrix, FootMatrix.r[3], LegMatrix.r[3]);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPlayer::Add_FSM()
|
||||
{
|
||||
#pragma region Behavior_Movement_NotFocus
|
||||
|
||||
@@ -2,35 +2,18 @@
|
||||
|
||||
#include "Client_Define.h"
|
||||
#include "Unit.h"
|
||||
#include "Player_ENUM.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
class CPlayer final : public CUnit
|
||||
{
|
||||
enum class PLAYER_MESH_ORDER {
|
||||
HEAD_EYE_OCC,
|
||||
HEAD_FACE,
|
||||
HEAD_TEETH,
|
||||
HEAD_EYELASH,
|
||||
HEAD_EYES,
|
||||
BODY_ARMS,
|
||||
HAIR_MAIN,
|
||||
HAIR_MAIN_CLOTH,
|
||||
LOWER,
|
||||
SHOES,
|
||||
UPPER,
|
||||
HAIR_SUB,
|
||||
HAIR_SUB_CLOTH,
|
||||
ROBE_SKIRT,
|
||||
ROBE_FUR,
|
||||
ROBE_CLOTH,
|
||||
END
|
||||
};
|
||||
public:
|
||||
typedef struct tagPlayerInitDesc {
|
||||
_float4 vPos;
|
||||
_float4 vRotQ;
|
||||
}PLAYERDESC;
|
||||
|
||||
private:
|
||||
CPlayer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CPlayer(const CPlayer& Prototype);
|
||||
@@ -51,6 +34,7 @@ class CPlayer final : public CUnit
|
||||
_int Get_UIState() { return m_eUIState; }
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
HRESULT Render_BonePhysX();
|
||||
#endif // _DEBUG
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
_matrix Get_WandPos();
|
||||
@@ -90,6 +74,9 @@ class CPlayer final : public CUnit
|
||||
class CTransform* m_pBroomTransform = { nullptr };
|
||||
class CBroom* m_pBroom = { nullptr };
|
||||
CStat* m_pStat = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PXOBJECT::JOINT_ROUTE)] = {nullptr};
|
||||
private:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
@@ -102,10 +89,15 @@ class CPlayer final : public CUnit
|
||||
void Add_SpellEvent(_uint AnimIndex, _float fRatio);
|
||||
void Play_SpellHitAnim();
|
||||
|
||||
HRESULT Update_LegsPosition();
|
||||
|
||||
void Update_CameraCoordinateSystem(_float fTimeDelta);
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<BasicEffect> m_BasicEffect;
|
||||
unique_ptr<PrimitiveBatch<VertexPositionColor>> m_Batch;
|
||||
unique_ptr<GeometricPrimitive> m_pBoneShape = { nullptr };
|
||||
ID3D11DepthStencilState* m_pDepthStencilStateNone = { nullptr };
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
#pragma once
|
||||
#include "Client_Define.h"
|
||||
|
||||
NS_BEGIN(Client)
|
||||
|
||||
enum class PLAYER_MESH_ORDER {
|
||||
HEAD_EYE_OCC,
|
||||
HEAD_FACE,
|
||||
HEAD_TEETH,
|
||||
HEAD_EYELASH,
|
||||
HEAD_EYES,
|
||||
BODY_ARMS,
|
||||
HAIR_MAIN,
|
||||
HAIR_MAIN_CLOTH,
|
||||
LOWER,
|
||||
SHOES,
|
||||
UPPER,
|
||||
HAIR_SUB,
|
||||
HAIR_SUB_CLOTH,
|
||||
ROBE_SKIRT,
|
||||
ROBE_FUR,
|
||||
ROBE_CLOTH,
|
||||
END
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_ORDER {
|
||||
RIGHTUP
|
||||
, TAILUP
|
||||
, LEFTUP
|
||||
|
||||
, RIGHT
|
||||
, TAIL
|
||||
, LEFT
|
||||
|
||||
, RIGHTDOWN
|
||||
, RIGHTDOWNRIGHT
|
||||
, TAILRIGHTDOWN
|
||||
|
||||
, TAILLEFTDOWN
|
||||
, LEFTDOWNLEFT
|
||||
, LEFTDOWN
|
||||
, END
|
||||
};
|
||||
|
||||
static const _char* PLAYER_JOINT_BONE_NAMES[12] = {
|
||||
"RightUpLeg_Cloth"
|
||||
, "TailUp_Cloth"
|
||||
, "LeftUpLeg_Cloth"
|
||||
|
||||
, "RightLeg_Cloth"
|
||||
, "Tail_Cloth"
|
||||
, "LeftLeg_Cloth"
|
||||
|
||||
, "RightDownLeg_Cloth"
|
||||
, "RightDownRightLeg_Cloth"
|
||||
, "TailRightDown_Cloth"
|
||||
|
||||
, "TailLeftDown_Cloth"
|
||||
, "LeftDownLeftLeg_Cloth"
|
||||
, "LeftDownLeg_Cloth"
|
||||
};
|
||||
|
||||
enum class PLAYER_JOINT_ROUTE_ORDER {
|
||||
UP_R_T
|
||||
, UP_T_L
|
||||
|
||||
, MIDDLE_R_T
|
||||
, MIDDLE_T_L
|
||||
|
||||
, DOWN_R_RR
|
||||
, DOWN_RR_TR
|
||||
|
||||
, DOWN_TR_TL
|
||||
|
||||
, DOWN_TL_L
|
||||
, DOWN_L_LL
|
||||
, END
|
||||
};
|
||||
|
||||
NS_END
|
||||
Binary file not shown.
Binary file not shown.
@@ -27,6 +27,9 @@ float g_fOutLinePower;
|
||||
float g_fUsingSurfaceParams;
|
||||
float g_fEtherealRatio;
|
||||
float g_fMixerFactor;
|
||||
float g_fDisolveEdgeWidth;
|
||||
float g_fDisolveAmount;
|
||||
float g_fDisolveRatio;
|
||||
|
||||
|
||||
Texture2D g_DiffuseTexture : register(t00);
|
||||
@@ -63,6 +66,8 @@ StructuredBuffer<BoneOut> g_PrevBoneBuffer : register(t27);
|
||||
|
||||
|
||||
Texture2D g_SurfaceParamsTexture;
|
||||
Texture2D g_DeadDisolveTexture;
|
||||
Texture2D g_DeadDisolveBurnTexture;
|
||||
|
||||
int g_iBinded_Texture[27];
|
||||
matrix g_BoneMatrices[512];
|
||||
@@ -336,7 +341,11 @@ PS_OUT PS_EYELASH_DAOTHV_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDAO_Mask = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDAO_Mask, In.vTexcoord);
|
||||
}
|
||||
float fDiffuseMask = vDAO_Mask.r;
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
@@ -376,7 +385,11 @@ PS_OUT PS_TEETH_SRXO_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -405,7 +418,11 @@ PS_OUT PS_EYE_DN_SRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -440,7 +457,11 @@ PS_OUT PS_FACIAL_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDAO_Mask = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDAO_Mask, In.vTexcoord);
|
||||
}
|
||||
float fDiffuseMask = vDAO_Mask.r;
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
@@ -482,7 +503,11 @@ PS_OUT PS_HEAD_HAIR_DAOTHV_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDAO_Mask = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDAO_Mask = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDAO_Mask, In.vTexcoord);
|
||||
}
|
||||
float fDiffuseMask = vDAO_Mask.r;
|
||||
float AlphaMask = vDAO_Mask.g;
|
||||
float AoMask_Dao = vDAO_Mask.b;
|
||||
@@ -523,7 +548,11 @@ PS_OUT PS_HEADwtHAND_DSRXON_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -551,7 +580,11 @@ PS_OUT PS_LOWER_DSRON_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -579,7 +612,11 @@ PS_OUT PS_UPPER_DMRON_ToMRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -607,7 +644,11 @@ PS_OUT PS_GLASSES_DMRON_ToMRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -636,6 +677,11 @@ PS_OUT PS_EmissiveMetalness_DENMRO_ToMRO(PS_IN In)
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
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;
|
||||
@@ -665,6 +711,11 @@ PS_OUT PS_DNMRO_ToMRO(PS_IN In)
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
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;
|
||||
@@ -693,6 +744,11 @@ PS_OUT PS_MI_ClothSim_DSEN_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse.rgb += vEmissive.rgb * 3.f;
|
||||
if (vDiffuse.a < 0.2f) {
|
||||
@@ -722,6 +778,11 @@ PS_OUT PS_MI_DANSROMRO_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
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)
|
||||
{
|
||||
@@ -757,6 +818,11 @@ PS_OUT PS_Troll_Club_DAENMROSRXO_ToMROX(PS_IN In)
|
||||
PS_OUT Out;
|
||||
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
float4 vAmbient = g_AmbientTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse.rgb += vEmissive.rgb * 3.f;
|
||||
@@ -795,6 +861,11 @@ PS_OUT PS_Player_EyeLash_DAOTHV_ToSRO(PS_IN In)
|
||||
float2 p = uv - center;
|
||||
float2 uvRot90 = frac(float2(p.x, p.y) + center);
|
||||
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDAOColor = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDAOColor, In.vTexcoord);
|
||||
}
|
||||
float4 vTHVColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
|
||||
float4 vNormalColor = g_NormalTexture.Sample(DefaultSampler, uv);
|
||||
float fAlpha = g_NormalBlendTexture.Sample(DefaultSampler, uvRot90).r;
|
||||
@@ -834,6 +905,11 @@ PS_OUT PS_Player_Eye_ToMRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuseColor = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuseColor, In.vTexcoord);
|
||||
}
|
||||
float4 vSubSurfaceColor = g_ReflectionTexture.Sample(DefaultSampler, uv);
|
||||
float4 vNormalColor = g_NormalTexture.Sample(DefaultSampler, uv);
|
||||
float4 vMROColor = g_MetalnessTexture.Sample(DefaultSampler, uv);
|
||||
@@ -859,6 +935,11 @@ PS_OUT PS_Player_Robe_ToMRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuseColor = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuseColor, In.vTexcoord);
|
||||
}
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, uv);
|
||||
vDiffuseColor.rg += (vEmissive.rg) * 3.f;
|
||||
|
||||
@@ -886,6 +967,11 @@ PS_OUT PS_Player_Suit_DSRON_ToSRO(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuseColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuseColor = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuseColor, In.vTexcoord);
|
||||
}
|
||||
float4 vSROColor = g_SpecularTexture.Sample(DefaultSampler, uv);
|
||||
float4 vNormalColor = g_NormalTexture.Sample(DefaultSampler, uv);
|
||||
|
||||
@@ -910,7 +996,12 @@ PS_OUT PS_Player_HairDAOTHV_ToSRO(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
float4 vDAOColor = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDAOColor = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDAOColor, In.vTexcoord);
|
||||
}
|
||||
float3 vHairBaseColor = g_NormalBlendTexture.Sample(DefaultSampler, uv).rrr;
|
||||
float4 vNormalColor = g_NormalTexture.Sample(DefaultSampler, uv);
|
||||
float4 vTHVColor = g_DiffuseBlend.Sample(DefaultSampler, uv);
|
||||
@@ -995,6 +1086,11 @@ PS_OUT PS_Dragon_Body(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
float fOppacity = g_NormalBlendTexture.Sample(DefaultSampler, uv).r;
|
||||
vDiffuse.a = fOppacity;
|
||||
if (vDiffuse.a < 0.2f)
|
||||
@@ -1027,6 +1123,11 @@ PS_OUT PS_Dragon_Wings(PS_IN In)
|
||||
PS_OUT Out;
|
||||
float2 uv = In.vTexcoord;
|
||||
float4 vDiffuse = g_DiffuseTexture.Sample(DefaultSampler, uv);
|
||||
if (true == g_bDisolve)
|
||||
{
|
||||
float4 vBurnColor = g_DeadDisolveBurnTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vDiffuse = ApplyDissolve(g_DeadDisolveTexture, g_fDisolveRatio, g_fDisolveAmount, g_fDisolveEdgeWidth, vBurnColor, vDiffuse, In.vTexcoord);
|
||||
}
|
||||
float4 vEmissive = g_EmissiveTexture.Sample(DefaultSampler, uv);
|
||||
vDiffuse += vEmissive * 3.f;
|
||||
|
||||
|
||||
@@ -208,6 +208,7 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\Private\ComputeShader.cpp" />
|
||||
<ClCompile Include="..\Private\ContainerObject.cpp" />
|
||||
<ClCompile Include="..\Private\DebugDraw.cpp" />
|
||||
<ClCompile Include="..\Private\Dynamic_Joint.cpp" />
|
||||
<ClCompile Include="..\private\Fog.cpp" />
|
||||
<ClCompile Include="..\private\Font.cpp" />
|
||||
<ClCompile Include="..\private\Font_Manager.cpp" />
|
||||
@@ -217,10 +218,6 @@ call Update_Lib.bat
|
||||
<ClCompile Include="..\Private\Renderer_Declare.cpp" />
|
||||
<ClCompile Include="..\Private\RenderEventDebugger.cpp" />
|
||||
<ClCompile Include="..\private\Resource_Manager.cpp" />
|
||||
<ClCompile Include="..\Private\RigidBody_Dynamic_Joint.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\ElementObject.cpp" />
|
||||
<ClCompile Include="..\Private\FSM.cpp" />
|
||||
<ClCompile Include="..\Private\GameInstance.cpp">
|
||||
@@ -424,6 +421,7 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\Public\Bounding_OBB.h" />
|
||||
<ClInclude Include="..\Public\Bounding_Sphere.h" />
|
||||
<ClInclude Include="..\Public\CallBack_QueryFilterCallback.h" />
|
||||
<ClInclude Include="..\Public\Dynamic_Joint.h" />
|
||||
<ClInclude Include="..\public\Fog.h" />
|
||||
<ClInclude Include="..\public\Font.h" />
|
||||
<ClInclude Include="..\public\Font_Manager.h" />
|
||||
@@ -433,10 +431,6 @@ call Update_Lib.bat
|
||||
<ClInclude Include="..\public\Quest.h" />
|
||||
<ClInclude Include="..\Public\RenderEventDebugger.h" />
|
||||
<ClInclude Include="..\public\Resource_Manager.h" />
|
||||
<ClInclude Include="..\Public\RigidBody_Dynamic_Joint.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Camera.h">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
</ExcludedFromBuild>
|
||||
|
||||
@@ -292,9 +292,6 @@
|
||||
<Filter Include="02.Element\02.Component\09.Light">
|
||||
<UniqueIdentifier>{7c82051e-19af-4284-8156-16f504db30b6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\04. Font_Manager">
|
||||
<UniqueIdentifier>{bba1e91b-87a8-4a7b-8e4e-b42d2041d8eb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="02.Element\01.GameObject\01. Font">
|
||||
<UniqueIdentifier>{7eab7292-025e-40d7-aa71-73e7a3c71ea7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -310,6 +307,9 @@
|
||||
<Filter Include="01.Utility\01.Renderer\RenderEventDebugger">
|
||||
<UniqueIdentifier>{fd18d84d-d656-4dbd-9859-436191a27b91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="03.Management\04.Font_Manager">
|
||||
<UniqueIdentifier>{bba1e91b-87a8-4a7b-8e4e-b42d2041d8eb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Private\Base.cpp">
|
||||
@@ -540,9 +540,6 @@
|
||||
<ClCompile Include="..\private\VIBuffer_Instance.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Instance</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\RigidBody_Dynamic_Joint.cpp">
|
||||
<Filter>02.Element\02.Component\07.RigidBody\20.Joint</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Trail.cpp">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Trail</Filter>
|
||||
</ClCompile>
|
||||
@@ -571,7 +568,7 @@
|
||||
<Filter>03.Management\02.Resource_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Font_Manager.cpp">
|
||||
<Filter>03.Management\04. Font_Manager</Filter>
|
||||
<Filter>03.Management\04.Font_Manager</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Font.cpp">
|
||||
<Filter>02.Element\01.GameObject\01. Font</Filter>
|
||||
@@ -591,6 +588,9 @@
|
||||
<ClCompile Include="..\Private\CallBack_QueryFilterCallback.cpp">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\Private\Dynamic_Joint.cpp">
|
||||
<Filter>02.Element\02.Component\07.RigidBody\20.Joint</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Public\Base.h">
|
||||
@@ -1184,9 +1184,6 @@
|
||||
<ClInclude Include="..\public\VIBuffer_Instance.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Instance</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\RigidBody_Dynamic_Joint.h">
|
||||
<Filter>02.Element\02.Component\07.RigidBody\20.Joint</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Trail.h">
|
||||
<Filter>02.Element\02.Component\02.VIBuffer\Trail</Filter>
|
||||
</ClInclude>
|
||||
@@ -1218,7 +1215,7 @@
|
||||
<Filter>03.Management\02.Resource_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Font_Manager.h">
|
||||
<Filter>03.Management\04. Font_Manager</Filter>
|
||||
<Filter>03.Management\04.Font_Manager</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Font.h">
|
||||
<Filter>02.Element\01.GameObject\01. Font</Filter>
|
||||
@@ -1238,6 +1235,9 @@
|
||||
<ClInclude Include="..\Public\CallBack_QueryFilterCallback.h">
|
||||
<Filter>02.Element\02.Component\08.Character_Controller\CallBack</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Public\Dynamic_Joint.h">
|
||||
<Filter>02.Element\02.Component\07.RigidBody\20.Joint</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Public\Assimp\color4.inl">
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "pch.h"
|
||||
#include "Dynamic_Joint.h"
|
||||
|
||||
CDynamic_Joint::CDynamic_Joint(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CDynamic_Joint::CDynamic_Joint(const CDynamic_Joint& rhs)
|
||||
: CComponent(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CDynamic_Joint::Initialize_Prototype()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT CDynamic_Joint::Initialize(void* pArg)
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CDynamic_Joint::Add_DebugShape()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
HRESULT CDynamic_Joint::Render()
|
||||
{
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
CDynamic_Joint* CDynamic_Joint::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CComponent* CDynamic_Joint::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CDynamic_Joint::Free()
|
||||
{
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
void CDynamic_Joint::Describe_Entity()
|
||||
{
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
@@ -1000,9 +1000,9 @@ PSX::PxRigidStatic* CGameInstance::Add_StaticActor(CRigidBody_Static& RigidBody,
|
||||
{
|
||||
return m_pPhysX_Manager->Add_StaticActor(RigidBody, iLevel);
|
||||
}
|
||||
PSX::PxRevoluteJoint* CGameInstance::Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame, _uint iLevel)
|
||||
PSX::PxJoint* CGameInstance::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_PxRevoluteJoint(pActorFrame, pxLocalWallFrame, pActorObject, pxLocalActorFrame, iLevel);
|
||||
return m_pPhysX_Manager->Create_PxJoint(eType, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1);
|
||||
}
|
||||
_bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
{
|
||||
|
||||
@@ -142,13 +142,29 @@ PSX::PxRigidStatic* CPhysX_Manager::Add_StaticActor(CRigidBody_Static& RigidBody
|
||||
return pActor;
|
||||
}
|
||||
|
||||
PSX::PxRevoluteJoint* CPhysX_Manager::Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame, _uint iLevel)
|
||||
PSX::PxJoint* CPhysX_Manager::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1)
|
||||
{
|
||||
PSX::PxRevoluteJoint* pJoint = PSX::PxRevoluteJointCreate(*m_pPhysics, pActorFrame, pxLocalWallFrame, pActorObject, pxLocalActorFrame);
|
||||
PSX::PxJoint* pOut = { nullptr };
|
||||
switch (eType)
|
||||
{
|
||||
case PHYSX_JOINT::D6:
|
||||
{
|
||||
PSX::PxD6Joint* pJoint = PSX::PxD6JointCreate(*m_pPhysics, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1);
|
||||
pOut = pJoint;
|
||||
}
|
||||
break;
|
||||
case PHYSX_JOINT::DISTANCE:
|
||||
{
|
||||
PSX::PxDistanceJoint* pJoint = PSX::PxDistanceJointCreate(*m_pPhysics, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1);
|
||||
pOut = pJoint;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
assert(nullptr != pOut);
|
||||
|
||||
assert(nullptr != pJoint);
|
||||
|
||||
return pJoint;
|
||||
return pOut;
|
||||
}
|
||||
|
||||
PSX::PxMaterial* CPhysX_Manager::Create_Material(const _float3* vMatInfo)
|
||||
@@ -585,6 +601,7 @@ HRESULT CPhysX_Manager::Initialize(_uint iLevel)
|
||||
#ifndef _DEBUG
|
||||
m_pPhysics = PxCreatePhysics(PX_PHYSICS_VERSION, *m_pFoundation, m_ToleranceScale, true);
|
||||
#endif // _DEBUG
|
||||
PxInitExtensions(*m_pPhysics, m_pPvd);
|
||||
|
||||
m_pCookingParam = new PSX::PxCookingParams(m_pPhysics->getTolerancesScale());
|
||||
m_pCookingParam->meshPreprocessParams |= PSX::PxMeshPreprocessingFlag::eWELD_VERTICES;
|
||||
@@ -740,7 +757,7 @@ void CPhysX_Manager::Free()
|
||||
if (nullptr != m_pDispatcher) {
|
||||
m_pDispatcher->release(); m_pDispatcher = nullptr;
|
||||
}
|
||||
|
||||
PxCloseExtensions();
|
||||
if (nullptr != m_pPhysics) {
|
||||
m_pPhysics->release(); m_pPhysics = nullptr;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,8 @@ CRigidBody_Dynamic::CRigidBody_Dynamic(const CRigidBody_Dynamic& rhs) :
|
||||
#ifdef _DEBUG
|
||||
HRESULT CRigidBody_Dynamic::Render()
|
||||
{
|
||||
_matrix WorldMatrix = XMMatrixTranslation(m_vLocalTranslation.x, m_vLocalTranslation.y, m_vLocalTranslation.z) * m_pTransform->Get_XMWorldMatrix();
|
||||
PSX::PxTransform pxTranform = m_pRigidBody->getGlobalPose();
|
||||
_matrix WorldMatrix = XMMatrixTranslation(m_vLocalTranslation.x, m_vLocalTranslation.y, m_vLocalTranslation.z) * XMMatrixAffineTransformation(XMVectorSet(1.f, 1.f, 1.f, 0.f), XMVectorZero(), XMLoadFloat4((_float4*)&pxTranform.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxTranform.p), 1.f));
|
||||
_matrix ViewMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::VIEW);
|
||||
_matrix ProjMatrix = m_pGameInstance->Get_Transform_Matrix(D3DTS::PROJ);
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x2fc48000, 1.f);
|
||||
@@ -35,8 +36,8 @@ HRESULT CRigidBody_Dynamic::Render()
|
||||
case ACTOR::CAPSULE:
|
||||
{
|
||||
m_pMainShape->Draw(WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
_matrix WorldUp = XMMatrixTranslationFromVector(m_pTransform->Get_State(STATE::UP) * m_vhalfGeometryInfo.y);
|
||||
_matrix WorldDown = XMMatrixTranslationFromVector(m_pTransform->Get_State(STATE::UP) * -m_vhalfGeometryInfo.y);
|
||||
_matrix WorldUp = XMMatrixTranslationFromVector(WorldMatrix.r[1] * m_vhalfGeometryInfo.y);
|
||||
_matrix WorldDown = XMMatrixTranslationFromVector(WorldMatrix.r[1] * -m_vhalfGeometryInfo.y);
|
||||
m_pSubShape->Draw(WorldUp * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
m_pSubShape->Draw(WorldDown * WorldMatrix, ViewMatrix, ProjMatrix, vColor, nullptr, true);
|
||||
} break;
|
||||
@@ -197,6 +198,19 @@ void CRigidBody_Dynamic::Set_Transform(_vector vPos, _vector vRotQ)
|
||||
Set_Transform(pxTransform);
|
||||
}
|
||||
|
||||
void CRigidBody_Dynamic::Set_CenterTransform(_matrix CenterMatrix, _vector StartMatrix, _vector EndMatrix)
|
||||
{
|
||||
_vector vCenterWorldPos = (StartMatrix + EndMatrix) * 0.5f;
|
||||
_vector vRotQ = XMQuaternionIdentity();
|
||||
_vector vDir = XMVectorSetW(EndMatrix - StartMatrix, 0.f);
|
||||
_float vLength = XMVectorGetX(XMVector3Length(vDir));
|
||||
if (vLength > FLT_EPSILON5) {
|
||||
vDir = XMVector3Normalize(vDir);
|
||||
vRotQ = CMyTools::MakeQuaternionFromTo(XMVectorSet(0.f, 1.f, 0.f, 0.f), vDir);
|
||||
}
|
||||
Set_Transform(vCenterWorldPos, vRotQ);
|
||||
}
|
||||
|
||||
void CRigidBody_Dynamic::Set_Transform(PSX::PxTransform pxTransform)
|
||||
{
|
||||
m_pRigidBody->setGlobalPose(pxTransform);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
#include "pch.h"
|
||||
@@ -13,8 +13,17 @@ class CPhysX_CctQueryFilterCallback final : public PSX::PxQueryFilterCallback
|
||||
|
||||
if (physxUserData->eKind == PHYSX_KIND::BODY_DYNAMIC)
|
||||
{
|
||||
if (PXOBJECT(physxUserData->iSubKind) == PXOBJECT::SKILL_PROTEGO)
|
||||
switch (PXOBJECT(physxUserData->iSubKind))
|
||||
{
|
||||
case Engine::PXOBJECT::LEG:
|
||||
return PSX::PxQueryHitType::eNONE;
|
||||
break;
|
||||
case Engine::PXOBJECT::SKILL_PROTEGO:
|
||||
return PSX::PxQueryHitType::eNONE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
#include "Component.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
class CTransform;
|
||||
class CMesh;
|
||||
|
||||
class ENGINE_DLL CDynamic_Joint abstract : public CComponent
|
||||
{
|
||||
typedef struct tagDynamicJointDesc {
|
||||
PHYSX_JOINT eType;
|
||||
PSX::PxActor* pActor0;
|
||||
PSX::PxTransform* pLocalFrame0;
|
||||
PSX::PxActor* pActor1;
|
||||
PSX::PxTransform* pLocalFrame1;
|
||||
}DYNAMICJOINT_DESC;
|
||||
private:
|
||||
CDynamic_Joint(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CDynamic_Joint(const CDynamic_Joint& rhs);
|
||||
~CDynamic_Joint() = default;
|
||||
|
||||
public:
|
||||
#ifdef _DEBUG
|
||||
virtual HRESULT Render()override;
|
||||
#endif // _DEBUG
|
||||
|
||||
private:
|
||||
|
||||
#ifdef _DEBUG
|
||||
unique_ptr<GeometricPrimitive> m_pMainShape = { nullptr };
|
||||
#endif // _DEBUG
|
||||
|
||||
private:
|
||||
HRESULT Initialize_Prototype();
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
#ifdef _DEBUG
|
||||
HRESULT Add_DebugShape();
|
||||
#endif
|
||||
|
||||
public:
|
||||
static CDynamic_Joint* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CComponent* Clone(void* pArg, class CGameObject* pOwner = nullptr) override;
|
||||
virtual void Free() override;
|
||||
#ifdef _DEBUG
|
||||
virtual void Describe_Entity() override;
|
||||
#endif // _DEBUG
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -118,9 +118,16 @@ enum class PHYSX_KIND {
|
||||
OBSTACLEActor,
|
||||
};
|
||||
|
||||
enum class PHYSX_JOINT {
|
||||
D6,
|
||||
DISTANCE,
|
||||
END
|
||||
};
|
||||
|
||||
enum class PXOBJECT : _uint {
|
||||
#pragma region NOT_DEFINE
|
||||
NOT_DEFINE = 000,
|
||||
NOT_DEFINE = 0,
|
||||
LEG,
|
||||
#pragma endregion
|
||||
#pragma region PLAYER
|
||||
PLAYER = 10,
|
||||
@@ -214,6 +221,7 @@ enum class PXOBJECT : _uint {
|
||||
#pragma region NOCOLLIDE
|
||||
NOCOLLIDE = 900,
|
||||
GAIL,
|
||||
JOINT_ROUTE,
|
||||
|
||||
#pragma endregion
|
||||
END = 999
|
||||
|
||||
@@ -210,7 +210,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel);
|
||||
PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody_Dynamic& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel);
|
||||
PSX::PxRevoluteJoint* Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame, _uint iLevel);
|
||||
PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1);
|
||||
|
||||
_bool SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
_bool SphereCast(_float fRadius, _fvector vStartPos, _gvector vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer);
|
||||
|
||||
@@ -267,6 +267,40 @@ class CMyTools {
|
||||
vAccumulateRadianPitchYaw.x = -fPitchLimitRadian;
|
||||
}
|
||||
}
|
||||
static inline _vector MakeQuaternionFromTo(_vector vAOrigin, _vector vBDest)
|
||||
{
|
||||
vAOrigin = XMVector3Normalize(vAOrigin);
|
||||
vBDest = XMVector3Normalize(vBDest);
|
||||
|
||||
_float fDot = XMVectorGetX(XMVector3Dot(vAOrigin, vBDest));
|
||||
|
||||
if ( 1.f - fDot < FLT_EPSILON) { // 같은 방향 제외
|
||||
return XMQuaternionIdentity();
|
||||
}
|
||||
if (fDot < -1.f + FLT_EPSILON) { // 반대방향 제외
|
||||
_vector vTempAxis = XMVector3Cross(vAOrigin, XMVectorSet(1.f, 0.f, 0.f, 0.f));
|
||||
_float fTempLength = XMVectorGetX(XMVector3Length(vTempAxis));
|
||||
|
||||
if (fTempLength < FLT_EPSILON5) {
|
||||
vTempAxis = XMVector3Cross(vAOrigin, XMVectorSet(0.f, 0.f, 1.f, 0.f));
|
||||
}
|
||||
|
||||
vTempAxis = XMVector3Normalize(vTempAxis);
|
||||
return XMQuaternionRotationAxis(vTempAxis, XM_PI);
|
||||
}
|
||||
|
||||
_vector vRotAxis = XMVector3Cross(vAOrigin, vBDest);
|
||||
_float fRotLength = XMVectorGetX(XMVector3Length(vRotAxis));
|
||||
if (fRotLength < FLT_EPSILON5) {
|
||||
return XMQuaternionIdentity();
|
||||
}
|
||||
vRotAxis = XMVector3Normalize(vRotAxis);
|
||||
|
||||
_float fRotAngle = acosf(Saturate(fDot));
|
||||
_vector vRotQ = XMQuaternionRotationAxis(vRotAxis, fRotAngle);
|
||||
return XMQuaternionNormalize(vRotQ);
|
||||
}
|
||||
|
||||
|
||||
inline static void SortHitsByDistance(vector<PSX::PxRaycastHit>& hits)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
|
||||
@@ -23,7 +23,9 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody_Dynamic& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel);
|
||||
PSX::PxRevoluteJoint* Create_PxRevoluteJoint(PSX::PxRigidActor* pActorFrame, PSX::PxTransform& pxLocalWallFrame, PSX::PxRigidActor* pActorObject, PSX::PxTransform& pxLocalActorFrame, _uint iLevel);
|
||||
|
||||
// https://documentation.help/nvidia-physx-sdk-guide/Joints.html
|
||||
PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1);
|
||||
|
||||
void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh, _uint iLevel);
|
||||
void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "Navigation.h"
|
||||
#include "RigidBody_Dynamic.h"
|
||||
#include "RigidBody_Static.h"
|
||||
#include "Dynamic_Joint.h"
|
||||
#include "Texture.h"
|
||||
#include "Cell.h"
|
||||
#include "Model.h"
|
||||
|
||||
@@ -53,6 +53,7 @@ class ENGINE_DLL CRigidBody_Dynamic : public CRigidBody
|
||||
void Set_Position(_vector vPos);
|
||||
void Set_Rotation(_vector vRotQ);
|
||||
void Set_Transform(_vector vPos, _vector vRotQ);
|
||||
void Set_CenterTransform(_matrix CenterMatrix, _vector StartMatrix, _vector EndMatrix);
|
||||
void Set_Transform(PSX::PxTransform pxTransform);
|
||||
_float3 Get_FootPosition();
|
||||
_float3 Get_HeadPosition();
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#pragma once
|
||||
class CDynamic_Joint
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
@@ -80,8 +80,8 @@ using namespace FMOD;
|
||||
#pragma warning(disable: 26495)
|
||||
#pragma warning(disable: 33010)
|
||||
|
||||
#include "PhysX/PxPhysics.h"
|
||||
#include "PhysX/PxPhysicsAPI.h"
|
||||
#include "PhysX/extensions/PxExtensionsAPI.h"
|
||||
#pragma warning(pop)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user