@@ -116,8 +116,6 @@ HRESULT CBroomRacerAI::Initialize(void* pArg)
|
||||
void CBroomRacerAI::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CBroomRacerAI::Update(_float fTimeDelta)
|
||||
|
||||
@@ -75,13 +75,27 @@ void CCallBack_Playable_HitReport::onShapeHit(const PSX::PxControllerShapeHit& h
|
||||
case PXOBJECT::DOOR:
|
||||
{
|
||||
PSX::PxRigidDynamic* pDynamic = static_cast<PSX::PxRigidDynamic*>(pActor);
|
||||
_float fDot = vDir.dot(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
if (fDot > 0) {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, 1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
if (pDynamic->getRigidBodyFlags().isSet(PSX::PxRigidBodyFlag::eKINEMATIC)){
|
||||
pDynamic->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
else {
|
||||
pDynamic->addTorque(PSX::PxVec3(0.f, -1.f, 0.f) * fLength * 100.f, PSX::PxForceMode::eFORCE);
|
||||
pDynamic->wakeUp();
|
||||
PSX::PxVec3 vCompressedDir = hit.dir;
|
||||
if (vCompressedDir.magnitudeSquared() < FLT_EPSILON5) {
|
||||
vCompressedDir = -hit.worldNormal;
|
||||
}
|
||||
vCompressedDir.normalize();
|
||||
PSX::PxVec3 hingeAxis = PSX::PxVec3(0.f, 1.f, 0.f);
|
||||
|
||||
PSX::PxVec3 vForceDir = vCompressedDir - hingeAxis * vCompressedDir.dot(hingeAxis);
|
||||
if (vForceDir.magnitudeSquared() < FLT_EPSILON5){
|
||||
break;
|
||||
}
|
||||
vForceDir.normalize();
|
||||
|
||||
float forceMagnitude = PSX::PxClamp(fLength * 600.f, 0.f, 2000.f);
|
||||
PSX::PxRigidBodyExt::addForceAtPos(*pDynamic, vForceDir * forceMagnitude, { (_float)hit.worldPos.x, (_float)hit.worldPos.y, (_float)hit.worldPos.z }, PSX::PxForceMode::eFORCE);
|
||||
pTargetActorData->pOwner->OnCollision();
|
||||
|
||||
} break;
|
||||
default:
|
||||
{
|
||||
|
||||
@@ -87,8 +87,8 @@ HRESULT CEffectPool::Initialize(void* pArg)
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
m_isActiveEffectCreate = true;
|
||||
m_isActiveMonsterEffectCreate = true;
|
||||
m_isActiveEffectCreate = false;
|
||||
m_isActiveMonsterEffectCreate = false;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
m_isActiveEffectCreate = false;
|
||||
|
||||
@@ -580,7 +580,7 @@ void CGoblin::Free()
|
||||
void CGoblin::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Goblin")) {
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
|
||||
@@ -661,7 +661,7 @@ void CGoblin_Assassin::Free()
|
||||
void CGoblin_Assassin::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Goblin")) {
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ void CGoblin_Assassin_Spector::Free()
|
||||
void CGoblin_Assassin_Spector::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("GoblinSpector")) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
|
||||
@@ -518,7 +518,7 @@ void CGoblin_Mage::Free()
|
||||
void CGoblin_Mage::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Goblin_Mage")) {
|
||||
|
||||
GUI::Checkbox("LookAt", &m_bLookAt);
|
||||
|
||||
@@ -337,7 +337,7 @@ void CGoblin_Spector::Free()
|
||||
void CGoblin_Spector::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("GoblinSpector")) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
GUI::DragFloat3("Scale", (_float*)&vScale);
|
||||
|
||||
@@ -340,8 +340,8 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isReady_Background = true;
|
||||
isReady_Hogsmeade = false;
|
||||
isReady_Hogwart = false;
|
||||
isReady_Hogsmeade = true;
|
||||
isReady_Hogwart = true;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isReady_Background = true;
|
||||
@@ -689,7 +689,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Player(const _wstring& strLayerTag)
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_NPC = false;
|
||||
isLoad_NPC = true;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
|
||||
@@ -784,7 +784,7 @@ HRESULT CLevel_GamePlay::Ready_Layer_Monster()
|
||||
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Monster = false;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "pch.h"
|
||||
#pragma region HEADER
|
||||
#include "pch.h"
|
||||
#include "Camera_Debug.h"
|
||||
#include "Client_Struct.h"
|
||||
#include "GameInstance.h"
|
||||
@@ -234,7 +235,7 @@
|
||||
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma endregion
|
||||
CLoader::CLoader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: m_pDevice{ pDevice }
|
||||
, m_pContext{ pContext }
|
||||
@@ -385,10 +386,10 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
#endif //
|
||||
#ifdef 기무리
|
||||
isLoad_Background = true;
|
||||
isLoad_Hogwart = false;
|
||||
isLoad_UI_SEQUANTIAL = false;
|
||||
isLoad_NPC = false;
|
||||
isLoad_Monster = false;
|
||||
isLoad_Hogwart = true;
|
||||
isLoad_UI_SEQUANTIAL = true;
|
||||
isLoad_NPC = true;
|
||||
isLoad_Monster = true;
|
||||
#endif //
|
||||
#ifdef 나
|
||||
isLoad_Background = true;
|
||||
@@ -1751,13 +1752,32 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 12.f, 12.f };
|
||||
Desc.vAutoDamping = { 12.f, 120.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_ANCHOR"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::SPHERE;
|
||||
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.001f };
|
||||
Desc.fContactOffset = { 0.005f };
|
||||
Desc.vhalfGeometryInfo = { 0.75f, 0.25f, 0.25f };
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 1200.f, 1200.f };
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.f, 1.0f, 0.f };
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::CAPSULE;
|
||||
@@ -1770,7 +1790,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.fDensity = 0.01f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
Desc.vAutoDamping = { 12.f, 12.f };
|
||||
Desc.vAutoDamping = { 12.f, 120.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)))) {
|
||||
@@ -1785,7 +1805,7 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
Desc.ePxMaterialTypes = { PXMATERIAL::DEFAULT };
|
||||
Desc.vMatInfo = { 0.5f, 0.5f, 0.01f };
|
||||
Desc.fContactOffset = { 0.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.12f, 0.25f, 0.f };
|
||||
Desc.vhalfGeometryInfo = { 0.06f, 0.25f, 0.f };
|
||||
Desc.fDensity = 122.f;
|
||||
Desc.pxMassCenter = PSX::PxTransform(PSX::PxIDENTITY());
|
||||
Desc.eLockFlag = {};
|
||||
@@ -1796,6 +1816,25 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
Desc.eType = ACTOR::SPHERE;
|
||||
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.01f, 0.01f, 0.01f };
|
||||
Desc.fContactOffset = { 0.01f };
|
||||
Desc.vhalfGeometryInfo = { 0.120f, 0.460f, 0.010f };
|
||||
Desc.fDensity = 100.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_LowerBound"), CRigidBody_Dynamic::Create(m_pDevice, m_pContext, Desc)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("PHYSX_DynamicJoint"), CDynamic_D6Joint::Create(m_pDevice, m_pContext)))) {
|
||||
return E_FAIL;
|
||||
@@ -1858,25 +1897,25 @@ HRESULT CLoader::Loading_For_GamePlay()
|
||||
CRigidBody_Dynamic::RIGIDBODY_PROTOTYPE_DYNAMIC_DESC Desc{};
|
||||
{
|
||||
Desc.eType = ACTOR::BOX;
|
||||
Desc.ePxRigidBodyFlags = { PSX::PxRigidBodyFlag::eKINEMATIC };
|
||||
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.vMatInfo = { 0.5f, 0.5f, 0.1f };
|
||||
Desc.fContactOffset = { 0.05f };
|
||||
Desc.vhalfGeometryInfo = { 0.35f, 0.65f, 0.15f };
|
||||
Desc.vhalfGeometryInfo = { 0.5f, 1.f, 0.125f };
|
||||
Desc.fDensity = 1.f;
|
||||
PSX::PxTransform pxPivotTransform = PSX::PxTransform(PSX::PxVec3(0.f, 1.f, 0.f));
|
||||
Desc.vLocalRotQ = { 0.f, 0.f, 0.f, 1.f };
|
||||
Desc.vLocalTranslation = { 0.5f, 0.f, 0.f };
|
||||
Desc.vLocalTranslation = { 0.5f, 1.375f, 0.f };
|
||||
|
||||
Desc.pxMassCenter = pxPivotTransform;
|
||||
Desc.eLockFlag = {
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_X |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Y |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X |
|
||||
PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_ANGULAR_Z |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Y |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_X |
|
||||
//PSX::PxRigidDynamicLockFlag::eLOCK_LINEAR_Z
|
||||
};
|
||||
Desc.vAutoDamping = { 10.f, 10.f };
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void CMainApp::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
m_pGameInstance->Present_TimeCost();
|
||||
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::SliderFloat("fTimeMult", &g_fTimeMult, 0.01f, 4.f);
|
||||
GUI::End();
|
||||
m_pGameInstance->Update_Engine(fTimeDelta * g_fTimeMult);
|
||||
@@ -222,13 +222,13 @@ HRESULT CMainApp::Ready_Prototypes()
|
||||
HRESULT CMainApp::Ready_IMGUI()
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
GUI::CreateContext();
|
||||
ImGuiIO& io = GUI::GetIO(); (void)io;
|
||||
ImFont* font = nullptr;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
GUI::StyleColorsDark();
|
||||
|
||||
ImGui_ImplWin32_Init(g_hWnd);
|
||||
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
||||
@@ -255,7 +255,7 @@ HRESULT CMainApp::Release_IMGUI()
|
||||
{
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
GUI::DestroyContext();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,6 +63,10 @@ HRESULT CMapElement_Chest::Initialize(void* pArg)
|
||||
|
||||
void CMapElement_Chest::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_iEntered -= 1;
|
||||
if (m_iEntered < 0) {
|
||||
m_iEntered = 0;
|
||||
}
|
||||
m_pLid->Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -168,6 +172,17 @@ HRESULT CMapElement_Chest::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Chest::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
|
||||
if (nullptr == pPlayer) {
|
||||
return;
|
||||
}
|
||||
if (fDistance < m_fEncounterDistance) {
|
||||
m_iEntered = 4;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Chest::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
|
||||
@@ -40,91 +40,59 @@ HRESULT CMapElement_Door::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
return E_FAIL;
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pDesc->vRotation.x), XMConvertToRadians(pDesc->vRotation.y), XMConvertToRadians(pDesc->vRotation.z));
|
||||
|
||||
XMStoreFloat4((_float4*)&m_pxStartQuat, m_pTransformCom->Get_QuarternionVector());
|
||||
XMStoreFloat4x4(&m_InitialMatrix, m_pTransformCom->Get_XMWorldMatrix());
|
||||
|
||||
m_vRadianYAngle.y = pDesc->vRotation.z;
|
||||
m_vRadianYAngle.x = m_vRadianYAngle.y + XMConvertToRadians(-70.f);
|
||||
m_vRadianYAngle.z = m_vRadianYAngle.y + XMConvertToRadians(70.f);
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR);
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC) {
|
||||
GUI::Text("m_vKinematicTimer %.3f", m_vKinematicTimer.x);
|
||||
if (m_vKinematicTimer.x != 0) {
|
||||
m_vKinematicTimer.x += fTimeDelta;
|
||||
if (m_vKinematicTimer.x < m_vKinematicTimer.z) {
|
||||
// 행렬없이 럴프 버전
|
||||
_float fTime = max(0.f, ((m_vKinematicTimer.x - m_vKinematicTimer.y) / (m_vKinematicTimer.z - m_vKinematicTimer.y)));
|
||||
Lerp_Matrix(fTime);
|
||||
//Lerp_NonMatrix(fTime);
|
||||
if (m_vKinematicTimer.y < m_vKinematicTimer.x) {
|
||||
m_vKinematicTimer.x = 0.f;
|
||||
}
|
||||
else {
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, false);
|
||||
}
|
||||
else {
|
||||
ActingIdle();
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::ActingIdle()
|
||||
{
|
||||
_float fCurrentDegree = XMConvertToDegrees(m_pJoint->getAngle());
|
||||
GUI::Text("%.2f", fCurrentDegree);
|
||||
GUI::Text("%.2f", m_pJoint->getVelocity());
|
||||
if (fabsf(fCurrentDegree) >= 2.f) { // 각도가 벌어져 있는데
|
||||
if (false == m_bDrive) { // 드라이브 중이 아니면 드라이브시킴
|
||||
m_bDrive = true;
|
||||
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eDRIVE_ENABLED, true);
|
||||
m_pJoint->setDriveForceLimit(120.f);
|
||||
}
|
||||
if (true == m_bDrive) { // 드라이브 중이면
|
||||
if (fCurrentDegree > 0.f) {
|
||||
|
||||
}
|
||||
else {
|
||||
m_pJoint->setDriveVelocity(40.f);
|
||||
}
|
||||
}
|
||||
}
|
||||
else { // 각도가 안벌어져 있음
|
||||
if (true == m_bDrive && fCurrentDegree < 0.3f) { // 드라이브 중지 트리거
|
||||
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eDRIVE_ENABLED, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CMapElement_Door::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
|
||||
_vector vRPY = m_pTransformCom->Get_RollPitchYawVector();
|
||||
if (!(m_pActor->getRigidBodyFlags() & PSX::PxRigidBodyFlag::eKINEMATIC)) {
|
||||
_float fPitch = XMVectorGetX(vRPY);
|
||||
_float fYaw = XMVectorGetY(vRPY);
|
||||
_float fRoll = XMVectorGetZ(vRPY);
|
||||
|
||||
_float fClampedYaw = ClampRadian(fYaw);
|
||||
if (fClampedYaw != fYaw) {
|
||||
_vector vNewQuat = XMQuaternionRotationRollPitchYaw(fPitch, fClampedYaw, fRoll);
|
||||
|
||||
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
|
||||
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
|
||||
|
||||
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
|
||||
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
|
||||
|
||||
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
|
||||
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
|
||||
_matrix RotationMatrix = XMMatrixRotationQuaternion(vNewQuat);
|
||||
|
||||
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
|
||||
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
|
||||
|
||||
// 최종 월드 행렬
|
||||
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
|
||||
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(world);
|
||||
m_pActor->setGlobalPose(XMWorldToPx_NoScaleNoFlip(world));
|
||||
|
||||
m_pActor->setAngularVelocity(PSX::PxVec3(0));
|
||||
m_pActor->setLinearVelocity(PSX::PxVec3(0));
|
||||
m_pActor->setRigidBodyFlag(PSX::PxRigidBodyFlag::eKINEMATIC, true);
|
||||
m_vKinematicTimer.x = 0.f;
|
||||
}
|
||||
}
|
||||
if (m_pGameInstance->IsIn_WorldFrustum(Get_WorldPostion(), m_pModelComs[0]->Get_Radius())) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONBLEND, this);
|
||||
}
|
||||
@@ -161,6 +129,15 @@ HRESULT CMapElement_Door::Render()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::OnCollision(CGameObject* pOther, void* pDesc)
|
||||
{
|
||||
if (0.f != m_vKinematicTimer.x) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_vKinematicTimer.x = FLT_EPSILON3;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(__super::Ready_Components(pArg))) {
|
||||
@@ -187,12 +164,49 @@ HRESULT CMapElement_Door::Ready_Components(void* pArg)
|
||||
|
||||
ELEMENT_DOOR_DESC* pPhysXDummyDesc = static_cast<ELEMENT_DOOR_DESC*>(pArg);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSetW(XMLoadFloat3(&pPhysXDummyDesc->vPosition), 1.f));
|
||||
m_pTransformCom->Set_Scale(pPhysXDummyDesc->vScale);
|
||||
m_pTransformCom->Rotation(XMConvertToRadians(pPhysXDummyDesc->vRotation.x), XMConvertToRadians(pPhysXDummyDesc->vRotation.y), XMConvertToRadians(pPhysXDummyDesc->vRotation.z));
|
||||
|
||||
{ // RIGID_BODY
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::DOOR);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_DYNAMIC_DOOR"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pActor = (PSX::PxRigidDynamic*)m_pRigidBody->Get_Actor();
|
||||
m_pRigidBody->Move_Kinematic(m_pTransformCom->Get_State(STATE::POSITION), m_pTransformCom->Get_QuarternionVector(), true);
|
||||
}
|
||||
PSX::PxTransform doorWorldPose = m_pActor->getGlobalPose();
|
||||
PSX::PxVec3 hingePivotWorld = PSX::PxVec3(39.64f, 5.12f, 71.f);
|
||||
PSX::PxVec3 hingeAxisWorld = doorWorldPose.q.rotate(PSX::PxVec3(0.f, 1.f, 0.f)).getNormalized();
|
||||
PSX::PxTransform jointWorldPose;
|
||||
jointWorldPose.p = hingePivotWorld;
|
||||
jointWorldPose.q = CMyTools::Calc_RevJointPosFromWorldHingeAxis(hingeAxisWorld);
|
||||
PSX::PxTransform localFrameDoor = doorWorldPose.transformInv(jointWorldPose);
|
||||
|
||||
m_pJoint = (PSX::PxRevoluteJoint*)m_pGameInstance->Create_PxJoint(PHYSX_JOINT::REVOLUTE, nullptr, jointWorldPose, m_pActor, localFrameDoor);
|
||||
|
||||
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(-XMConvertToRadians(100.f), XMConvertToRadians(100.f)));
|
||||
m_pJoint->setRevoluteJointFlag(PSX::PxRevoluteJointFlag::eLIMIT_ENABLED, true);
|
||||
|
||||
m_pJoint->setDriveForceLimit(120.f);
|
||||
|
||||
m_pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true);
|
||||
m_pActor->setLinearVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
|
||||
m_pActor->setAngularVelocity(PSX::PxVec3(0.f, 0.f, 0.f));
|
||||
m_pActor->putToSleep();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CMapElement_Door::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
_float4x4 WorldMatirx = {};
|
||||
PSX::PxTransform pxPos = m_pRigidBody->Get_GlobalPosition();
|
||||
XMStoreFloat4x4(&WorldMatirx, XMMatrixAffineTransformation(XMLoadFloat3(&vScale), XMVectorZero(), XMLoadFloat4((_float4*)&pxPos.q), XMVectorSetW(XMLoadFloat3((_float3*)&pxPos.p), 1.f)));
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", &WorldMatirx))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
@@ -209,67 +223,6 @@ HRESULT CMapElement_Door::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CMapElement_Door::Lerp_Matrix(_float fTime)
|
||||
{
|
||||
{
|
||||
_float4x4 OutMatrix = {};
|
||||
_float4x4 CurrentMatrix = {};
|
||||
XMStoreFloat4x4(&CurrentMatrix, m_pTransformCom->Get_XMWorldMatrix());
|
||||
CMyTools::MatrixLerp(&CurrentMatrix, &m_InitialMatrix, OutMatrix, fTime);
|
||||
m_pTransformCom->Set_WorldMatrix(OutMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
void CMapElement_Door::Lerp_NonMatrix(_float fTime)
|
||||
{
|
||||
{
|
||||
_vector vCurrQ = m_pTransformCom->Get_QuarternionVector();
|
||||
_vector vInitialQ = XMLoadFloat4((_float4*)&m_pxStartQuat);
|
||||
_vector vLerpQuat = XMVector4Normalize(XMVectorLerp(vCurrQ, vInitialQ, fTime));
|
||||
|
||||
PSX::PxTransform actorPose = m_pActor->getGlobalPose();
|
||||
PSX::PxTransform massLocalPose = m_pActor->getCMassLocalPose();
|
||||
|
||||
PSX::PxVec3 vpxMassLocal = massLocalPose.p;
|
||||
PSX::PxVec3 vpxMassWorld = actorPose.transform(vpxMassLocal);
|
||||
|
||||
_vector vMassLocal = XMVectorSet(vpxMassLocal.x, vpxMassLocal.y, vpxMassLocal.z, 0.f);
|
||||
_vector vMassWorld = XMVectorSet(vpxMassWorld.x, vpxMassWorld.y, vpxMassWorld.z, 1.f);
|
||||
|
||||
|
||||
_float3 vScale = m_pTransformCom->Get_Scale();
|
||||
_matrix ScaleMatrix = XMMatrixScalingFromVector(XMLoadFloat3(&vScale));
|
||||
_matrix RotationMatrix = XMMatrixRotationQuaternion(vLerpQuat);
|
||||
|
||||
_matrix TranslationLocal = XMMatrixTranslationFromVector(-vMassLocal);
|
||||
_matrix TranslationWorld = XMMatrixTranslationFromVector(vMassWorld);
|
||||
|
||||
// 최종 월드 행렬
|
||||
_matrix world = TranslationLocal // 피벗중심으로 좌표계를 이동시킴
|
||||
* (ScaleMatrix * RotationMatrix * TranslationWorld); // 그 후 SRT 적용
|
||||
|
||||
m_pTransformCom->Set_WorldMatrix(world);
|
||||
}
|
||||
}
|
||||
|
||||
_float CMapElement_Door::ClampRadian(_float fNewRadian)
|
||||
{
|
||||
// [x, z] 사이로 잘라주는 단순한 클램프
|
||||
_float minYaw = m_vRadianYAngle.x;
|
||||
_float maxYaw = m_vRadianYAngle.z;
|
||||
|
||||
// 라디안 노멀라이즈 ([-pi, pi] 같은 범위로)
|
||||
fNewRadian = CMyTools::NormalizeRadian(fNewRadian);
|
||||
|
||||
if (fNewRadian < minYaw) {
|
||||
fNewRadian = minYaw;
|
||||
}
|
||||
else if (fNewRadian > maxYaw) {
|
||||
fNewRadian = maxYaw;
|
||||
}
|
||||
return fNewRadian;
|
||||
}
|
||||
|
||||
CMapElement_Door* CMapElement_Door::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMapElement_Door* pInstance = new CMapElement_Door(pDevice, pContext);
|
||||
@@ -313,7 +266,50 @@ void CMapElement_Door::Free()
|
||||
#ifdef _DEBUG
|
||||
void CMapElement_Door::Describe_Entity()
|
||||
{
|
||||
|
||||
GUI::Begin("PhysX");
|
||||
if (GUI::CollapsingHeader("Door")) {
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("DOOR")) {
|
||||
{
|
||||
GUI::Text("Velo : %.2f", m_pJoint->getVelocity());
|
||||
PSX::PxTransform pxActorLocalPos = m_pJoint->getLocalPose(PSX::PxJointActorIndex::eACTOR1);
|
||||
if (true == CMyTools::DescribePxTransform(pxActorLocalPos, (size_t)this)) {
|
||||
m_pJoint->setLocalPose(PSX::PxJointActorIndex::eACTOR1, pxActorLocalPos);
|
||||
}
|
||||
}
|
||||
{
|
||||
PSX::PxTransform pxRelativeLocalPos = m_pJoint->getRelativeTransform();
|
||||
PSX::PxVec3 vAxis = {};
|
||||
_float fAngle = {};
|
||||
pxRelativeLocalPos.q.toRadiansAndUnitAxis(fAngle, vAxis);
|
||||
GUI::Text("RelPos : %.2f %.2f %.2f", pxRelativeLocalPos.p.x, pxRelativeLocalPos.p.y, pxRelativeLocalPos.p.z);
|
||||
GUI::Text("fAngle vAxis : %.2f %.2f %.2f %.2f", fAngle, vAxis.x, vAxis.y, vAxis.z);
|
||||
}
|
||||
_float fDrive = m_pJoint->getDriveVelocity();
|
||||
_float fDriveDegree = XMConvertToDegrees(fDrive);
|
||||
if (GUI::DragFloat("Drive", &fDriveDegree, 1.f, -180.f, 180.f, "%.2f")) {
|
||||
fDrive = XMConvertToRadians(fDriveDegree);
|
||||
m_pJoint->setDriveVelocity(fDrive);
|
||||
}
|
||||
_float2 vDriveLimit = {};
|
||||
_float2 vSpring = {};
|
||||
{
|
||||
auto pxDriveLimit = m_pJoint->getLimit();
|
||||
vDriveLimit = { pxDriveLimit.lower, pxDriveLimit.upper };
|
||||
vSpring.x = pxDriveLimit.stiffness;
|
||||
vSpring.y = pxDriveLimit.damping;
|
||||
//pxDriveLimit.;
|
||||
}
|
||||
if (GUI::DragFloat2("Limit ", (_float*)&vDriveLimit, XMConvertToRadians(1.f), -XMConvertToRadians(180.f), XMConvertToRadians(180.f), "%.2f")) {
|
||||
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(vDriveLimit.x, vDriveLimit.y, PSX::PxSpring(vSpring.x, vSpring.y)));
|
||||
}
|
||||
if (GUI::DragFloat2("Spring Damping", (_float*)&vSpring, 1.f, 0.f, 100.f, "%.2f")) {
|
||||
m_pJoint->setLimit(PSX::PxJointAngularLimitPair(vDriveLimit.x, vDriveLimit.y, PSX::PxSpring(vSpring.x, vSpring.y)));
|
||||
}
|
||||
m_pRigidBody->Describe_Entity();
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
#endif // _DEBUG
|
||||
|
||||
|
||||
@@ -272,18 +272,6 @@ HRESULT CMapElement_Interactable::Render_OutLine()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("Unit", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
if (GUI::CollapsingHeader("OutLine")) {
|
||||
GUI::SetNextItemWidth(80.f);
|
||||
GUI::ColorPicker3("vOutLineColor", (_float*)&m_vOutLineColor);
|
||||
GUI::SliderFloat("Thickness", &m_fOutLineThickness, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Scale", &m_fOutLineScale, 0.1f, 2.f, "%.1f");
|
||||
GUI::SliderFloat("Power", &m_fOutLinePower, 0.1f, 2.f, "%.1f");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
|
||||
Compute_Depth();
|
||||
_float fCamFar = *m_pGameInstance->Get_CurrentCameraFar();
|
||||
_float fRatio = CMyTools::Saturate((m_fCamDepth / (fCamFar * fCamFar)));
|
||||
|
||||
@@ -290,11 +290,11 @@ void CMonster::Free()
|
||||
|
||||
void CMonster::Describe_Entity()
|
||||
{
|
||||
if (ImGui::TreeNode("ANIM STATE")) {
|
||||
if (GUI::TreeNode("ANIM STATE")) {
|
||||
|
||||
for (auto& pState : m_States)
|
||||
{
|
||||
if (ImGui::Button(to_string(pState.first).c_str()))
|
||||
if (GUI::Button(to_string(pState.first).c_str()))
|
||||
{
|
||||
m_pFSM->Change_State(pState.first);
|
||||
}
|
||||
@@ -303,7 +303,7 @@ void CMonster::Describe_Entity()
|
||||
|
||||
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
|
||||
|
||||
ImGui::TreePop();
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@ CNPC_EleazarFig::CNPC_EleazarFig(const CNPC_EleazarFig& Prototype)
|
||||
void CNPC_EleazarFig::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_iEntered -= 1;
|
||||
if (m_iEntered < 0) {
|
||||
m_iEntered = 0;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -38,6 +42,8 @@ void CNPC_EleazarFig::Update(_float fTimeDelta)
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
//m_pNPCInteraction->Set_Visible(0 < m_iEntered);
|
||||
}
|
||||
|
||||
void CNPC_EleazarFig::Late_Update(_float fTimeDelta)
|
||||
@@ -152,19 +158,16 @@ HRESULT CNPC_EleazarFig::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CNPC_EleazarFig::CastToPlayer()
|
||||
void CNPC_EleazarFig::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
_vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vTargetPos = {};
|
||||
pair<CUnit*, CTransform*> pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION);
|
||||
_float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos));
|
||||
if (fLength < m_fEncounterDistance) {
|
||||
return true;
|
||||
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
|
||||
if (nullptr == pPlayer) {
|
||||
return;
|
||||
}
|
||||
if (fDistance < m_fEncounterDistance) {
|
||||
m_iEntered = 4;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
HRESULT CNPC_EleazarFig::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -216,7 +219,7 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
|
||||
{ // CCT
|
||||
CCharacter_Controller::Character_Controller_DESC Desc{};
|
||||
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
|
||||
Desc.pTransform = m_pTransformCom;
|
||||
Desc.eBodyType = ACTOR::CAPSULE;
|
||||
Desc.fContactOffset = 0.0001f;
|
||||
@@ -234,6 +237,14 @@ HRESULT CNPC_EleazarFig::Ready_Components(void* pArg)
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::ELEAZARFIG);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -266,6 +277,7 @@ void CNPC_EleazarFig::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
|
||||
@@ -22,6 +22,10 @@ CNPC_Ollivander::CNPC_Ollivander(const CNPC_Ollivander& Prototype)
|
||||
void CNPC_Ollivander::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
m_pTransformCom->RewindMomentum();
|
||||
m_iEntered -= 1;
|
||||
if (m_iEntered < 0) {
|
||||
m_iEntered = 0;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -33,82 +37,14 @@ void CNPC_Ollivander::Update(_float fTimeDelta)
|
||||
#ifdef _DEBUG
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
if (false == m_bEntered)
|
||||
{
|
||||
if (true == CastToPlayer()) {
|
||||
m_vEnteringTimer.x += fTimeDelta;
|
||||
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
|
||||
m_vEnteringTimer.x -= m_vEnteringTimer.y;
|
||||
m_bEntered = true;
|
||||
// Active();
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("Hello");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (false == CastToPlayer()) {
|
||||
m_vEnteringTimer.x += fTimeDelta;
|
||||
if (m_vEnteringTimer.x > m_vEnteringTimer.y) {
|
||||
m_vEnteringTimer.x -= m_vEnteringTimer.y;
|
||||
m_bEntered = false;
|
||||
// DeActive(), Ready To Enter;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("CoolTime");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
else {
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("You must go Out");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
}
|
||||
|
||||
if (false == CastToPlayer() && false == m_bEntered) {
|
||||
#ifdef _DEBUG
|
||||
GUI::Begin("UNIT");
|
||||
if (GUI::CollapsingHeader("Ollivander")) {
|
||||
GUI::Text("Timer :%.1f", m_vEnteringTimer.x);
|
||||
GUI::Text("Waiting For ReEnter");
|
||||
}
|
||||
GUI::End();
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
|
||||
{ // 세트
|
||||
m_pCallBack_HitReport->BeginFrame();
|
||||
m_pCharacter_Controller->Move(fTimeDelta);
|
||||
m_pCallBack_HitReport->Set_CurrentSlop();
|
||||
}
|
||||
|
||||
m_pNPCInteraction->Set_Visible(m_bEntered);
|
||||
|
||||
if (m_bEntered == true)
|
||||
{
|
||||
if (m_pGameInstance->Key_Down(DIK_F))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
m_pNPCInteraction->Set_Visible(0 < m_iEntered);
|
||||
m_pRigidBody->Set_Position(m_pTransformCom->Get_State(STATE::POSITION), true);
|
||||
}
|
||||
|
||||
void CNPC_Ollivander::Late_Update(_float fTimeDelta)
|
||||
@@ -197,6 +133,17 @@ HRESULT CNPC_Ollivander::Render_Shadow(SHADOW eType)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CNPC_Ollivander::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
CPlayer* pPlayer = dynamic_cast<CPlayer*>(pCaster);
|
||||
if (nullptr == pPlayer) {
|
||||
return;
|
||||
}
|
||||
if (fDistance < m_fEncounterDistance) {
|
||||
m_iEntered = 4;
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) {
|
||||
@@ -223,19 +170,6 @@ HRESULT CNPC_Ollivander::Bind_ShaderResources()
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_bool CNPC_Ollivander::CastToPlayer()
|
||||
{
|
||||
_vector vCurrentPos = m_pTransformCom->Get_State(STATE::POSITION);
|
||||
_vector vTargetPos = {};
|
||||
pair<CUnit*, CTransform*> pairAllyInfo = m_pInfoInstance->Get_NearestPlayerAlly(m_pTransformCom->Get_State(STATE::POSITION));
|
||||
vTargetPos = pairAllyInfo.second->Get_State(STATE::POSITION);
|
||||
_float fLength = XMVectorGetX(XMVector4Length(vTargetPos - vCurrentPos));
|
||||
if (fLength < m_fEncounterDistance) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
HRESULT CNPC_Ollivander::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
@@ -295,8 +229,8 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
Desc.fMaterial = { 1.2f, 1.0f, 0.0f };
|
||||
Desc.bAutoStepping = { false };
|
||||
Desc.fStepOffset = { 0.02f };
|
||||
Desc.fRadius = 0.5f;
|
||||
Desc.fHeight = 0.6f;
|
||||
Desc.fRadius = 0.2f;
|
||||
Desc.fHeight = 0.3f;
|
||||
Desc.pCallback_HitReport = m_pCallBack_HitReport = CCallBack_NonPlayable_HitReport::Create();
|
||||
Desc.pCallback_Behavior = m_pCallBack_Behavior = CCallBack_NonPlayable_Behavior::Create();
|
||||
Desc.eClimbingMode = PSX::PxCapsuleClimbingMode::eEASY;
|
||||
@@ -306,6 +240,15 @@ HRESULT CNPC_Ollivander::Ready_Components(void* pArg)
|
||||
}
|
||||
m_pCharacter_Controller->SetGravity(true);
|
||||
}
|
||||
{ // DO
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::OLLIVANDER);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_NPC_HITBOX"), (CComponent**)&m_pRigidBody, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("OLLIVENDER"), (CComponent**)&m_pNpcStat))) {
|
||||
return E_FAIL;
|
||||
@@ -350,6 +293,7 @@ void CNPC_Ollivander::Free()
|
||||
|
||||
SAFE_RELEASE(m_pCharacter_Controller);
|
||||
SAFE_RELEASE(m_pNpcStat);
|
||||
SAFE_RELEASE(m_pRigidBody);
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
|
||||
@@ -111,7 +111,7 @@ HRESULT CPlayer::Initialize(void* pArg)
|
||||
m_bAI = false;
|
||||
|
||||
XMLoadFloat4x4(m_pBroomModel->Get_BoneMatrixPtr("broomSocket"));
|
||||
|
||||
m_fRayDistance = 10.f;
|
||||
m_pModelCom->Set_Temp(true);
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ void CPlayer::Update(_float fTimeDelta)
|
||||
{
|
||||
Update_CameraCoordinateSystem(fTimeDelta);
|
||||
UpdateGrapInteractive(fTimeDelta);
|
||||
Update_RaycastElements();
|
||||
|
||||
m_pFSM->Update_State(fTimeDelta);
|
||||
|
||||
@@ -252,7 +253,6 @@ HRESULT CPlayer::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pModelCom->Bind_OutPut_SRV_VS(26, 0);
|
||||
m_pModelCom->Bind_OutPut_SRV_VS_Prev(27, 0);
|
||||
|
||||
@@ -304,6 +304,39 @@ void CPlayer::Update_CameraShake(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
}
|
||||
HRESULT CPlayer::Update_RaycastElements()
|
||||
{
|
||||
if (E_FAIL == m_pGameInstance->IsBinded_Camera(CAMERA_SHOULDER)) {
|
||||
m_iRayHitCount = 0;
|
||||
return E_FAIL;
|
||||
}
|
||||
_vector vCameraPos = m_pGameInstance->Get_CamXMPosition();
|
||||
_vector vCameraDir = m_pGameInstance->Get_CameraLook();
|
||||
vector<PSX::PxRaycastHit> m_vRayHits = {};
|
||||
m_vRayHits.resize(12);
|
||||
_bool bHit = m_pGameInstance->RayCast(vCameraPos, vCameraDir, m_fRayDistance, m_vRayHits.data(), (_uint)m_vRayHits.size(), m_iRayHitCount);
|
||||
if (true == bHit) {
|
||||
CMyTools::SortHitsByDistance(m_vRayHits);
|
||||
for (_uint i = 0; i < m_iRayHitCount; ++i) {
|
||||
if (nullptr != m_vRayHits[i].actor->userData) {
|
||||
PHYSX_USERDATA* pData = (PHYSX_USERDATA*)m_vRayHits[i].actor->userData;
|
||||
switch (pData->eKind)
|
||||
{
|
||||
case PHYSX_KIND::BODY_STATIC:
|
||||
break;
|
||||
case PHYSX_KIND::BODY_DYNAMIC:
|
||||
pData->pBody->OnRayCollision(this, i, m_vRayHits[i].distance, _float3(m_vRayHits[i].position.x, m_vRayHits[i].position.y, m_vRayHits[i].position.z));
|
||||
break;
|
||||
case PHYSX_KIND::CCTActor:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPlayer::Render_Shadow(SHADOW eType)
|
||||
{
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_WorldMatrix", m_pTransformCom->Get_WorldMatrixPtr()))) {
|
||||
@@ -623,19 +656,6 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
}
|
||||
}
|
||||
|
||||
//array<_int, 256> paletteMask{};
|
||||
//paletteMask.fill(0);
|
||||
|
||||
//for (_uint i = 0; i < paletteCount; ++i)
|
||||
//{
|
||||
// if (i == 29)
|
||||
// continue;
|
||||
// _uint global = boneIndices[i];
|
||||
// paletteMask[i] = globalMask[global];
|
||||
//}
|
||||
|
||||
//m_pShaderCom->Bind_IntArray("g_RobeBoneMask", paletteMask.data(), 256);
|
||||
|
||||
GUI::DragFloat("TempWeight", &m_fTempWeight, 0.01f);
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_TempWeight", &m_fTempWeight, sizeof(_float)))) {
|
||||
@@ -651,13 +671,6 @@ HRESULT CPlayer::Bind_ShaderParameters(_uint iMeshOrder)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (nullptr != m_pRobePart) {
|
||||
if (FAILED(m_pRobePart->Bind_PrevBoneMatrices(m_pShaderCom, "g_PrevBoneMatrices"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif // _DEBUG
|
||||
@@ -766,6 +779,7 @@ void CPlayer::Free()
|
||||
|
||||
SAFE_RELEASE(m_pRobePart);
|
||||
SAFE_RELEASE(m_pGrapInteractive);
|
||||
|
||||
if (nullptr != m_pInfoInstance) {
|
||||
CInfoInstance* pInfo = m_pInfoInstance;
|
||||
m_pInfoInstance = nullptr;
|
||||
@@ -803,7 +817,7 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
|
||||
|
||||
GUI::Begin("CAMERA", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Player_CAM_COOORD")) {
|
||||
|
||||
GUI::Text("%d", m_LockOnInfo.pUnit);
|
||||
@@ -846,7 +860,7 @@ void CPlayer::Render_CameraCoordinateSystem()
|
||||
void CPlayer::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("PLAYER_DESC")) {
|
||||
if (true == GUI::Button("ShaderRefresh")) {
|
||||
m_pShaderCom->Shader_Refresh();
|
||||
|
||||
@@ -14,8 +14,13 @@ CPlayerRobe::CPlayerRobe(const CPlayerRobe& Prototype)
|
||||
void CPlayerRobe::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
Update_RobeJoints();
|
||||
#endif // 기무리
|
||||
|
||||
Describe_Entity();
|
||||
#endif // _DEBUG
|
||||
|
||||
}
|
||||
|
||||
void CPlayerRobe::Update(_float fTimeDelta)
|
||||
@@ -32,16 +37,7 @@ void CPlayerRobe::Update(_float fTimeDelta)
|
||||
|
||||
void CPlayerRobe::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
PSX::PxConstraintFlags pxConstraintFlags = m_pDynamicJoints[i]->getConstraintFlags();
|
||||
const bool bBroken = (pxConstraintFlags.isSet(PSX::PxConstraintFlag::eBROKEN));
|
||||
if (true == bBroken) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::NONLIGHT, this);
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CPlayerRobe::Render()
|
||||
@@ -60,12 +56,12 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
PSX::PxTransform pxTransform = {};
|
||||
_matrix WorldMatrix = {};
|
||||
_matrix OwnerInvWorldMatrix = m_pParentTransformCom->Get_WorldMatrixInv();
|
||||
{
|
||||
pxTransform = m_pRobeMainAnchor->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));
|
||||
_fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix;
|
||||
m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix);
|
||||
}
|
||||
//{
|
||||
// pxTransform = m_pRobeMainAnchor->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));
|
||||
// _fmatrix LocalMatrix = WorldMatrix * OwnerInvWorldMatrix;
|
||||
// m_pModelCom->Set_BoneCombinedTransformation("Hips_Cloth", LocalMatrix);
|
||||
//}
|
||||
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));
|
||||
@@ -77,14 +73,6 @@ HRESULT CPlayerRobe::Update_RobeSocketPosition()
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -98,12 +86,12 @@ HRESULT CPlayerRobe::Helper_RouteJointGenerater(CRigidBody_Dynamic::RIGIDBODY_DY
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -149,6 +137,8 @@ HRESULT CPlayerRobe::Update_LegsPosition()
|
||||
}
|
||||
#endif // _DEBUG
|
||||
}
|
||||
m_pLower0Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
|
||||
m_pLower1Bound->Move_Kinematic(m_pParentTransformCom->Get_XMWorldMatrix(), false);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -194,9 +184,121 @@ HRESULT CPlayerRobe::Render_Legs()
|
||||
[this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
m_pLower0Bound->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
m_pLower1Bound->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
});
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPlayerRobe::Update_RobeJoints()
|
||||
{
|
||||
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
m_JointDescriptions[i].InitFromJoint(*m_pDynamicJoints[i]);
|
||||
switch (PLAYER_JOINT_ORDER(i))
|
||||
{
|
||||
/* From Origin */
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START:
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_START:
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_START:
|
||||
m_JointDescriptions[i].iMotionTwist = 0;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 0;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 0;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 5.f;
|
||||
break;
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_END:
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_TUP_END:
|
||||
case PLAYER_JOINT_ORDER::ORIGIN_TO_LUP_END:
|
||||
m_JointDescriptions[i].iMotionTwist = 0;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 0;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 0;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 5.f;
|
||||
break;
|
||||
|
||||
|
||||
/* From_Middle */
|
||||
case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_START:
|
||||
case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_START:
|
||||
case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_START:
|
||||
m_JointDescriptions[i].iMotionTwist = 0;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 0;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 0;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 10.f;
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_ORDER::RUP_TO_RMIDDLE_END:
|
||||
case PLAYER_JOINT_ORDER::TUP_TO_TMIDDLE_END:
|
||||
case PLAYER_JOINT_ORDER::LUP_TO_LMIDDLE_END:
|
||||
m_JointDescriptions[i].iMotionTwist = 1;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 1;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 1;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 0.f;
|
||||
|
||||
m_JointDescriptions[i].bEnableSlerpDrive = true;
|
||||
m_JointDescriptions[i].fLinearStiffness = 10.f;
|
||||
m_JointDescriptions[i].fSlerpDamping = 3.f;
|
||||
m_JointDescriptions[i].fSlerpForceLimit = 40.f;
|
||||
m_JointDescriptions[i].bSlerpAccel = true;
|
||||
break;
|
||||
|
||||
|
||||
/* From_Lower */
|
||||
case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_START:
|
||||
case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_START:
|
||||
m_JointDescriptions[i].iMotionTwist = 1;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 1;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 1;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 15.f;
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_ORDER::RMIDDLE_TO_R_END:
|
||||
case PLAYER_JOINT_ORDER::RMIDDLE_TO_RR_END:
|
||||
break;
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_START:
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_START:
|
||||
m_JointDescriptions[i].iMotionTwist = 1;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 1;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 1;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 15.f;
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TR_END:
|
||||
case PLAYER_JOINT_ORDER::TMIDDLE_TO_TL_END:
|
||||
break;
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_START:
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_START:
|
||||
m_JointDescriptions[i].iMotionTwist = 1;
|
||||
m_JointDescriptions[i].iMotionSwing1 = 1;
|
||||
m_JointDescriptions[i].iMotionSwing2 = 1;
|
||||
m_JointDescriptions[i].fLinearLimit = 0.f;
|
||||
m_JointDescriptions[i].fTwistAbsDeg = 15.f;
|
||||
m_JointDescriptions[i].fSwingDeg = 15.f;
|
||||
break;
|
||||
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_TO_L_END:
|
||||
case PLAYER_JOINT_ORDER::LMIDDLE_TO_LL_END:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_JointDescriptions[i].ApplyToJoint(*m_pDynamicJoints[i]);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
{
|
||||
_vector vColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x00ff00, 1.f);
|
||||
@@ -226,13 +328,6 @@ HRESULT CPlayerRobe::Render_BonePhysX()
|
||||
});
|
||||
Render_Legs();
|
||||
_vector vRouteColor = CMyTools::ColorRGB_A_HEXtoVECTOR(0x0000ff, 1.f);
|
||||
//for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
// if (nullptr != m_pRobeJointRoute[i]) {
|
||||
// m_pRobeJointRoute[i]->Render([this]() {
|
||||
// m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END); ++i) {
|
||||
m_pRobeJointAnchor[i]->Render([this]() {
|
||||
m_pContext->OMSetDepthStencilState(m_pDepthStencilStateNone, 0);
|
||||
@@ -272,6 +367,22 @@ HRESULT CPlayerRobe::Ready_Components()
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower0Bound, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ //
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
Desc.iSubKind = ENUM_CLASS(PXOBJECT::LEG);
|
||||
Desc.bAutoOwnerTranslation = false;
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("PHYSX_Player_LowerBound"), (CComponent**)&m_pLower1Bound, &Desc))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
{ // RobeSocket
|
||||
{ // Fixed_MainAnchor
|
||||
CRigidBody_Dynamic::RIGIDBODY_DYNAMIC_DESC Desc{};
|
||||
@@ -326,11 +437,11 @@ HRESULT CPlayerRobe::Ready_Components()
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -351,11 +462,11 @@ HRESULT CPlayerRobe::Ready_Components()
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -376,11 +487,11 @@ HRESULT CPlayerRobe::Ready_Components()
|
||||
PSX::PxRigidDynamic* routeRigidActor = m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_Actor();
|
||||
PSX::PxRigidDynamic* endAnchorRigidActor = m_pRobeJointAnchor[Desc_Route.iEndBoneIndex]->Get_Actor();
|
||||
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::MakeJointWorldPoseFromRouteEnd(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
PSX::PxTransform startJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), false); // start y--
|
||||
PSX::PxTransform endJointWorldPose = CMyTools::Calc_JointPosFromRoute(routeRigidActor, m_pRobeJointRoute[Desc_Route.iTargetRouteIndex]->Get_HalfGeometryInfo(), true); // end y++
|
||||
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_PxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_PxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iStartJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(startAnchorRigidActor, routeRigidActor, startJointWorldPose);
|
||||
m_pDynamicJoints[Desc_Route.iEndJointIndex] = m_pGameInstance->Create_BasicPxD6Joint(routeRigidActor, endAnchorRigidActor, endJointWorldPose);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -555,6 +666,14 @@ HRESULT CPlayerRobe::Initialize(void* pArg)
|
||||
if (FAILED(Ready_Components())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
D6JOINTDESC JointDesc = D6JOINTDESC();
|
||||
for (_uint i = ENUM_CLASS(PLAYER_JOINT_ORDER::ORIGIN_TO_RUP_START); i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
JointDesc.ApplyToJoint(*m_pDynamicJoints[i]);
|
||||
m_JointDescriptions[i] = JointDesc;
|
||||
}
|
||||
Update_RobeJoints();
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_pSubShape = (GeometricPrimitive::CreateSphere(m_pContext, 0.05f, 22, false, false));
|
||||
m_pMainShape = (GeometricPrimitive::CreateCylinder(m_pContext, 0.3f, 0.075f, 22, false));
|
||||
@@ -605,6 +724,8 @@ void CPlayerRobe::Free()
|
||||
SAFE_RELEASE(m_pDepthStencilStateNone);
|
||||
#endif // _DEBUG
|
||||
SAFE_RELEASE(m_pRightLeg);
|
||||
SAFE_RELEASE(m_pLower0Bound);
|
||||
SAFE_RELEASE(m_pLower1Bound);
|
||||
SAFE_RELEASE(m_pLeftLeg);
|
||||
SAFE_RELEASE(m_pRobeMainAnchor);
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END); ++i) {
|
||||
@@ -621,11 +742,24 @@ void CPlayerRobe::Describe_Entity()
|
||||
GUI::Begin("PhysX");
|
||||
if (GUI::CollapsingHeader("Robe")) {
|
||||
for (_uint i = 0; i < ENUM_CLASS(PLAYER_JOINT_ORDER::END); ++i) {
|
||||
if (GUI::BeginChild(("Child ID: " + to_string((size_t)(this))).c_str())) {
|
||||
|
||||
_uint iActor0 = i;
|
||||
if (GUI::TreeNode(("Child ID: " + to_string(iActor0)).c_str())) {
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
PSX::PxTransform pxDrivePos0 = m_pDynamicJoints[iActor0]->getDrivePosition();
|
||||
if (true == CMyTools::DescribePxTransform(pxDrivePos0, iActor0)) {
|
||||
m_pDynamicJoints[iActor0]->setDrivePosition(pxDrivePos0);
|
||||
}
|
||||
{
|
||||
_bool bModified = false;
|
||||
if (CMyTools::Modify_D6Joint(*m_pDynamicJoints[iActor0], iActor0)) {
|
||||
bModified = true;
|
||||
}
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
GUI::EndChild();
|
||||
}
|
||||
m_pLower0Bound->Describe_Entity();
|
||||
m_pLower1Bound->Describe_Entity();
|
||||
}
|
||||
GUI::End();
|
||||
}
|
||||
|
||||
@@ -448,6 +448,13 @@ HRESULT CRanrok::Render_Nonblend()
|
||||
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_pModelCom->Bind_Material(i, m_pShaderCom))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ void CTerrain::Free()
|
||||
void CTerrain::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("Renderer", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
size_t iIndex = (size_t)this;
|
||||
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ void CTroll_Rock::Free()
|
||||
void CTroll_Rock::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("UNIT", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("TrollRock")) {
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ class CMapElement_Chest final : public CMapElement
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
|
||||
private:
|
||||
ELEMENT_INTERACTABLE_ID m_eInteractableID = { ELEMENT_INTERACTABLE_ID::END };
|
||||
@@ -46,6 +47,9 @@ class CMapElement_Chest final : public CMapElement
|
||||
|
||||
_uint m_iShaderPass_Index = {};
|
||||
|
||||
_int m_iEntered = { 0 };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 3.f };
|
||||
_float m_fTimeAcc = {};
|
||||
_float m_fRimLightPower = { 0.7f };
|
||||
_float m_fRimLightStrength = { 3.7f };
|
||||
@@ -53,7 +57,7 @@ class CMapElement_Chest final : public CMapElement
|
||||
_float4 m_vRimLightColor = { 0.71f, 0.39f, 0.02f, 1.f };
|
||||
|
||||
CTexture* m_pNoiseTextureCom = { nullptr };
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
|
||||
class CMapElement_Chest_Lid* m_pLid = { nullptr };
|
||||
|
||||
@@ -22,20 +22,20 @@ class CMapElement_Door final : public CMapElement
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta) override;
|
||||
void ActingIdle();
|
||||
virtual void Update(_float fTimeDelta) override;
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual void OnCollision(CGameObject* pOther, void* pDesc)override;
|
||||
|
||||
private:
|
||||
|
||||
CRigidBody* m_pRigidBody = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
PSX::PxRigidDynamic* m_pActor = { nullptr };
|
||||
PSX::PxRevoluteJoint* m_pJoint = { nullptr };
|
||||
|
||||
_float3 m_vRadianYAngle = {};
|
||||
_float3 m_vKinematicTimer = { 0.f, 2.f, 2.3f };
|
||||
PSX::PxQuat m_pxStartQuat = {};
|
||||
_float4x4 m_InitialMatrix = {};
|
||||
|
||||
_bool m_bDrive = { false };
|
||||
#ifdef _DEBUG
|
||||
_bool m_bUseSelectColor = { true };
|
||||
|
||||
@@ -50,9 +50,6 @@ class CMapElement_Door final : public CMapElement
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
void Lerp_Matrix(_float fTime);
|
||||
void Lerp_NonMatrix(_float fTime);
|
||||
_float ClampRadian(_float fNewRadian);
|
||||
|
||||
public:
|
||||
static CMapElement_Door* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -23,23 +23,24 @@ class CNPC_EleazarFig final : public CUnit
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
|
||||
|
||||
_bool m_bEntered = { false };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 10.f };
|
||||
_int m_iEntered = { 0 };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 3.f };
|
||||
protected:
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
_bool CastToPlayer();
|
||||
|
||||
public:
|
||||
static CNPC_EleazarFig* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -24,9 +24,11 @@ class CNPC_Ollivander final : public CUnit
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
virtual HRESULT Render_Shadow(SHADOW eType) override;
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)override;
|
||||
protected:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
class CCallBack_NonPlayable_Behavior* m_pCallBack_Behavior = { nullptr };
|
||||
class CCallBack_NonPlayable_HitReport* m_pCallBack_HitReport = { nullptr };
|
||||
CUnit* m_pPlayerAllyUnit = { nullptr };
|
||||
@@ -35,7 +37,7 @@ class CNPC_Ollivander final : public CUnit
|
||||
class CNPCInteraction* m_pNPCInteraction = { nullptr };
|
||||
|
||||
CNPCStat* m_pNpcStat = { nullptr };
|
||||
_bool m_bEntered = { false };
|
||||
_int m_iEntered = { 0 };
|
||||
_float2 m_vEnteringTimer = { 0.f, 1.f };
|
||||
_float m_fEncounterDistance = { 3.f };
|
||||
protected:
|
||||
@@ -43,7 +45,6 @@ class CNPC_Ollivander final : public CUnit
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
HRESULT Ready_Components(void* pArg);
|
||||
HRESULT Bind_ShaderResources() override;
|
||||
_bool CastToPlayer();
|
||||
|
||||
public:
|
||||
static CNPC_Ollivander* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -35,13 +35,14 @@ class CPlayer final : public CUnit
|
||||
void Set_RaceRing(class CRaceRing* pRaceRing);
|
||||
class CBroom* Get_Broom() { return m_pBroom; }
|
||||
void Set_RaceInfo();
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
_bool Set_Sprint(_bool bSprint) { m_bSprintToggle = bSprint; }
|
||||
_matrix Get_WandPos();
|
||||
void UpdateGrapInteractive(_float fTimeDelta);
|
||||
void Update_CameraShake(_float fTimeDelta);
|
||||
HRESULT Update_RaycastElements();
|
||||
#ifdef _DEBUG
|
||||
void Render_CameraCoordinateSystem();
|
||||
#endif // _DEBUG
|
||||
private:
|
||||
CInfoInstance* m_pInfoInstance = { nullptr };
|
||||
LOCKON_INFO m_LockOnInfo = {};
|
||||
@@ -65,6 +66,8 @@ class CPlayer final : public CUnit
|
||||
|
||||
class CCamPosition_Shoulder* m_pCamPosition_ShoulderPart = { nullptr };
|
||||
class CCamPosition_Head* m_pCamPosition_HeadPart = { nullptr };
|
||||
_float m_fRayDistance = { 10.f };
|
||||
_uint m_iRayHitCount = { 0 };
|
||||
|
||||
CCharacter_Controller* m_pCharacter_Controller = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRigidBody = { nullptr };
|
||||
|
||||
@@ -33,7 +33,6 @@ class CPlayerRobe final : public CPartObject
|
||||
virtual void Late_Update(_float fTimeDelta) override;
|
||||
virtual HRESULT Render() override;
|
||||
HRESULT Update_RobeSocketPosition();
|
||||
HRESULT Bind_PrevBoneMatrices(CShader* pShader, const _char* pConstant);
|
||||
vector<_float4x4> Get_RobeJointAnchorMatrix() const { return m_ReconstructedJointAnchorMatirces; }
|
||||
_float4x4 Get_RobeJointAnchorMatrix(_uint iIndex) const { return m_ReconstructedJointAnchorMatirces[iIndex]; }
|
||||
private:
|
||||
@@ -51,10 +50,13 @@ class CPlayerRobe final : public CPartObject
|
||||
_int m_iBoneNum = -1;
|
||||
CRigidBody_Dynamic* m_pRightLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLeftLeg = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLower0Bound = { nullptr };
|
||||
CRigidBody_Dynamic* m_pLower1Bound = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeMainAnchor = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointRoute[ENUM_CLASS(PLAYER_JOINT_ROUTE_ORDER::END)] = { nullptr };
|
||||
CRigidBody_Dynamic* m_pRobeJointAnchor[ENUM_CLASS(PLAYER_JOINT_BONE_ORDER::END)] = { nullptr };
|
||||
PSX::PxD6Joint* m_pDynamicJoints[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { nullptr };
|
||||
D6JOINTDESC m_JointDescriptions[ENUM_CLASS(PLAYER_JOINT_ORDER::END)] = { };
|
||||
|
||||
vector<_float4x4> m_PrevRobeBoneMatrices = { };
|
||||
#ifdef _DEBUG
|
||||
@@ -75,6 +77,7 @@ class CPlayerRobe final : public CPartObject
|
||||
#ifdef _DEBUG
|
||||
HRESULT Render_BonePhysX();
|
||||
HRESULT Render_Legs();
|
||||
HRESULT Update_RobeJoints();
|
||||
#endif // _DEBUG
|
||||
public:
|
||||
static CPlayerRobe* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -88,6 +88,7 @@ float g_fMBSampleBias;
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
float g_fLightSpecularMaximum;
|
||||
|
||||
float g_fFogDensity;
|
||||
float g_fFogPow;
|
||||
@@ -483,7 +484,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
@@ -569,7 +570,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
@@ -670,7 +671,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
|
||||
@@ -541,7 +541,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE_READ(PS_IN In)
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, fRim);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4((In.vProjPos.z / In.vProjPos.w),
|
||||
(In.vProjPos.w / g_fFar),
|
||||
|
||||
@@ -473,7 +473,7 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, 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
|
||||
|
||||
@@ -694,8 +694,8 @@ PS_OUT_OUTLINE PS_MAIN_OUTLINE(PS_IN_OUTLINE In)
|
||||
float fNdotV = saturate(dot(vNormal, vToView));
|
||||
float fRim = saturate((1.0f - fNdotV) * g_fOutLineScale);
|
||||
fRim = pow(fRim, g_fOutLinePower);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb, fRim);
|
||||
|
||||
Out.vAlbedo = float4(g_vOutLineColor.rgb * 5.f, 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
|
||||
|
||||
@@ -130,7 +130,7 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
||||
|
||||
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" , "DISTORTION" , "EMISSIVE"};
|
||||
|
||||
if (ImGui::Combo("OPTION", &m_iSelectTextureNum, pCompute, 6))
|
||||
if (GUI::Combo("OPTION", &m_iSelectTextureNum, pCompute, 6))
|
||||
{
|
||||
}
|
||||
switch (m_iSelectTextureNum)
|
||||
@@ -481,18 +481,18 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
}
|
||||
|
||||
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
if (GUI::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
{
|
||||
m_EffectInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||
}
|
||||
|
||||
|
||||
if (ImGui::Combo("Effect Type", &iCurrentType, pEffectType, ENUM_CLASS(EFFECT_TYPE::END)))
|
||||
if (GUI::Combo("Effect Type", &iCurrentType, pEffectType, ENUM_CLASS(EFFECT_TYPE::END)))
|
||||
{
|
||||
m_EffectInfo.eEffectType = static_cast<EFFECT_TYPE>(iCurrentType);
|
||||
}
|
||||
|
||||
if (ImGui::Combo("Shader Pass", &iCurrentPass, pShaderPass, ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::END)))
|
||||
if (GUI::Combo("Shader Pass", &iCurrentPass, pShaderPass, ENUM_CLASS(SHADER_PASS_INSTANCE_MODEL::END)))
|
||||
{
|
||||
m_EffectInfo.eShaderPass = static_cast<SHADER_PASS_INSTANCE_MODEL>(iCurrentPass);
|
||||
}
|
||||
@@ -522,11 +522,11 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::ColorEdit4("MixColor", (_float*)&m_EffectInfo.vColor);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
|
||||
m_pShaderCom->Describe_Entity();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
|
||||
|
||||
@@ -539,13 +539,13 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("BlurNoEmissive", &m_EffectInfo.isBlurNoEmissive);
|
||||
GUI::Checkbox("BlurDissolve", &m_EffectInfo.isBlurDissolve);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("BlurIntensity", &m_EffectInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_EffectInfo.iBlurWeight, 2.f, 0, 128);
|
||||
|
||||
|
||||
GUI::Checkbox("BlurColor", &m_EffectInfo.isBlurColor);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
GUI::ColorEdit4("BlurColor", (_float*)&m_EffectInfo.vBlurColor);
|
||||
|
||||
GUI::TreePop();
|
||||
@@ -564,7 +564,7 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("BLOOM"))
|
||||
{
|
||||
if (ImGui::Combo("Bloom Type", &iCurrentBloomType, pBloomType, ENUM_CLASS(BLOOM_TYPE::END)))
|
||||
if (GUI::Combo("Bloom Type", &iCurrentBloomType, pBloomType, ENUM_CLASS(BLOOM_TYPE::END)))
|
||||
{
|
||||
m_EffectInfo.eBloomType = static_cast<BLOOM_TYPE>(iCurrentBloomType);
|
||||
}
|
||||
@@ -572,9 +572,9 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("BloomDissolve", &m_EffectInfo.isBloomDissolve);
|
||||
GUI::Checkbox("BloomReverseDissolve", &m_EffectInfo.isBloomReverseDissolve);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("fBloomStrength", &m_EffectInfo.fBloomStrength, 0.001f, 0.f);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
@@ -589,7 +589,7 @@ void CEditEffect::Describe_Entity()
|
||||
if (GUI::TreeNode("EMISSIVE"))
|
||||
{
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("EmissiveStrength", &m_EffectInfo.fEmissiveStrength, 0.005f, 0.f, 1.f);
|
||||
GUI::DragFloat("Radius", &m_EffectInfo.fRadius, 0.005f , 0.f);
|
||||
GUI::DragFloat("CoreBoost", &m_EffectInfo.fCoreBoost, 0.005f , 0.f);
|
||||
@@ -597,7 +597,7 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::DragFloat("SoftenExp", &m_EffectInfo.fSoftenExp, 0.005f , 0.f);
|
||||
GUI::DragFloat("EmissiveColorCut", &m_EffectInfo.fEmissiveColorCut, 0.005f , 0.f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
GUI::ColorEdit4("Emissive", (_float*)&m_EffectInfo.vEmissive);
|
||||
|
||||
@@ -731,7 +731,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::DragFloat("Diffuse Alpha", &m_EffectInfo.fDiffuseAlpha , 0.01f, 0.f, 1.f);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::Checkbox("DiffuseUVMove", &m_EffectInfo.isDiffuseUVMove);
|
||||
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_EffectInfo.vUVCutting);
|
||||
|
||||
@@ -743,14 +743,14 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
_int iDiffuseMoveLerpOption = (_int)m_EffectInfo.iDiffuseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_EffectInfo.iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("DIFFUSE_TEX"))
|
||||
{
|
||||
@@ -794,14 +794,14 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("MaskUVMove", &m_EffectInfo.isMaskUVMove);
|
||||
GUI::Checkbox("MaskClampSample", &m_EffectInfo.isMaskClampSample);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat2("MaskOffset", (_float*)&m_EffectInfo.vMaskOffset, 0.01f);
|
||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_EffectInfo.vMaskingUVGainAmount, 0.01f);
|
||||
GUI::Spacing();
|
||||
GUI::DragFloat("SoftMask", &m_EffectInfo.fSoftMask, 0.01f, 0.f);
|
||||
GUI::DragFloat("fSoftMaskEdge", &m_EffectInfo.fSoftMaskEdge, 0.01f, 0.f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
|
||||
GUI::Spacing();
|
||||
@@ -809,7 +809,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
_int iMaskMoveLerpOption = (_int)m_EffectInfo.iMaskMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_EffectInfo.iMaskMoveLerpOption = iMaskMoveLerpOption;
|
||||
}
|
||||
@@ -856,7 +856,7 @@ void CEditEffect::Describe_Entity()
|
||||
GUI::Checkbox("StopDissolveSmoothStep", &m_EffectInfo.isNoDissolveSmoothStep);
|
||||
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::Spacing();
|
||||
GUI::Checkbox("DissolveMove", &m_EffectInfo.isDissolveMove);
|
||||
GUI::DragFloat2("DissolveUVGainAmount", (_float*)&m_EffectInfo.vDissolveUVGainAmount, 0.01f);
|
||||
@@ -873,7 +873,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("DISSOLV_TEX"))
|
||||
{
|
||||
@@ -904,7 +904,7 @@ void CEditEffect::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("DISTORTION"))
|
||||
{
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
|
||||
GUI::DragFloat("DistortionIntensity", &m_EffectInfo.fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||
|
||||
@@ -914,7 +914,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
_int iDiffuseNoiseMoveLerpOption = (_int)m_EffectInfo.iDiffuseDistortionMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("LerpDiffuseDistortionMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("LerpDiffuseDistortionMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_EffectInfo.iDiffuseDistortionMoveLerpOption = iDiffuseNoiseMoveLerpOption;
|
||||
}
|
||||
@@ -925,14 +925,14 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
_int iMaskNoiseMoveLerpOption = (_int)m_EffectInfo.iMaskDistortionMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp MaskDistortionMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Lerp MaskDistortionMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_EffectInfo.iMaskDistortionMoveLerpOption = iMaskNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("DISTORTION_TEX"))
|
||||
{
|
||||
@@ -977,11 +977,11 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
|
||||
GUI::ColorEdit4("NoiseColor", (_float*)&m_EffectInfo.vNoiseColor);
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat2("NoiseUVGainAmount", (_float*)&m_EffectInfo.vNoiseUVGainAmount, 0.01f);
|
||||
GUI::DragFloat2("UVNoiseCutting", (_float*)&m_EffectInfo.vUVNoiseCutting, 0.01f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
|
||||
GUI::Spacing();
|
||||
@@ -989,7 +989,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
_int iNoiseMoveLerpOption = (_int)m_EffectInfo.iNoiseMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Lerp NoiseMove Option", &iNoiseMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Lerp NoiseMove Option", &iNoiseMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
m_EffectInfo.iNoiseMoveLerpOption = iNoiseMoveLerpOption;
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ void CEffect_Editor::Free()
|
||||
|
||||
void CEffect_Editor::Describe_Entity()
|
||||
{
|
||||
ImGui::Begin("Effect Editor");
|
||||
GUI::Begin("Effect Editor");
|
||||
|
||||
GUI::TextColored(ImVec4(1.f, 0.f, 1.f, 1.f), m_strCurrentEffectName.c_str());
|
||||
|
||||
@@ -566,27 +566,27 @@ void CEffect_Editor::Describe_Entity()
|
||||
GUI::Checkbox("TRAIL WAND POS", &m_isWandPos);
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
GUI::End();
|
||||
|
||||
ImGui::Begin("Reference Material");
|
||||
GUI::Begin("Reference Material");
|
||||
|
||||
if (m_pEditEffect != nullptr)
|
||||
m_pEditEffect->Reference_Mat_For_EditEffect();
|
||||
|
||||
|
||||
ImGui::End();
|
||||
GUI::End();
|
||||
|
||||
ImGui::Begin("Effect Hierarchy");
|
||||
GUI::Begin("Effect Hierarchy");
|
||||
|
||||
#pragma region PopUp
|
||||
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
|
||||
ImGui::OpenPopup("Effect Hierarchy");
|
||||
if (GUI::IsItemClicked(ImGuiMouseButton_Right))
|
||||
GUI::OpenPopup("Effect Hierarchy");
|
||||
|
||||
|
||||
if (ImGui::BeginPopup("Effect Hierarchy"))
|
||||
if (GUI::BeginPopup("Effect Hierarchy"))
|
||||
{
|
||||
if (ImGui::MenuItem("Create Effect"))
|
||||
if (GUI::MenuItem("Create Effect"))
|
||||
{
|
||||
|
||||
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||
@@ -595,12 +595,12 @@ void CEffect_Editor::Describe_Entity()
|
||||
|
||||
if (FAILED(Add_PartObject<CEditEffect>("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc)))
|
||||
{
|
||||
ImGui::EndPopup();
|
||||
GUI::EndPopup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::MenuItem("Create Trail"))
|
||||
if (GUI::MenuItem("Create Trail"))
|
||||
{
|
||||
|
||||
if (m_pTrailObject == nullptr)
|
||||
@@ -612,7 +612,7 @@ void CEffect_Editor::Describe_Entity()
|
||||
|
||||
if (FAILED(Add_PartObject<CTrailObject>("TrailObject", ENUM_CLASS(LEVEL::EFFECT), &m_pTrailObject, &PartsDesc)))
|
||||
{
|
||||
ImGui::EndPopup();
|
||||
GUI::EndPopup();
|
||||
}
|
||||
|
||||
CTrailObject* pTrailObject = m_pTrailObject;
|
||||
@@ -622,7 +622,7 @@ void CEffect_Editor::Describe_Entity()
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
GUI::EndPopup();
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
@@ -650,7 +650,7 @@ void CEffect_Editor::Describe_Entity()
|
||||
if (GUI::BeginPopup(strName.c_str()))
|
||||
{
|
||||
|
||||
if (ImGui::MenuItem("Delete Effect"))
|
||||
if (GUI::MenuItem("Delete Effect"))
|
||||
{
|
||||
auto iter = m_PartObjects.begin();
|
||||
advance(iter, iIndex); // 이터레이터를 증가시킨다
|
||||
@@ -708,9 +708,9 @@ void CEffect_Editor::Describe_Entity()
|
||||
|
||||
|
||||
|
||||
ImGui::End();
|
||||
GUI::End();
|
||||
|
||||
ImGui::Begin("Effect Save");
|
||||
GUI::Begin("Effect Save");
|
||||
|
||||
GUI::InputTextMultiline("FILE PATH", m_szBuffer, sizeof(m_szBuffer), ImVec2(250, 25));
|
||||
|
||||
@@ -803,7 +803,7 @@ void CEffect_Editor::Describe_Entity()
|
||||
|
||||
m_pEffectPool->Describe_Entity();
|
||||
|
||||
ImGui::End();
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -333,10 +333,10 @@ void CInstancedProp::Describe_Entity()
|
||||
#endif // _DEBUG
|
||||
_float3 vMove = {};
|
||||
|
||||
ImGui::Text("----- Transfrom ----");
|
||||
ImGui::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
GUI::Text("----- Transfrom ----");
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
|
||||
@@ -451,25 +451,25 @@ void CLevel_ObjectViewer::Dummy_Object_Setting()
|
||||
|
||||
_bool isSelected = (m_SelectedKey == keyName);
|
||||
|
||||
if (ImGui::Selectable(keyName.c_str(), isSelected))
|
||||
if (GUI::Selectable(keyName.c_str(), isSelected))
|
||||
{
|
||||
m_SelectedKey = keyName;
|
||||
}
|
||||
|
||||
if (isSelected)
|
||||
{
|
||||
ImGui::Indent();
|
||||
GUI::Indent();
|
||||
|
||||
ImGui::DragFloat("KeyFrame", &iter.second, 0.01f);
|
||||
GUI::DragFloat("KeyFrame", &iter.second, 0.01f);
|
||||
|
||||
if (ImGui::Button("Delete KeyFrame"))
|
||||
if (GUI::Button("Delete KeyFrame"))
|
||||
{
|
||||
m_KeyFrames.erase(keyName);
|
||||
m_SelectedKey.clear();
|
||||
break;
|
||||
}
|
||||
|
||||
ImGui::Unindent();
|
||||
GUI::Unindent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,8 +563,8 @@ void CLevel_ObjectViewer::Parts_Object_Setting()
|
||||
}
|
||||
for (auto& iter : m_KeyFrames)
|
||||
{
|
||||
ImDrawList* draw = ImGui::GetForegroundDrawList();
|
||||
ImVec2 center = ImGui::GetMainViewport()->GetCenter();
|
||||
ImDrawList* draw = GUI::GetForegroundDrawList();
|
||||
ImVec2 center = GUI::GetMainViewport()->GetCenter();
|
||||
float scale = 50.f;
|
||||
|
||||
GUI::DragFloat(iter.first.c_str(), &iter.second);
|
||||
|
||||
@@ -200,13 +200,13 @@ HRESULT CMainApp::Ready_Prototypes()
|
||||
HRESULT CMainApp::Ready_IMGUI()
|
||||
{
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO(); (void)io;
|
||||
GUI::CreateContext();
|
||||
ImGuiIO& io = GUI::GetIO(); (void)io;
|
||||
ImFont* font = nullptr;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
|
||||
|
||||
ImGui::StyleColorsDark();
|
||||
GUI::StyleColorsDark();
|
||||
|
||||
ImGui_ImplWin32_Init(g_hWnd);
|
||||
ImGui_ImplDX11_Init(m_pDevice, m_pContext);
|
||||
@@ -233,7 +233,7 @@ HRESULT CMainApp::Release_IMGUI()
|
||||
{
|
||||
ImGui_ImplDX11_Shutdown();
|
||||
ImGui_ImplWin32_Shutdown();
|
||||
ImGui::DestroyContext();
|
||||
GUI::DestroyContext();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -230,14 +230,14 @@ void CMapObject_Collision::Describe_Entity()
|
||||
if (nullptr == m_pGameInstance)
|
||||
return;
|
||||
|
||||
//ImGui::Text(CMyTools::ToString(m_strModelPrototypeTag).c_str());
|
||||
//GUI::Text(CMyTools::ToString(m_strModelPrototypeTag).c_str());
|
||||
GUI::Checkbox("Visible", &m_bVisible);
|
||||
_float3 vMove = {};
|
||||
|
||||
ImGui::Text("----- Transfrom ----");
|
||||
ImGui::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
ImGui::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
GUI::Text("----- Transfrom ----");
|
||||
GUI::InputFloat("Right", &vMove.x, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Up", &vMove.y, 0.05f, 0.1f);
|
||||
GUI::InputFloat("Look", &vMove.z, 0.05f, 0.1f);
|
||||
|
||||
m_pTransformCom->Move_Right(vMove.x);
|
||||
m_pTransformCom->Move_Up(vMove.y);
|
||||
@@ -254,22 +254,22 @@ void CMapObject_Collision::Describe_Entity()
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMLoadFloat3(&m_vPosition));
|
||||
}
|
||||
}
|
||||
ImGui::Text("----- Rotation ----");
|
||||
ImGui::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
ImGui::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
|
||||
ImGui::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
|
||||
GUI::Text("----- Rotation ----");
|
||||
GUI::InputFloat("X##Rotation", &m_vRotation.x, 10.f, 45.f);
|
||||
GUI::InputFloat("Y##Rotation", &m_vRotation.y, 10.f, 45.f);
|
||||
GUI::InputFloat("Z##Rotation", &m_vRotation.z, 10.f, 45.f);
|
||||
|
||||
ImGui::Text("----- Scale ----");
|
||||
ImGui::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
|
||||
ImGui::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
|
||||
ImGui::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
|
||||
GUI::Text("----- Scale ----");
|
||||
GUI::InputFloat("X##Scale", &m_vScale.x, 0.1f, 1.f);
|
||||
GUI::InputFloat("Y##Scale", &m_vScale.y, 0.1f, 1.f);
|
||||
GUI::InputFloat("Z##Scale", &m_vScale.z, 0.1f, 1.f);
|
||||
|
||||
m_vScale.x = max(0.01f, m_vScale.x);
|
||||
m_vScale.y = max(0.01f, m_vScale.y);
|
||||
m_vScale.z = max(0.01f, m_vScale.z);
|
||||
|
||||
|
||||
if (ImGui::Button("Delete"))
|
||||
if (GUI::Button("Delete"))
|
||||
m_bDead = true;
|
||||
|
||||
if (GUI::Button("Bake_StaticPhysXMesh")) {
|
||||
|
||||
@@ -2009,7 +2009,7 @@ void CMapObject_Manager::Update_PrototypeList()
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
|
||||
if (GUI::Button(CMyTools::ToString(Tag).c_str()))
|
||||
{
|
||||
if (ADD_TYPE::CONTAINER == m_eType)
|
||||
Create_PartObject(Tag);
|
||||
@@ -2029,7 +2029,7 @@ void CMapObject_Manager::Update_PrototypeList()
|
||||
auto& Tag = m_ModelPrototypeTags[i];
|
||||
|
||||
if (_wstring::npos != Tag.find(L"COL") && _wstring::npos == Tag.find(L"Lod")) {
|
||||
if (ImGui::Button(CMyTools::ToString(Tag).c_str()))
|
||||
if (GUI::Button(CMyTools::ToString(Tag).c_str()))
|
||||
{
|
||||
vector<_uint> LodModelIndices;
|
||||
|
||||
@@ -2084,7 +2084,7 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
|
||||
if (ADD_TYPE::CONTAINER == m_eType)
|
||||
{
|
||||
if (ImGui::CollapsingHeader("Map Objects", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
if (GUI::CollapsingHeader("Map Objects", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
if (false == m_MapObjects.empty())
|
||||
{
|
||||
@@ -2099,7 +2099,7 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
|
||||
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
|
||||
|
||||
if (ImGui::Button(strSrc.c_str()))
|
||||
if (GUI::Button(strSrc.c_str()))
|
||||
{
|
||||
m_pSelectObject = pCurrentMapObject;
|
||||
}
|
||||
@@ -2107,7 +2107,7 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
|
||||
}
|
||||
}
|
||||
if (ImGui::CollapsingHeader("COL", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
if (GUI::CollapsingHeader("COL", ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
for (auto pMapObject : m_Collision)
|
||||
{
|
||||
@@ -2120,7 +2120,7 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
|
||||
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
|
||||
|
||||
if (ImGui::Button(strSrc.c_str()))
|
||||
if (GUI::Button(strSrc.c_str()))
|
||||
{
|
||||
m_pSelectObject = pCurrentMapObject;
|
||||
}
|
||||
@@ -2155,7 +2155,7 @@ void CMapObject_Manager::Update_ObjectList()
|
||||
|
||||
strSrc = CMyTools::ToString(strPrototypeTag) + to_string(iObjectIndex) + "##" + to_string(iObjectIndex++);
|
||||
|
||||
if (ImGui::Button(strSrc.c_str()))
|
||||
if (GUI::Button(strSrc.c_str()))
|
||||
{
|
||||
m_pSelectElemnt = pCurrentMapObject;
|
||||
}
|
||||
|
||||
@@ -172,11 +172,11 @@ void CMonster::Free()
|
||||
void CMonster::Describe_Entity()
|
||||
{
|
||||
|
||||
if (ImGui::TreeNode("ANIM STATE")) {
|
||||
if (GUI::TreeNode("ANIM STATE")) {
|
||||
|
||||
for (auto& pState : m_States)
|
||||
{
|
||||
if (ImGui::Button(to_string(pState.first).c_str()))
|
||||
if (GUI::Button(to_string(pState.first).c_str()))
|
||||
{
|
||||
m_pFSM->Change_State(pState.first);
|
||||
}
|
||||
@@ -185,7 +185,7 @@ void CMonster::Describe_Entity()
|
||||
|
||||
GUI::Text(to_string(m_pModelCom->Get_CurrentTrackProgressRatio()).c_str());
|
||||
|
||||
ImGui::TreePop();
|
||||
GUI::TreePop();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -534,11 +534,11 @@ void CTrailObject::Describe_Entity()
|
||||
|
||||
if (GUI::TreeNode("TRAIL"))
|
||||
{
|
||||
if (ImGui::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
if (GUI::Combo("Render Order", &iCurrentItem, pRenderNames, ENUM_CLASS(RENDER::END)))
|
||||
{
|
||||
m_TrailInfo.eRenderOrder = static_cast<RENDER>(iCurrentItem);
|
||||
}
|
||||
if (ImGui::Combo("Shader Pass", &iCurrentPass, pShaderPass, ENUM_CLASS(SHADER_PASS_POSTEX::END)))
|
||||
if (GUI::Combo("Shader Pass", &iCurrentPass, pShaderPass, ENUM_CLASS(SHADER_PASS_POSTEX::END)))
|
||||
{
|
||||
m_TrailInfo.eShaderPass = static_cast<SHADER_PASS_POSTEX>(iCurrentPass);
|
||||
}
|
||||
@@ -586,10 +586,10 @@ void CTrailObject::Describe_Entity()
|
||||
GUI::Checkbox("Blur", &m_TrailInfo.isBlur);
|
||||
GUI::Checkbox("OnlyBlur", &m_TrailInfo.isOnlyBlur);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("BlurIntensity", &m_TrailInfo.fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::DragInt("BlurWeight", &m_TrailInfo.iBlurWeight, 2.f, 0, 128);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
@@ -599,7 +599,7 @@ void CTrailObject::Describe_Entity()
|
||||
{
|
||||
GUI::ColorEdit4("MixColor", (_float*)&m_TrailInfo.vEmissive);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
|
||||
GUI::DragFloat("EmissiveStrength", &m_TrailInfo.fEmissiveStrength, 0.01f, 0.f);
|
||||
GUI::DragFloat("SoftenExp", &m_TrailInfo.fSoftenExp, 0.01f, 0.f);
|
||||
@@ -607,7 +607,7 @@ void CTrailObject::Describe_Entity()
|
||||
GUI::DragFloat("CoreBoost", &m_TrailInfo.fCoreBoost, 0.01f, 0.f);
|
||||
GUI::DragFloat("Radius", &m_TrailInfo.fRadius, 0.01f, 0.f , 1.f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
GUI::TreePop();
|
||||
}
|
||||
@@ -616,7 +616,7 @@ void CTrailObject::Describe_Entity()
|
||||
{
|
||||
if (GUI::TreeNode("BLOOM"))
|
||||
{
|
||||
if (ImGui::Combo("Bloom Type", &iCurrentBloomType, pBloomType, ENUM_CLASS(BLOOM_TYPE::END)))
|
||||
if (GUI::Combo("Bloom Type", &iCurrentBloomType, pBloomType, ENUM_CLASS(BLOOM_TYPE::END)))
|
||||
{
|
||||
m_TrailInfo.eBloomType = static_cast<BLOOM_TYPE>(iCurrentBloomType);
|
||||
}
|
||||
@@ -624,7 +624,7 @@ void CTrailObject::Describe_Entity()
|
||||
GUI::Checkbox("BloomDissolve", &m_TrailInfo.isBloomDissolve);
|
||||
GUI::Checkbox("BloomReverseDissolve", &m_TrailInfo.isBloomReverseDissolve);
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("fBloomStrength", &m_TrailInfo.fBloomStrength, 0.001f, 0.f);
|
||||
GUI::DragFloat2("fBloomTime", (_float*)&m_TrailInfo.vBloomTime, 0.001f, 0.f);
|
||||
|
||||
@@ -639,9 +639,9 @@ void CTrailObject::Describe_Entity()
|
||||
{
|
||||
_string strName = {};
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("Diffuse Alpha", &m_TrailInfo.fDiffuseAlpha, 0.01f, 0.f, 1.f);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("DIFFUSE TEX"))
|
||||
{
|
||||
@@ -666,10 +666,10 @@ void CTrailObject::Describe_Entity()
|
||||
{
|
||||
_string strName = {};
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("SoftMask", &m_TrailInfo.fSoftMask, 0.01f, 0.f);
|
||||
GUI::DragFloat("fSoftMaskEdge", &m_TrailInfo.fSoftMaskEdge, 0.01f, 0.f);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("MASK TEX"))
|
||||
{
|
||||
@@ -693,11 +693,11 @@ void CTrailObject::Describe_Entity()
|
||||
{
|
||||
_string strName = {};
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::Checkbox("NoiseColor", &m_TrailInfo.isNoiseColor);
|
||||
GUI::Checkbox("NoiseAlpha", &m_TrailInfo.isNoiseAlpha);
|
||||
GUI::DragFloat("NoiseStrength", &m_TrailInfo.fNoiseStrength, 0.01f, 0.f);
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("NOISE TEX"))
|
||||
{
|
||||
@@ -725,14 +725,14 @@ void CTrailObject::Describe_Entity()
|
||||
_float2 vDiffuseDistortioUVAmount = {};
|
||||
_float2 vMaskDistortionUVAmount = {};
|
||||
|
||||
ImGui::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::DragFloat("DistortionIntensity", &m_TrailInfo.fDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||
GUI::InputFloat("DistortionTime", &m_TrailInfo.vDistortionTime.y, 0.1f, 0.f);
|
||||
|
||||
GUI::DragFloat2("DiffuseDistortionUVAmount", (_float*)&m_TrailInfo.vDiffuseDistortioUVAmount, 0.1f);
|
||||
GUI::DragFloat2("MaskDistortionUVAmount", (_float*)&m_TrailInfo.vMaskDistortionUVAmount, 0.1f);
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
GUI::PopItemWidth();
|
||||
|
||||
if (GUI::TreeNode("DISTORTION TEX"))
|
||||
{
|
||||
|
||||
@@ -88,6 +88,7 @@ float g_fMBSampleBias;
|
||||
vector g_vLightDiffuse;
|
||||
vector g_vLightAmbient;
|
||||
vector g_vLightSpecular;
|
||||
float g_fLightSpecularMaximum;
|
||||
|
||||
float g_fFogDensity;
|
||||
float g_fFogPow;
|
||||
@@ -483,7 +484,7 @@ PS_OUT_LIGHT PS_MAIN_DIRECTIONAL(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
@@ -569,7 +570,7 @@ PS_OUT_LIGHT PS_MAIN_POINT(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
@@ -670,7 +671,7 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
||||
|
||||
float3 vAmbient = g_vLightAmbient.rgb * fTotalOcclusion * fAttenuation;
|
||||
float3 vFinalDiffuse = PBR_Out.vShade + vAmbient;
|
||||
float3 vFinalSpecular = PBR_Out.vSpecular * g_vLightSpecular.rgb;
|
||||
float3 vFinalSpecular = clamp(PBR_Out.vSpecular, 0.f, g_fLightSpecularMaximum) * g_vLightSpecular.rgb;
|
||||
|
||||
Out.vShade = float4(vFinalDiffuse, 1.f);
|
||||
Out.vSpecular = float4(vFinalSpecular, 0.f);
|
||||
|
||||
@@ -451,7 +451,7 @@ void CCharacter_Controller::Free()
|
||||
#ifdef _DEBUG
|
||||
void CCharacter_Controller::Describe_Entity()
|
||||
{
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Character_Controller") ){
|
||||
GUI::Text("Gravity : %d ", m_bGravity);
|
||||
m_pTransform->Describe_Entity();
|
||||
|
||||
@@ -20,7 +20,7 @@ HRESULT CDynamic_D6Joint::Initialize_Prototype()
|
||||
HRESULT CDynamic_D6Joint::Initialize(void* pArg)
|
||||
{
|
||||
DYNAMICJOINT_DESC* pDesc = static_cast<DYNAMICJOINT_DESC*>(pArg);
|
||||
m_pJoint = m_pGameInstance->Create_PxD6Joint(pDesc->pActor0, pDesc->pActor1, *pDesc->pxJointWorldPos);
|
||||
m_pJoint = m_pGameInstance->Create_BasicPxD6Joint(pDesc->pActor0, pDesc->pActor1, *pDesc->pxJointWorldPos);
|
||||
return S_OK;
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
@@ -53,7 +53,7 @@ HRESULT CGameInstance::Initialize_Engine(const ENGINE_DESC& EngineDesc, ID3D11De
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
#ifdef 기무리
|
||||
m_pThreadHolder = CThreadHolder::Create(12);
|
||||
m_pThreadHolder = CThreadHolder::Create(8);
|
||||
#elif Bin
|
||||
m_pThreadHolder = CThreadHolder::Create(8);
|
||||
#else
|
||||
@@ -396,7 +396,7 @@ void CGameInstance::Compute_FrameCount()
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
void CGameInstance::Present_TimeCost() const
|
||||
void CGameInstance::Present_TimeCost()
|
||||
{
|
||||
#pragma region TimeCost
|
||||
#ifdef _DEBUG
|
||||
@@ -409,7 +409,7 @@ void CGameInstance::Present_TimeCost() const
|
||||
+ m_fTimer_PhysX
|
||||
+ m_fTimer_Level;
|
||||
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
GUI::Begin("Previous_Frame_Timer", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
|
||||
if (GUI::CollapsingHeader("Detail"))
|
||||
@@ -444,138 +444,148 @@ void CGameInstance::Present_TimeCost() const
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Level %d", int(m_fTimer_Level / fTotal * 100.f));
|
||||
}
|
||||
if (GUI::IsPopupOpen("Renderer_Timer"))
|
||||
if (GUI::Button("Renderer_Timer"))
|
||||
{
|
||||
if (GUI::BeginPopup("Renderer_Timer")) {
|
||||
_float fRenderer_Total = m_fTimer_Render_Priority
|
||||
+ m_fTimer_Render_Shadow
|
||||
+ m_fTimer_Render_NonBlend
|
||||
+ m_fTimer_Render_SSAO
|
||||
+ m_fTimer_Render_SSAO_BLUR
|
||||
+ m_fTimer_Render_LightAcc
|
||||
+ m_fTimer_Render_Blur
|
||||
+ m_fTimer_Render_Combined
|
||||
+ m_fTimer_Render_Occlusion
|
||||
+ m_fTimer_Render_EnvironmentPostProcess
|
||||
+ m_fTimer_Render_Fog
|
||||
+ m_fTimer_Render_Effect
|
||||
+ m_fTimer_Render_NonLight
|
||||
+ m_fTimer_Render_Blend
|
||||
+ m_fTimer_Render_WeightBlend
|
||||
+ m_fTimer_Render_PostProcessing
|
||||
+ m_fTimer_Render_LastColor
|
||||
+ m_fTimer_Render_Tone_Mapping
|
||||
+ m_fTimer_Render_UI
|
||||
+ m_fTimer_Render_UI_Overley;
|
||||
m_bRendererTimerOpen = !m_bRendererTimerOpen;
|
||||
}
|
||||
if (m_bRendererTimerOpen)
|
||||
{
|
||||
GUI::SetNextWindowSize(ImVec2(320.f, 0.f), ImGuiCond_FirstUseEver);
|
||||
|
||||
if (GUI::Begin("Renderer_Timer", &m_bRendererTimerOpen, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Priority / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Priority %d", int(m_fTimer_Render_Priority / fRenderer_Total * 100.f));
|
||||
_float fRenderer_Total = m_fTimer_Render_Priority
|
||||
+ m_fTimer_Render_Shadow
|
||||
+ m_fTimer_Render_NonBlend
|
||||
+ m_fTimer_Render_SSAO
|
||||
+ m_fTimer_Render_SSAO_BLUR
|
||||
+ m_fTimer_Render_LightAcc
|
||||
+ m_fTimer_Render_Blur
|
||||
+ m_fTimer_Render_Combined
|
||||
+ m_fTimer_Render_Occlusion
|
||||
+ m_fTimer_Render_EnvironmentPostProcess
|
||||
+ m_fTimer_Render_Fog
|
||||
+ m_fTimer_Render_Effect
|
||||
+ m_fTimer_Render_NonLight
|
||||
+ m_fTimer_Render_Blend
|
||||
+ m_fTimer_Render_WeightBlend
|
||||
+ m_fTimer_Render_PostProcessing
|
||||
+ m_fTimer_Render_LastColor
|
||||
+ m_fTimer_Render_Tone_Mapping
|
||||
+ m_fTimer_Render_UI
|
||||
+ m_fTimer_Render_UI_Overley;
|
||||
|
||||
// 0으로 나눔 방지
|
||||
if (fRenderer_Total <= FLT_EPSILON)
|
||||
fRenderer_Total = 1.f;
|
||||
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Priority / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Priority %d", int(m_fTimer_Render_Priority / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Shadow / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Shadow %d", int(m_fTimer_Render_Shadow / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonBlend %d", int(m_fTimer_Render_NonBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO %d", int(m_fTimer_Render_SSAO / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO_BLUR / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO_BLUR %d", int(m_fTimer_Render_SSAO_BLUR / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LightAcc / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LightAcc %d", int(m_fTimer_Render_LightAcc / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blur / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blur %d", int(m_fTimer_Render_Blur / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Combined / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Combined %d", int(m_fTimer_Render_Combined / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Occlusion / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Occlusion %d", int(m_fTimer_Render_Occlusion / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_EnvironmentPostProcess %d", int(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Fog / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Fog %d", int(m_fTimer_Render_Fog / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Effect / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Effect %d", int(m_fTimer_Render_Effect / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonLight / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonLight %d", int(m_fTimer_Render_NonLight / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blend %d", int(m_fTimer_Render_Blend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_WeightBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_WeightBlend %d", int(m_fTimer_Render_WeightBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_PostProcessing / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_PostProcessing %d", int(m_fTimer_Render_PostProcessing / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LastColor / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LastColor %d", int(m_fTimer_Render_LastColor / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Tone_Mapping / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Tone_Mapping %d", int(m_fTimer_Render_Tone_Mapping / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI %d", int(m_fTimer_Render_UI / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI_Overley / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI_Overley %d", int(m_fTimer_Render_UI_Overley / fRenderer_Total * 100.f));
|
||||
}
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Shadow / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Shadow %d", int(m_fTimer_Render_Shadow / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonBlend %d", int(m_fTimer_Render_NonBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO %d", int(m_fTimer_Render_SSAO / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_SSAO_BLUR / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_SSAO_BLUR %d", int(m_fTimer_Render_SSAO_BLUR / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LightAcc / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LightAcc %d", int(m_fTimer_Render_LightAcc / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blur / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blur %d", int(m_fTimer_Render_Blur / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Combined / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Combined %d", int(m_fTimer_Render_Combined / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Occlusion / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Occlusion %d", int(m_fTimer_Render_Occlusion / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_EnvironmentPostProcess %d", int(m_fTimer_Render_EnvironmentPostProcess / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Fog / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Fog %d", int(m_fTimer_Render_Fog / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Effect / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Effect %d", int(m_fTimer_Render_Effect / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_NonLight / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_NonLight %d", int(m_fTimer_Render_NonLight / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Blend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Blend %d", int(m_fTimer_Render_Blend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_WeightBlend / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_WeightBlend %d", int(m_fTimer_Render_WeightBlend / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_PostProcessing / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_PostProcessing %d", int(m_fTimer_Render_PostProcessing / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_LastColor / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_LastColor %d", int(m_fTimer_Render_LastColor / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_Tone_Mapping / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_Tone_Mapping %d", int(m_fTimer_Render_Tone_Mapping / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI %d", int(m_fTimer_Render_UI / fRenderer_Total * 100.f));
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_Render_UI_Overley / fRenderer_Total, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("Render_UI_Overley %d", int(m_fTimer_Render_UI_Overley / fRenderer_Total * 100.f));
|
||||
}
|
||||
GUI::EndPopup();
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
|
||||
}
|
||||
{
|
||||
GUI::ProgressBar(m_fTimer_DrawCall / fTotal, ImVec2(200.f, 0.f));
|
||||
GUI::SameLine();
|
||||
if (GUI::SmallButton("Renderer_Timer")) {
|
||||
GUI::OpenPopup("Renderer_Timer");
|
||||
}
|
||||
GUI::SameLine(0.f, GUI::GetStyle().ItemInnerSpacing.x);
|
||||
GUI::Text("DrawCall %d", int(m_fTimer_DrawCall / fTotal * 100.f));
|
||||
}
|
||||
@@ -1059,9 +1069,9 @@ PSX::PxJoint* CGameInstance::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor
|
||||
{
|
||||
return m_pPhysX_Manager->Create_PxJoint(eType, pActor0, pxLocalFrame0, pActor1, pxLocalFrame1);
|
||||
}
|
||||
PSX::PxD6Joint* CGameInstance::Create_PxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos)
|
||||
PSX::PxD6Joint* CGameInstance::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos)
|
||||
{
|
||||
return m_pPhysX_Manager->Create_PxD6Joint(pActor0, pActor1, pxJointWorldPos);
|
||||
return m_pPhysX_Manager->Create_BasicPxD6Joint(pActor0, pActor1, pxJointWorldPos);
|
||||
}
|
||||
_bool CGameInstance::SphereCast(_float fRadius, _float3 vStartPos, _float3 vDir, _float fDistance, PSX::PxHitFlags flagHitsData, PSX::PxQueryFlags flagQuery, PSX::PxSweepBuffer& hitBuffer)
|
||||
{
|
||||
|
||||
@@ -60,6 +60,9 @@ void CGameObject::OnCollision(CGameObject* pOther , void* pDesc)
|
||||
void CGameObject::OnHit(CGameObject* pOther, CGameObject* pCaller)
|
||||
{
|
||||
}
|
||||
void CGameObject::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
}
|
||||
_vector CGameObject::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
|
||||
@@ -876,14 +876,14 @@ void CInstance_Model::Free()
|
||||
|
||||
void CInstance_Model::Describe_Entity()
|
||||
{
|
||||
if (ImGui::TreeNode("Model Option"))
|
||||
if (GUI::TreeNode("Model Option"))
|
||||
{
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
|
||||
ImGui::Separator(); ImGui::Spacing();
|
||||
ImGui::PushItemWidth(120);
|
||||
GUI::Separator(); GUI::Spacing();
|
||||
GUI::PushItemWidth(120);
|
||||
|
||||
if (ImGui::InputInt("NumInstance", &m_InstanceDesc.iNumInstance))
|
||||
if (GUI::InputInt("NumInstance", &m_InstanceDesc.iNumInstance))
|
||||
{
|
||||
Change_NumInstance();
|
||||
}
|
||||
@@ -926,57 +926,57 @@ void CInstance_Model::Describe_Entity()
|
||||
if (GUI::TreeNode("Transform"))
|
||||
{
|
||||
|
||||
if (ImGui::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter)))
|
||||
if (GUI::DragFloat3("Center", reinterpret_cast<_float*>(&m_InstanceDesc.vCenter)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange)))
|
||||
if (GUI::DragFloat3("Range", reinterpret_cast<_float*>(&m_InstanceDesc.vRange)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin)))
|
||||
if (GUI::DragFloat3("SizeMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax)))
|
||||
if (GUI::DragFloat3("SizeMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin)))
|
||||
if (GUI::DragFloat3("RotationMin", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax)))
|
||||
if (GUI::DragFloat3("RotationMax", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationAngleMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("RoundRangeLength", reinterpret_cast<_float*>(&m_InstanceDesc.vRoundRangeLength)))
|
||||
if (GUI::DragFloat2("RoundRangeLength", reinterpret_cast<_float*>(&m_InstanceDesc.vRoundRangeLength)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("AzimuthAngle", reinterpret_cast<_float*>(& m_InstanceDesc.vAzimuthAngle)))
|
||||
if (GUI::DragFloat2("AzimuthAngle", reinterpret_cast<_float*>(& m_InstanceDesc.vAzimuthAngle)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("PolarAngle", reinterpret_cast<_float*>(&m_InstanceDesc.vPolarAngle)))
|
||||
if (GUI::DragFloat2("PolarAngle", reinterpret_cast<_float*>(&m_InstanceDesc.vPolarAngle)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("WolrdOffsetMin", reinterpret_cast<_float*>(&m_InstanceDesc.vWolrdOffsetMin)))
|
||||
if (GUI::DragFloat3("WolrdOffsetMin", reinterpret_cast<_float*>(&m_InstanceDesc.vWolrdOffsetMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("WolrdOffsetMax", reinterpret_cast<_float*>(&m_InstanceDesc.vWolrdOffsetMax)))
|
||||
if (GUI::DragFloat3("WolrdOffsetMax", reinterpret_cast<_float*>(&m_InstanceDesc.vWolrdOffsetMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -989,34 +989,34 @@ void CInstance_Model::Describe_Entity()
|
||||
{
|
||||
_int iMoveLerpOption = (_int)m_InstanceDesc.fMoveLerpOption;
|
||||
|
||||
if (ImGui::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Move Lerp Option", &iMoveLerpOption, pLerp, 9))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
m_InstanceDesc.fMoveLerpOption = (_float)iMoveLerpOption;
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed)))
|
||||
if (GUI::DragFloat2("Speed", reinterpret_cast<_float*>(&m_InstanceDesc.vSpeed)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag)))
|
||||
if (GUI::DragFloat2("Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vDrag)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration)))
|
||||
if (GUI::DragFloat2("Acceleration", reinterpret_cast<_float*>(&m_InstanceDesc.vAcceleration)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin)))
|
||||
if (GUI::DragFloat3("VelocityMin", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax)))
|
||||
if (GUI::DragFloat3("VelocityMax", reinterpret_cast<_float*>(&m_InstanceDesc.vVelocityMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1057,12 +1057,12 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin)))
|
||||
if (GUI::DragFloat3("PivotMin", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax)))
|
||||
if (GUI::DragFloat3("PivotMax", reinterpret_cast<_float*>(&m_InstanceDesc.vPivotMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1078,12 +1078,12 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity)))
|
||||
if (GUI::DragFloat2("Gravity", reinterpret_cast<_float*>(&m_InstanceDesc.vGravity)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation)))
|
||||
if (GUI::DragFloat2("DropAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vDropAttenuation)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1097,17 +1097,17 @@ void CInstance_Model::Describe_Entity()
|
||||
if (GUI::TreeNode("Rotate"))
|
||||
{
|
||||
|
||||
if (ImGui::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed)))
|
||||
if (GUI::DragFloat2("RotationSpeed", reinterpret_cast<_float*>(&m_InstanceDesc.vRotationSpeed)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("RotateAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttenuation)))
|
||||
if (GUI::DragFloat2("RotateAttenuation", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttenuation)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("RotateAttDelay", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttDelay)))
|
||||
if (GUI::DragFloat2("RotateAttDelay", reinterpret_cast<_float*>(&m_InstanceDesc.vRotateAttDelay)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1121,12 +1121,12 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin)))
|
||||
if (GUI::DragFloat3("DeltaAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax)))
|
||||
if (GUI::DragFloat3("DeltaAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAngleMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1146,12 +1146,12 @@ void CInstance_Model::Describe_Entity()
|
||||
|
||||
|
||||
|
||||
if (ImGui::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin)))
|
||||
if (GUI::DragFloat3("DeltaAxisAngleMin", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMin)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax)))
|
||||
if (GUI::DragFloat3("DeltaAxisAngleMax", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaAxisAngleMax)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1169,12 +1169,12 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount)))
|
||||
if (GUI::DragFloat3("SinWaveMin", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMinAmount)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount)))
|
||||
if (GUI::DragFloat3("SinWaveMax", reinterpret_cast<_float*>(&m_InstanceDesc.vSinMaxAmount)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1197,19 +1197,19 @@ void CInstance_Model::Describe_Entity()
|
||||
|
||||
_int iSizeLerpOption = (_int)m_InstanceDesc.fSizeLerpOption;
|
||||
|
||||
if (ImGui::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9))
|
||||
if (GUI::Combo("Size Lerp Option", &iSizeLerpOption, pLerp, 9))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
|
||||
m_InstanceDesc.fSizeLerpOption = (_float)iSizeLerpOption;
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize)))
|
||||
if (GUI::DragFloat3("LerpSizeAmount", reinterpret_cast<_float*>(&m_InstanceDesc.vDeltaSize)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag)))
|
||||
if (GUI::DragFloat2("Size Drag", reinterpret_cast<_float*>(&m_InstanceDesc.vSizeDrag)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1227,53 +1227,53 @@ void CInstance_Model::Describe_Entity()
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat("TimeMult", reinterpret_cast<_float*>(&m_InstanceDesc.fTimeMult)))
|
||||
if (GUI::DragFloat("TimeMult", reinterpret_cast<_float*>(&m_InstanceDesc.fTimeMult)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime)))
|
||||
if (GUI::DragFloat2("LifeTime", reinterpret_cast<_float*>(&m_InstanceDesc.vLifeTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay)))
|
||||
if (GUI::DragFloat2("Delay", reinterpret_cast<_float*>(&m_InstanceDesc.vDelay)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime)))
|
||||
if (GUI::DragFloat2("DiffuseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDiffuseUVMoveTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime)))
|
||||
if (GUI::DragFloat2("MaskingUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vMaskingUVMoveTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
|
||||
if (ImGui::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime)))
|
||||
if (GUI::DragFloat2("DistortionUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDistortionUVMoveTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime)))
|
||||
if (GUI::DragFloat2("NoiseUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vNoiseUVMoveTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("DissolveUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDissolveUVMoveTime)))
|
||||
if (GUI::DragFloat2("DissolveUVMoveTime", reinterpret_cast<_float*>(&m_InstanceDesc.vDissolveUVMoveTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime)))
|
||||
if (GUI::DragFloat2("AniTime", reinterpret_cast<_float*>(&m_InstanceDesc.vAniTime)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
|
||||
if (ImGui::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex)))
|
||||
if (GUI::DragFloat2("AniIndex", reinterpret_cast<_float*>(&m_InstanceDesc.vAniIndex)))
|
||||
{
|
||||
Instane_Buffer_ReStruct();
|
||||
}
|
||||
@@ -1302,11 +1302,11 @@ void CInstance_Model::Describe_Entity()
|
||||
|
||||
|
||||
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::TreePop();
|
||||
GUI::PopItemWidth();
|
||||
GUI::TreePop();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
GUI::Separator();
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
@@ -205,13 +205,13 @@ void CMouse_Manager::Free()
|
||||
void CMouse_Manager::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("Mouse_Manager")) {
|
||||
GUI::Text("AccumulateMomentum %.2f, %.2f", m_vMove.x, m_vMove.y);
|
||||
GUI::Text("CurPos %d, %d", m_ptCurrentMouseCur.x, m_ptCurrentMouseCur.y);
|
||||
GUI::Text("Lock %d", m_bLockMouseToCenter);
|
||||
POINT pt = Get_MouseViewPortPos();
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGuiIO& io = GUI::GetIO();
|
||||
GUI::Text("IMGUI MousePos: %.1f, %.1f", io.MousePos.x, io.MousePos.y);
|
||||
//io.MousePos = ImVec2((float)pt.x, (float)pt.y);
|
||||
GUI::Text("VPPOS: %d, %d", pt.x, pt.y);
|
||||
|
||||
@@ -177,7 +177,7 @@ PSX::PxJoint* CPhysX_Manager::Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActo
|
||||
return pOut;
|
||||
}
|
||||
|
||||
PSX::PxD6Joint* CPhysX_Manager::Create_PxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos)
|
||||
PSX::PxD6Joint* CPhysX_Manager::Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos)
|
||||
{
|
||||
const PSX::PxTransform pxWorldParentPos = pActor0->getGlobalPose();
|
||||
const PSX::PxTransform pxWorldChildPos = pActor1->getGlobalPose();
|
||||
@@ -206,12 +206,11 @@ PSX::PxD6Joint* CPhysX_Manager::Create_PxD6Joint(PSX::PxRigidDynamic* pActor0, P
|
||||
pJoint->setMotion(PSX::PxD6Axis::eSWING2, PSX::PxD6Motion::eLIMITED);
|
||||
|
||||
|
||||
pJoint->setTwistLimit(PSX::PxJointAngularLimitPair(-0.35f, 0.35f)); // 20도
|
||||
pJoint->setSwingLimit(PSX::PxJointLimitCone(0.10f, 0.10f)); // 40도
|
||||
pJoint->setTwistLimit(PSX::PxJointAngularLimitPair(-XMConvertToRadians(1.f), XMConvertToRadians(1.f))); // 20도
|
||||
pJoint->setSwingLimit(PSX::PxJointLimitCone(XMConvertToRadians(1.f), XMConvertToRadians(1.f)));
|
||||
|
||||
pJoint->setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(50.0f, 10.0f, FLT_MAX, true));
|
||||
pJoint->setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(50.0f, 100.0f, FLT_MAX, true));
|
||||
pJoint->setDrivePosition(PSX::PxTransform(PSX::PxIdentity)); //생성 시 프레임 기준
|
||||
//pJoint->setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(0.0f, 0.0f, 0.0f, false));
|
||||
|
||||
pJoint->setConstraintFlag(PSX::PxConstraintFlag::eVISUALIZATION, true);
|
||||
pJoint->setConstraintFlag(PSX::PxConstraintFlag::eIMPROVED_SLERP, true);
|
||||
|
||||
@@ -584,7 +584,7 @@ void CRenderTarget_Manager::RenderTarget_Debuger()
|
||||
|
||||
GUI::Spacing();
|
||||
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::Button("ToggleAll")) {
|
||||
Toggle_RT_Debugger();
|
||||
}
|
||||
|
||||
@@ -248,11 +248,11 @@ void CRenderer::Render_Shadow()
|
||||
m_pContext->RSSetViewports(1, &ViewPortDesc);
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::SHADOW_NEAR)]) {
|
||||
if (nullptr != pRenderObject) {
|
||||
if (FAILED(pRenderObject->Render_Shadow(SHADOW::SHADOW_NEAR))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
//if (nullptr != pRenderObject) {
|
||||
// if (FAILED(pRenderObject->Render_Shadow(SHADOW::SHADOW_NEAR))) {
|
||||
// assert(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
SAFE_RELEASE(pRenderObject);
|
||||
}
|
||||
@@ -282,11 +282,11 @@ void CRenderer::Render_Shadow()
|
||||
m_pContext->RSSetViewports(1, &ViewPortDesc);
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::SHADOW_MIDDLE)]) {
|
||||
if (nullptr != pRenderObject) {
|
||||
if (FAILED(pRenderObject->Render_Shadow(SHADOW::SHADOW_MIDDLE))) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
//if (nullptr != pRenderObject) {
|
||||
// if (FAILED(pRenderObject->Render_Shadow(SHADOW::SHADOW_MIDDLE))) {
|
||||
// assert(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
SAFE_RELEASE(pRenderObject);
|
||||
}
|
||||
@@ -372,6 +372,7 @@ void CRenderer::Render_LightAcc()
|
||||
m_pShader->Bind_Matrix("g_invmatProj", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV));
|
||||
m_pShader->Bind_RawValue("g_vCamPosition", m_pGameInstance->Get_CamPosition(), sizeof(_float4));
|
||||
m_pShader->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float));
|
||||
m_pShader->Bind_RawValue("g_fLightSpecularMaximum", &m_fLightSpecularMaximum, sizeof(_float));
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Diffuse"), m_pShader, "g_DiffuseTexture"))) {
|
||||
return;
|
||||
|
||||
@@ -633,6 +633,9 @@ void CRenderer::Describe_Entitiy()
|
||||
{
|
||||
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
if (GUI::CollapsingHeader("RENDERER")) {
|
||||
if (GUI::CollapsingHeader("Variable")) {
|
||||
GUI::DragFloat("SpecularMaximum", &m_fLightSpecularMaximum, 0.01f, 0.0f, 2.f, "%.3f");
|
||||
}
|
||||
if (GUI::CollapsingHeader("PostProcessing_Bloom"))
|
||||
{
|
||||
GUI::BeginChild("PostProcessing_Bloom");
|
||||
|
||||
@@ -127,24 +127,24 @@ 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()){
|
||||
filesystem::path pathRoot = pathFile.root_path();
|
||||
filesystem::path pathReleative = pathFile.relative_path();
|
||||
auto iterPath = pathReleative.begin();
|
||||
if (iterPath == pathReleative.end()){
|
||||
return E_FAIL;
|
||||
}
|
||||
else if ("MeshTable" != (*relativePathIterator).string()) {
|
||||
else if ("MeshTable" != (*iterPath).string()) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
++relativePathIterator;
|
||||
++iterPath;
|
||||
|
||||
std::filesystem::path outputPath = inputRootPath / "MeshTableTexture";
|
||||
for (; relativePathIterator != inputRelativePath.end(); ++relativePathIterator)
|
||||
filesystem::path pathOutPut = pathRoot / "MeshTableTexture_512";
|
||||
for (; iterPath != pathReleative.end(); ++iterPath)
|
||||
{
|
||||
outputPath /= *relativePathIterator;
|
||||
pathOutPut /= *iterPath;
|
||||
}
|
||||
pathFile = outputPath;
|
||||
pathFile = pathOutPut;
|
||||
}
|
||||
else {
|
||||
return E_FAIL;
|
||||
@@ -192,7 +192,7 @@ void CResource_Manager::Free()
|
||||
void CResource_Manager::Describe_Entity()
|
||||
{
|
||||
GUI::Begin("SYSTEM", 0, IMGUI_GLOBAL_BEGIN_FLAG);
|
||||
GUI::PushItemWidth(80);
|
||||
GUI::PushItemWidth(IMGUI_GLOBAL_ITEM_WIDTH);
|
||||
if (GUI::CollapsingHeader("ResourceManager")) {
|
||||
static vector<pair<_wstring, _uint>> vecHit = {};
|
||||
static vector<pair<_wstring, _uint>> vecMiss = {};
|
||||
|
||||
@@ -20,6 +20,13 @@ CRigidBody::CRigidBody(const CRigidBody& rhs) :
|
||||
{
|
||||
}
|
||||
|
||||
void CRigidBody::OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos)
|
||||
{
|
||||
if (nullptr != m_pOwner) {
|
||||
m_pOwner->OnRayCollision(pCaster, iCastedOrder, fDistance, vCastedWorldPos);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CRigidBody::Initialize(void* pArg)
|
||||
{
|
||||
RIGIDBODY_DESC* pDesc = (RIGIDBODY_DESC*)pArg;
|
||||
|
||||
@@ -127,7 +127,7 @@ void CRigidBody_Dynamic::Move_LocalPos(_fvector vNewRotQ, _gvector vNewTranslati
|
||||
XMStoreFloat3(&m_vLocalTranslation, vNewTranslation);
|
||||
PSX::PxShape* pShape = { nullptr };
|
||||
m_pRigidBody->getShapes(&pShape, m_pRigidBody->getNbShapes());
|
||||
pShape->setLocalPose(PSX::PxTransform(m_vLocalTranslation.x, m_vLocalTranslation.y, m_vLocalTranslation.z, PSX::PxQuat(m_vLocalRotQ.x, m_vLocalRotQ.y, m_vLocalRotQ.z, m_vLocalRotQ.w)));
|
||||
pShape->setLocalPose(PSX::PxTransform(PSX::PxVec3(m_vLocalTranslation.x, m_vLocalTranslation.y, m_vLocalTranslation.z), PSX::PxQuat(m_vLocalRotQ.x, m_vLocalRotQ.y, m_vLocalRotQ.z, m_vLocalRotQ.w)));
|
||||
#ifdef _DEBUG
|
||||
Add_DebugShape();
|
||||
#endif // _DEBUG
|
||||
@@ -359,7 +359,7 @@ HRESULT CRigidBody_Dynamic::Initialize_Prototype(RIGIDBODY_PROTOTYPE_DYNAMIC_DES
|
||||
m_eLockFlag = Desc.eLockFlag;
|
||||
m_PxMassCenter = Desc.pxMassCenter;
|
||||
m_vDamping = Desc.vAutoDamping;
|
||||
m_vLocalRotQ = Desc.vLocalRotQ;
|
||||
m_vLocalRotQ = Desc.vLocalRotQ;
|
||||
m_vLocalTranslation = Desc.vLocalTranslation;
|
||||
|
||||
return S_OK;
|
||||
@@ -482,30 +482,27 @@ void CRigidBody_Dynamic::Describe_Entity()
|
||||
Set_HalfGeometryInfo(m_vhalfGeometryInfo);
|
||||
}
|
||||
GUI::Text("Translation"); GUI::SameLine();
|
||||
if (GUI::DragFloat3("##LocalPos", (_float*)&m_vLocalTranslation, 0.125f, -10.f, 10.f, "%.4f")) {
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
_float3 vLocalTranslation = m_vLocalTranslation;
|
||||
if (GUI::DragFloat3("##LocalPos", (_float*)&vLocalTranslation, 0.125f, -10.f, 10.f, "%.4f")) {
|
||||
Move_LocalPos(m_vLocalRotQ, vLocalTranslation);
|
||||
}
|
||||
_vector q = XMLoadFloat4(&m_vLocalRotQ);
|
||||
|
||||
// 기본 방향벡터 (엔진 기준)
|
||||
_vector forward = XMVector3Rotate(XMVectorSet(0, 0, 1, 0), q);
|
||||
_vector right = XMVector3Rotate(XMVectorSet(1, 0, 0, 0), q);
|
||||
_vector up = XMVector3Rotate(XMVectorSet(0, 1, 0, 0), q);
|
||||
|
||||
// --- RPY 계산 ---
|
||||
_float fYaw = atan2f(XMVectorGetX(forward), XMVectorGetZ(forward));
|
||||
_float fPitch = asinf(-XMVectorGetY(forward));
|
||||
_float fRoll = atan2f(XMVectorGetY(right), XMVectorGetY(up)); // 수정된 Roll 계산
|
||||
_float fRoll = atan2f(XMVectorGetY(right), XMVectorGetY(up));
|
||||
|
||||
_float3 vRPY = { fRoll, fPitch, fYaw }; // Roll-Pitch-Yaw 순서 정렬
|
||||
_float3 vRPY = { fRoll, fPitch, fYaw };
|
||||
|
||||
// --- GUI 편집 ---
|
||||
GUI::Text("Rotation (Roll Pitch Yaw)");
|
||||
GUI::SameLine();
|
||||
if (GUI::DragFloat3("##LocalRotq", (_float*)&vRPY,
|
||||
XMConvertToRadians(0.5f), -XM_2PI, XM_2PI, "%.5f"))
|
||||
{
|
||||
// XMQuaternionRotationRollPitchYaw는 (Yaw→Pitch→Roll) 순서
|
||||
_vector vRotq = XMQuaternionRotationRollPitchYaw(vRPY.z, vRPY.y, vRPY.x);
|
||||
XMStoreFloat4(&m_vLocalRotQ, vRotq);
|
||||
Move_LocalPos(m_vLocalRotQ, m_vLocalTranslation);
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
#include "pch.h"
|
||||
#include "Shader.h"
|
||||
|
||||
constexpr uint64_t FNV1A64_OFFSET = 14695981039346656037ull;
|
||||
constexpr uint64_t FNV1A64_PRIME = 1099511628211ull;
|
||||
|
||||
constexpr uint64_t Hash_FNV1a64(const char* str)
|
||||
{
|
||||
uint64_t hash = FNV1A64_OFFSET;
|
||||
while (*str)
|
||||
{
|
||||
hash ^= static_cast<uint8_t>(*str++);
|
||||
hash *= FNV1A64_PRIME;
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
CShader::CShader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CComponent{ pDevice, pContext }
|
||||
{
|
||||
@@ -12,6 +26,7 @@ CShader::CShader(const CShader& rhs)
|
||||
, m_pEffect{ rhs.m_pEffect }
|
||||
, m_iNumPasses{ rhs.m_iNumPasses }
|
||||
, m_InputLayouts{ rhs.m_InputLayouts }
|
||||
, m_umapShaderRawVariables{ rhs.m_umapShaderRawVariables }
|
||||
|
||||
#ifdef _DEBUG
|
||||
, m_strShaderPath { rhs.m_strShaderPath }
|
||||
@@ -30,7 +45,7 @@ HRESULT CShader::Initialize_Prototype(const _tchar* pShaderFilePath, const D3D11
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
m_strShaderPath = pShaderFilePath;
|
||||
m_strShaderPath = pShaderFilePath;
|
||||
m_pElements = pElements;
|
||||
m_iNumElements = iNumElements;
|
||||
#endif
|
||||
@@ -52,79 +67,62 @@ HRESULT CShader::Initialize(void* pArg)
|
||||
|
||||
HRESULT CShader::Bind_RawValue(const _char* pConstantName, const void* pData, _uint iLength)
|
||||
{
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByName(pConstantName);
|
||||
if (nullptr == pVariable)
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable){
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return pVariable->SetRawValue(pData, 0, iLength);
|
||||
return pTagVariable->pVariable->SetRawValue(pData, 0, iLength);
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_Matrix(const _char* pConstantName, const _float4x4* pMatrix)
|
||||
{
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByName(pConstantName);
|
||||
if (nullptr == pVariable)
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectMatrixVariable* pMatrixVariable = pVariable->AsMatrix();
|
||||
if (nullptr == pMatrixVariable)
|
||||
return E_FAIL;
|
||||
|
||||
return pMatrixVariable->SetMatrix(reinterpret_cast<const _float*>(pMatrix));
|
||||
return pTagVariable->pMatrix->SetMatrix(reinterpret_cast<const _float*>(pMatrix));
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_Matrices(const _char* pConstantName, const _float4x4* pMatrix, _uint iNumMatrices)
|
||||
{
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByName(pConstantName);
|
||||
if (nullptr == pVariable)
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectMatrixVariable* pMatrixVariable = pVariable->AsMatrix();
|
||||
if (nullptr == pMatrixVariable)
|
||||
return E_FAIL;
|
||||
|
||||
return pMatrixVariable->SetMatrixArray(reinterpret_cast<const _float*>(pMatrix), 0, iNumMatrices);
|
||||
return pTagVariable->pMatrix->SetMatrixArray(reinterpret_cast<const _float*>(pMatrix), 0, iNumMatrices);
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_SRV(const _char* pConstantName, ID3D11ShaderResourceView* pSRV)
|
||||
{
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByName(pConstantName);
|
||||
if (nullptr == pVariable)
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectShaderResourceVariable* pSRVariable = pVariable->AsShaderResource();
|
||||
if (nullptr == pSRVariable)
|
||||
return E_FAIL;
|
||||
|
||||
return pSRVariable->SetResource(pSRV);
|
||||
return pTagVariable->pSRV->SetResource(pSRV);
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView** ppSRV, _uint iNumSRVs)
|
||||
{
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByName(pConstantName);
|
||||
if (nullptr == pVariable)
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectShaderResourceVariable* pSRVariable = pVariable->AsShaderResource();
|
||||
if (nullptr == pSRVariable)
|
||||
return E_FAIL;
|
||||
|
||||
return pSRVariable->SetResourceArray(ppSRV, 0, iNumSRVs);
|
||||
return pTagVariable->pSRV->SetResourceArray(ppSRV, 0, iNumSRVs);
|
||||
}
|
||||
|
||||
HRESULT CShader::Bind_IntArray(const _char* pConstantName, const int* pData, _uint elementCount)
|
||||
{
|
||||
if (m_pEffect == nullptr || pConstantName == nullptr || pData == nullptr || elementCount == 0) {
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(pConstantName);
|
||||
if (nullptr == pTagVariable) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3DX11EffectScalarVariable* effectScalarVariable =
|
||||
m_pEffect->GetVariableByName(pConstantName)->AsScalar();
|
||||
|
||||
if (effectScalarVariable == nullptr || effectScalarVariable->IsValid() == false) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return effectScalarVariable->SetIntArray(pData, 0, elementCount);
|
||||
return pTagVariable->pScalar->SetIntArray(pData, 0, elementCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,9 +132,9 @@ HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_E
|
||||
_uint iHlslFlag = {};
|
||||
|
||||
#ifdef _DEBUG
|
||||
iHlslFlag = D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION;
|
||||
iHlslFlag = D3DCOMPILE_DEBUG | D3DCOMPILE_SKIP_OPTIMIZATION | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_DEBUG_NAME_FOR_SOURCE;
|
||||
#else
|
||||
iHlslFlag = D3DCOMPILE_OPTIMIZATION_LEVEL1;
|
||||
iHlslFlag = D3DCOMPILE_OPTIMIZATION_LEVEL1 | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR ;
|
||||
#endif
|
||||
|
||||
ID3DBlob* pBlob;
|
||||
@@ -183,9 +181,121 @@ HRESULT CShader::CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_E
|
||||
|
||||
m_InputLayouts.push_back(pInputLayout);
|
||||
}
|
||||
if (FAILED(Hash_Variables())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CShader::Hash_Variables()
|
||||
{
|
||||
if (nullptr == m_pEffect) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Safe_Delete(m_umapShaderRawVariables);
|
||||
m_umapShaderRawVariables = new unordered_map<size_t, SHADERVARIABLE>;
|
||||
HRESULT hr = m_pEffect->GetDesc(&m_EffectDesc);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
m_umapShaderRawVariables->clear();
|
||||
m_umapShaderRawVariables->reserve(m_EffectDesc.GlobalVariables);
|
||||
|
||||
for (_uint iIndexVariable = 0; iIndexVariable < m_EffectDesc.GlobalVariables; ++iIndexVariable) {
|
||||
ID3DX11EffectVariable* pVariable = m_pEffect->GetVariableByIndex(iIndexVariable);
|
||||
if (pVariable == nullptr || pVariable->IsValid() != true) {
|
||||
assert(false); // 불완전한 변수선언
|
||||
continue;
|
||||
}
|
||||
|
||||
D3DX11_EFFECT_VARIABLE_DESC variableDesc{};
|
||||
hr = pVariable->GetDesc(&variableDesc);
|
||||
if (FAILED(hr) || variableDesc.Name == nullptr) {
|
||||
assert(false);
|
||||
continue;
|
||||
}
|
||||
SHADERVARIABLE* pTagVariable = Find_VariableByName(variableDesc.Name);
|
||||
if (nullptr != pTagVariable) {
|
||||
assert(false); // 중복된 변수정의
|
||||
continue;
|
||||
}
|
||||
|
||||
LPD3D11EFFECTTYPE VariableType = pVariable->GetType();
|
||||
D3DX11_EFFECT_TYPE_DESC VariableTypeDesc = {};
|
||||
VariableType->GetDesc(&VariableTypeDesc);
|
||||
CShader::SHADERVARIABLE TagVariable = {};
|
||||
TagVariable.pVariable = pVariable;
|
||||
TagVariable.eType = VariableTypeDesc.Type;
|
||||
TagVariable.eClass = VariableTypeDesc.Class;
|
||||
TagVariable.iNumElement = VariableTypeDesc.Elements;
|
||||
TagVariable.iNumMember = VariableTypeDesc.Members;
|
||||
switch (TagVariable.eClass)
|
||||
{
|
||||
case D3D_SVC_SCALAR:
|
||||
TagVariable.pScalar = pVariable->AsScalar();
|
||||
if (TagVariable.pScalar && !TagVariable.pScalar->IsValid()) {
|
||||
TagVariable.pScalar = nullptr;
|
||||
}
|
||||
break;
|
||||
|
||||
case D3D_SVC_VECTOR:
|
||||
TagVariable.pVector = pVariable->AsVector();
|
||||
if (TagVariable.pVector && !TagVariable.pVector->IsValid()) {
|
||||
TagVariable.pVector = nullptr;
|
||||
}
|
||||
break;
|
||||
|
||||
case D3D_SVC_MATRIX_ROWS:
|
||||
case D3D_SVC_MATRIX_COLUMNS:
|
||||
TagVariable.pMatrix = pVariable->AsMatrix();
|
||||
if (TagVariable.pMatrix && !TagVariable.pMatrix->IsValid()) {
|
||||
TagVariable.pMatrix = nullptr;
|
||||
}
|
||||
break;
|
||||
|
||||
case D3D_SVC_OBJECT:
|
||||
if (TagVariable.eType == D3D_SVT_SAMPLER ||
|
||||
TagVariable.eType == D3D_SVT_SAMPLER1D ||
|
||||
TagVariable.eType == D3D_SVT_SAMPLER2D ||
|
||||
TagVariable.eType == D3D_SVT_SAMPLER3D ||
|
||||
TagVariable.eType == D3D_SVT_SAMPLERCUBE)
|
||||
{
|
||||
TagVariable.pSampler = pVariable->AsSampler();
|
||||
if (TagVariable.pSampler && !TagVariable.pSampler->IsValid()) {
|
||||
TagVariable.pSampler = nullptr;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TagVariable.pSRV = pVariable->AsShaderResource();
|
||||
if (TagVariable.pSRV && !TagVariable.pSRV->IsValid()) {
|
||||
TagVariable.pSRV = nullptr;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
m_umapShaderRawVariables->insert({ Hash_FNV1a64(variableDesc.Name), TagVariable });
|
||||
}
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CShader::SHADERVARIABLE* CShader::Find_VariableByName(const _char* pConstantName)
|
||||
{
|
||||
CShader::SHADERVARIABLE* pResult = { nullptr };
|
||||
|
||||
unordered_map<size_t, SHADERVARIABLE>::iterator iter = m_umapShaderRawVariables->find(Hash_FNV1a64(pConstantName));
|
||||
if (m_umapShaderRawVariables->end() != iter) {
|
||||
pResult = &(*iter).second;
|
||||
}
|
||||
return pResult;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
HRESULT CShader::Shader_Refresh()
|
||||
@@ -258,6 +368,10 @@ void CShader::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
if (false == m_bCloned) {
|
||||
Safe_Delete(m_umapShaderRawVariables);
|
||||
}
|
||||
|
||||
SAFE_RELEASE(m_pEffect);
|
||||
|
||||
for (auto& pInputLayout : m_InputLayouts)
|
||||
|
||||
@@ -191,6 +191,7 @@ enum class PXOBJECT : _uint {
|
||||
#pragma region NPC
|
||||
NPC = 500,
|
||||
OLLIVANDER,
|
||||
ELEAZARFIG,
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ITEM
|
||||
|
||||
@@ -21,11 +21,12 @@
|
||||
#define ASSERT_JINHO(expression)
|
||||
#define ASSERT_HYUNBIN(expression)
|
||||
#define ASSERT_INHYUK(expression)
|
||||
#define IMGUI_GLOBAL_ITEM_WIDTH 160
|
||||
|
||||
#define OPTIONAL_TRUE_KEYINPUTGUICHECK
|
||||
#define USE_LOWTEXTURE
|
||||
|
||||
#ifndef _DEBUG
|
||||
#define USE_LOWTEXTURE
|
||||
#ifndef _DEBUG // 릴리즈 모드일 때는 고해상도 유지
|
||||
#undef USE_LOWTEXTURE
|
||||
#endif // !_DEBUG
|
||||
|
||||
@@ -34,31 +35,31 @@
|
||||
#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 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 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 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 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 USE_LOWTEXTURE // 매크로 옵션으로 해상도 조절, 주석 걸면 디버그모드에서 저해상도 유지
|
||||
//#undef OPTIONAL_TRUE_KEYINPUTGUICHECK
|
||||
//#define OPTIONAL_TRUE_KEYINPUTGUICHECK || true
|
||||
#endif
|
||||
|
||||
@@ -390,9 +390,185 @@ typedef struct tagPHYSX_USERDATA {
|
||||
|
||||
}PHYSX_USERDATA;
|
||||
|
||||
typedef struct tagD6JointDesc {
|
||||
typedef struct tagD6JointDesc
|
||||
{ // 0: Locked
|
||||
// 1: Limited
|
||||
// 2: Free
|
||||
int iMotionX = 0;
|
||||
int iMotionY = 0;
|
||||
int iMotionZ = 0;
|
||||
int iMotionTwist = 0;
|
||||
int iMotionSwing1 = 0;
|
||||
int iMotionSwing2 = 0;
|
||||
|
||||
float fLinearLimit = 0.f;
|
||||
float fSwingDeg = 0.f;
|
||||
float fTwistAbsDeg = 0.f;
|
||||
|
||||
bool bEnableSlerpDrive = false;
|
||||
float fSlerpStiffness = 0.f;
|
||||
float fSlerpDamping = 0.f;
|
||||
float fSlerpForceLimit = 0.f;
|
||||
bool bSlerpAccel = false;
|
||||
|
||||
bool bEnableLinearDrive = false;
|
||||
float fLinearStiffness = 0.f;
|
||||
float fLinearDamping = 0.f;
|
||||
float fLinearForceLimit = 0.f;
|
||||
bool bLinearAccel = false;
|
||||
|
||||
tagD6JointDesc() {
|
||||
iMotionX = 0;
|
||||
iMotionY = 0;
|
||||
iMotionZ = 0;
|
||||
iMotionTwist = 0;
|
||||
iMotionSwing1 = 0;
|
||||
iMotionSwing2 = 0;
|
||||
fLinearLimit = 0.f;
|
||||
fSwingDeg = 0.f;
|
||||
fTwistAbsDeg = 0.f;
|
||||
bEnableSlerpDrive = false;
|
||||
fSlerpStiffness = 0.f;
|
||||
fSlerpForceLimit = 0.f;
|
||||
fSlerpDamping = 0.f;
|
||||
bSlerpAccel = false;
|
||||
bEnableLinearDrive = false;
|
||||
fLinearStiffness = 0.f;
|
||||
fLinearDamping = 0.f;
|
||||
bLinearAccel = false;
|
||||
}
|
||||
|
||||
static int MotionToIndex(PSX::PxD6Motion::Enum motion)
|
||||
{
|
||||
if (motion == PSX::PxD6Motion::eLOCKED) return 0;
|
||||
if (motion == PSX::PxD6Motion::eLIMITED) return 1;
|
||||
return 2; // eFREE
|
||||
}
|
||||
|
||||
static PSX::PxD6Motion::Enum IndexToMotion(int index)
|
||||
{
|
||||
return (index == 0) ? PSX::PxD6Motion::eLOCKED :
|
||||
(index == 1) ? PSX::PxD6Motion::eLIMITED :
|
||||
PSX::PxD6Motion::eFREE;
|
||||
}
|
||||
|
||||
static bool HasAccelFlag(const PSX::PxD6JointDrive& drive)
|
||||
{
|
||||
return (drive.flags & PSX::PxD6JointDriveFlag::eACCELERATION) != 0;
|
||||
}
|
||||
|
||||
static PSX::PxD6JointDrive MakeDrive(float stiffness, float damping, float forceLimit, bool accel)
|
||||
{
|
||||
PSX::PxD6JointDrive drive(stiffness, damping, forceLimit, accel);
|
||||
return drive;
|
||||
}
|
||||
|
||||
void InitFromJoint(const PSX::PxD6Joint& joint)
|
||||
{
|
||||
iMotionX = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eX));
|
||||
iMotionY = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eY));
|
||||
iMotionZ = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eZ));
|
||||
iMotionTwist = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eTWIST));
|
||||
iMotionSwing1 = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eSWING1));
|
||||
iMotionSwing2 = MotionToIndex(joint.getMotion(PSX::PxD6Axis::eSWING2));
|
||||
|
||||
{
|
||||
PSX::PxJointLinearLimit pxLimit = joint.getLinearLimit();
|
||||
fLinearLimit = pxLimit.value;
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxJointLimitCone pxSwing = joint.getSwingLimit();
|
||||
fSwingDeg = XMConvertToDegrees(pxSwing.yAngle); // 대칭 cone 기준
|
||||
|
||||
PSX::PxJointAngularLimitPair pxTwist = joint.getTwistLimit();
|
||||
const float fAbsRad = PSX::PxMax(PSX::PxAbs(pxTwist.lower), PSX::PxAbs(pxTwist.upper));
|
||||
fTwistAbsDeg = XMConvertToDegrees(fAbsRad);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxD6JointDrive pxDrive = joint.getDrive(PSX::PxD6Drive::eSLERP);
|
||||
bEnableSlerpDrive = (pxDrive.stiffness > 0.f) || (pxDrive.damping > 0.f) || (pxDrive.forceLimit > 0.f);
|
||||
fSlerpStiffness = pxDrive.stiffness;
|
||||
fSlerpDamping = pxDrive.damping;
|
||||
fSlerpForceLimit = pxDrive.forceLimit;
|
||||
bSlerpAccel = HasAccelFlag(pxDrive);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxD6JointDrive pxDriveX = joint.getDrive(PSX::PxD6Drive::eX);
|
||||
bEnableLinearDrive = (pxDriveX.stiffness > 0.f) || (pxDriveX.damping > 0.f) || (pxDriveX.forceLimit > 0.f);
|
||||
fLinearStiffness = pxDriveX.stiffness;
|
||||
fLinearDamping = pxDriveX.damping;
|
||||
fLinearForceLimit = pxDriveX.forceLimit;
|
||||
bLinearAccel = HasAccelFlag(pxDriveX);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyToJoint(PSX::PxD6Joint& joint) const
|
||||
{
|
||||
joint.setMotion(PSX::PxD6Axis::eX, IndexToMotion(iMotionX));
|
||||
joint.setMotion(PSX::PxD6Axis::eY, IndexToMotion(iMotionY));
|
||||
joint.setMotion(PSX::PxD6Axis::eZ, IndexToMotion(iMotionZ));
|
||||
joint.setMotion(PSX::PxD6Axis::eTWIST, IndexToMotion(iMotionTwist));
|
||||
joint.setMotion(PSX::PxD6Axis::eSWING1, IndexToMotion(iMotionSwing1));
|
||||
joint.setMotion(PSX::PxD6Axis::eSWING2, IndexToMotion(iMotionSwing2));
|
||||
|
||||
{
|
||||
PSX::PxJointLinearLimit pxLimit = joint.getLinearLimit();
|
||||
pxLimit.value = PSX::PxMax(0.f, fLinearLimit);
|
||||
joint.setLinearLimit(pxLimit);
|
||||
}
|
||||
|
||||
{
|
||||
PSX::PxJointLimitCone pxSwing = joint.getSwingLimit();
|
||||
const float swingRad = XMConvertToRadians(PSX::PxClamp(fSwingDeg, 0.f, 180.f));
|
||||
pxSwing.yAngle = swingRad;
|
||||
pxSwing.zAngle = swingRad;
|
||||
joint.setSwingLimit(pxSwing);
|
||||
}
|
||||
{
|
||||
PSX::PxJointAngularLimitPair pxTwist = joint.getTwistLimit();
|
||||
const float twistRad = XMConvertToRadians(PSX::PxClamp(fTwistAbsDeg, FLT_EPSILON, 180.f));
|
||||
pxTwist.lower = -twistRad;
|
||||
pxTwist.upper = +twistRad;
|
||||
|
||||
joint.setTwistLimit(pxTwist);
|
||||
}
|
||||
|
||||
if (!bEnableSlerpDrive)
|
||||
{
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, MakeDrive(0.f, 0.f, 0.f, bSlerpAccel));
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, MakeDrive(fSlerpStiffness, fSlerpDamping, fSlerpForceLimit, bSlerpAccel));
|
||||
}
|
||||
|
||||
if (!bEnableLinearDrive)
|
||||
{
|
||||
const PSX::PxD6JointDrive off = MakeDrive(0.f, 0.f, 0.f, bLinearAccel);
|
||||
joint.setDrive(PSX::PxD6Drive::eX, off);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, off);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, off);
|
||||
}
|
||||
else
|
||||
{
|
||||
const PSX::PxD6JointDrive on = MakeDrive(fLinearStiffness, fLinearDamping, fLinearForceLimit, bLinearAccel);
|
||||
joint.setDrive(PSX::PxD6Drive::eX, on);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, on);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, on);
|
||||
}
|
||||
}
|
||||
}D6JOINTDESC;
|
||||
|
||||
static D6JOINTDESC MakeD6JointUIState(const PSX::PxD6Joint& joint)
|
||||
{
|
||||
D6JOINTDESC state;
|
||||
state.InitFromJoint(joint);
|
||||
return state;
|
||||
}
|
||||
|
||||
}PHYSX_JOINT_D6Desc;
|
||||
|
||||
typedef struct tagOnCollsionInfo
|
||||
{
|
||||
|
||||
@@ -12,6 +12,9 @@ typedef unsigned short _ushort;
|
||||
|
||||
typedef signed int _int;
|
||||
typedef unsigned int _uint;
|
||||
typedef XMUINT2 _uint2;
|
||||
typedef XMUINT3 _uint3;
|
||||
typedef XMUINT4 _uint4;
|
||||
|
||||
typedef signed long _long;
|
||||
typedef unsigned long _ulong;
|
||||
|
||||
@@ -41,7 +41,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Add_Timer(const _wstring& strTimerTag);
|
||||
void Compute_TimeDelta(const _wstring& strTimerTag);
|
||||
void Compute_FrameCount();
|
||||
void Present_TimeCost() const;
|
||||
void Present_TimeCost() ;
|
||||
#pragma endregion
|
||||
|
||||
#pragma region LEVEL_MANAGER
|
||||
@@ -133,27 +133,27 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
#pragma endregion
|
||||
|
||||
#pragma region PIPELINE
|
||||
void Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix);
|
||||
const _float4x4* Get_Transform_Float4x4(D3DTS eState);
|
||||
_matrix Get_Transform_Matrix(D3DTS eState);
|
||||
_matrix Get_ShadowTransform_Matrix(D3DTS eState, SHADOW eShadowType);
|
||||
const _float4* Get_CamPosition();
|
||||
const _vector Get_CamXMPosition();
|
||||
void Transform_Frustum_ToLocalSpace(_fmatrix WorldMatrixInverse);
|
||||
_bool IsIn_WorldFrustum(_fvector vWorldPos, _float fRadius);
|
||||
_bool IsIn_LocalFrustum(_fvector vLocalPos, _float fRadius);
|
||||
pair<_bool, _ubyte> IsIn_ShadowViewFrustum(_fvector vWorldCenter, _float fRadius);
|
||||
HRESULT Bind_CascadeSplitRatio(class CShader* pShader, const _char* pConstantName, _bool bNear);
|
||||
HRESULT Bind_CascadeBias(class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Bind_GlobalSRV(class CShader* pShader, const _tchar* wszKeyGlobalSRV, const _char* pConstantName);
|
||||
HRESULT Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::path pathSRVFolder);
|
||||
void Set_Transform(D3DTS eState, _fmatrix TransformStateMatrix);
|
||||
const _float4x4* Get_Transform_Float4x4(D3DTS eState);
|
||||
_matrix Get_Transform_Matrix(D3DTS eState);
|
||||
_matrix Get_ShadowTransform_Matrix(D3DTS eState, SHADOW eShadowType);
|
||||
const _float4* Get_CamPosition();
|
||||
const _vector Get_CamXMPosition();
|
||||
void Transform_Frustum_ToLocalSpace(_fmatrix WorldMatrixInverse);
|
||||
_bool IsIn_WorldFrustum(_fvector vWorldPos, _float fRadius);
|
||||
_bool IsIn_LocalFrustum(_fvector vLocalPos, _float fRadius);
|
||||
pair<_bool, _ubyte> IsIn_ShadowViewFrustum(_fvector vWorldCenter, _float fRadius);
|
||||
HRESULT Bind_CascadeSplitRatio(class CShader* pShader, const _char* pConstantName, _bool bNear);
|
||||
HRESULT Bind_CascadeBias(class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Bind_GlobalSRV(class CShader* pShader, const _tchar* wszKeyGlobalSRV, const _char* pConstantName);
|
||||
HRESULT Load_GlobalSRV(const _tchar* wszKeyGlobalSRV, filesystem::path pathSRVFolder);
|
||||
|
||||
HRESULT Ready_Shadow_Light(const _float4& vShadowDirRPYQuat);
|
||||
HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const;
|
||||
const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex);
|
||||
_float Get_ShadowBoxFar(_uint iShadowBoxIndex);
|
||||
HRESULT Begin_OutLine_Write(_uint iDSSMask);
|
||||
HRESULT End_OutLine_Write();
|
||||
HRESULT Ready_Shadow_Light(const _float4& vShadowDirRPYQuat);
|
||||
HRESULT Bind_Shadow_Resource(class CShader* pShader, const _char* pConstantName, D3DTS eType, SHADOW eShadowType) const;
|
||||
const _float4x4* Get_ShadowMatricesPtr(_uint iShadowBoxIndex);
|
||||
_float Get_ShadowBoxFar(_uint iShadowBoxIndex);
|
||||
HRESULT Begin_OutLine_Write(_uint iDSSMask);
|
||||
HRESULT End_OutLine_Write();
|
||||
#pragma endregion
|
||||
#pragma region LIGHT_MANAGER
|
||||
void Add_Light(_uint _iCurrentLevel, class CLight* _pLight);
|
||||
@@ -219,7 +219,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
PSX::PxRigidDynamic* Add_DynamicActor(CRigidBody_Dynamic& RigidBody, _uint iLevel);
|
||||
PSX::PxRigidStatic* Add_StaticActor(CRigidBody_Static& RigidBody, _uint iLevel);
|
||||
PSX::PxJoint* Create_PxJoint(PHYSX_JOINT eType, PSX::PxRigidActor* pActor0, PSX::PxTransform& pxLocalFrame0, PSX::PxRigidActor* pActor1, PSX::PxTransform& pxLocalFrame1);
|
||||
PSX::PxD6Joint* Create_PxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
|
||||
_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);
|
||||
@@ -331,6 +331,8 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fSlowIntense = {};
|
||||
#ifdef _DEBUG
|
||||
private:
|
||||
_bool m_bRendererTimerOpen = false;
|
||||
|
||||
_float m_fTimer_PriorityUpdate = { 0.f };
|
||||
_float m_fTimer_Update = { 0.f };
|
||||
_float m_fTimer_LateUpdate = { 0.f };
|
||||
@@ -362,6 +364,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
_float m_fTimer_Render_UI = { 0.f };
|
||||
_float m_fTimer_Render_UI_Overley = { 0.f };
|
||||
|
||||
|
||||
vector<const _char*> m_FilePaths = {};
|
||||
map<const _char*, CModel*> m_ModelMap;
|
||||
|
||||
|
||||
@@ -28,11 +28,9 @@ class ENGINE_DLL CGameObject abstract
|
||||
|
||||
virtual _float Get_Depth(); // z 소팅 할 때 쓰시면 됨
|
||||
|
||||
// 내가 맞음 ( Collider_Manager가 부름 )
|
||||
virtual void OnCollision(CGameObject* pOther = nullptr ,void* pDesc = nullptr);
|
||||
|
||||
// 내가 때림 ( 히트박스가 부름 )
|
||||
virtual void OnHit(CGameObject* pOther, CGameObject* pCaller = nullptr);
|
||||
virtual void OnRayCollision(CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos);
|
||||
|
||||
virtual _vector Get_WorldPostion();
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ class CMyTools {
|
||||
return hitLeft.distance < hitRight.distance;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline static _uint AlphabetToInt(_tchar Alphabet)
|
||||
{
|
||||
@@ -337,24 +337,197 @@ class CMyTools {
|
||||
|
||||
return (Alphabet - 'A');
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
inline static PSX::PxTransform MakeJointWorldPoseFromRouteEnd(PSX::PxRigidActor* routeRigidActor, _float3 vCapsuleHalfLengths, bool isHeadEnd)
|
||||
inline static _bool DescribePxTransform(PSX::PxTransform& pxTransform, size_t iID)
|
||||
{
|
||||
PSX::PxVec3 vAxis = {};
|
||||
_float fAngle = {};
|
||||
pxTransform.q.toRadiansAndUnitAxis(fAngle, vAxis);
|
||||
GUI::Text((to_string((_int)iID) + "Pos : %.2f %.2f %.2f").c_str(), pxTransform.p.x, pxTransform.p.y, pxTransform.p.z);
|
||||
GUI::Text((to_string((_int)iID) + "fAngle vAxis : %.2f %.2f %.2f %.2f").c_str(), fAngle, vAxis.x, vAxis.y, vAxis.z);
|
||||
if (GUI::DragFloat3((to_string((_int)iID) + " Pos").c_str(), (_float*)&pxTransform.p, 0.01f, -2.f, 2.f, "%.2f")) {
|
||||
return true;
|
||||
}
|
||||
if (GUI::DragFloat((to_string((_int)iID) + " fAngle").c_str(), &fAngle, XMConvertToRadians(1.f), XMConvertToRadians(0.1f), 2.f * XM_2PI, "%.2f")) {
|
||||
pxTransform.q = PSX::PxQuat(fAngle, vAxis);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
|
||||
// 루트의 끝에 있는 조인트 위치를 구함
|
||||
inline static PSX::PxTransform Calc_JointPosFromRoute(PSX::PxRigidActor* pRouteActor, _float3 vCapsuleHalfLengths, bool bIsHead)
|
||||
{
|
||||
PSX::PxShape* shapeArray[1] = {};
|
||||
routeRigidActor->getShapes(shapeArray, 1);
|
||||
pRouteActor->getShapes(shapeArray, 1);
|
||||
|
||||
PSX::PxShape* routeShape = shapeArray[0];
|
||||
PSX::PxTransform pxRouteWorld = PSX::PxShapeExt::getGlobalPose(*routeShape, *pRouteActor);
|
||||
PSX::PxVec3 capsuleAxisWorld = pxRouteWorld.q.rotate(PSX::PxVec3(1.f, 0.f, 0.f));
|
||||
|
||||
const PSX::PxTransform pxRouteWorldTransfom = PSX::PxShapeExt::getGlobalPose(*routeShape, *routeRigidActor);
|
||||
PSX::PxTransform pxResult;
|
||||
pxResult.q = pxRouteWorld.q;
|
||||
pxResult.p = pxRouteWorld.p + (bIsHead ? 1.f : -1.f) * capsuleAxisWorld * (vCapsuleHalfLengths.y + vCapsuleHalfLengths.x);
|
||||
|
||||
const PSX::PxVec3 capsuleAxisWorld = pxRouteWorldTransfom.q.rotate(PSX::PxVec3(1.f, 0.f, 0.f));
|
||||
|
||||
PSX::PxTransform jointWorldPose;
|
||||
jointWorldPose.q = pxRouteWorldTransfom.q;
|
||||
jointWorldPose.p = pxRouteWorldTransfom.p + (isHeadEnd ? 1.f : -1.f) * capsuleAxisWorld * (vCapsuleHalfLengths.y + vCapsuleHalfLengths.x);
|
||||
|
||||
return jointWorldPose;
|
||||
return pxResult;
|
||||
}
|
||||
static _bool Modify_D6Joint(PSX::PxD6Joint& joint, _uint iID)
|
||||
{
|
||||
_bool bIsModified = false;
|
||||
|
||||
const char* motionItems[] = { "Locked", "Limited", "Free" };
|
||||
|
||||
struct AxisRow { PSX::PxD6Axis::Enum axis; const char* label; };
|
||||
const AxisRow axisRows[] =
|
||||
{
|
||||
{ PSX::PxD6Axis::eX, "X Motion" },
|
||||
{ PSX::PxD6Axis::eY, "Y Motion" },
|
||||
{ PSX::PxD6Axis::eZ, "Z Motion" },
|
||||
{ PSX::PxD6Axis::eTWIST, "Twist Motion" },
|
||||
{ PSX::PxD6Axis::eSWING1, "Swing1 Motion" },
|
||||
{ PSX::PxD6Axis::eSWING2, "Swing2 Motion" },
|
||||
};
|
||||
|
||||
for (const AxisRow& row : axisRows)
|
||||
{
|
||||
const PSX::PxD6Motion::Enum pxCurMotion = joint.getMotion(row.axis);
|
||||
|
||||
int iCurIndex = 0;
|
||||
if (pxCurMotion == PSX::PxD6Motion::eLOCKED) iCurIndex = 0;
|
||||
else if (pxCurMotion == PSX::PxD6Motion::eLIMITED) iCurIndex = 1;
|
||||
else iCurIndex = 2; // eFREE
|
||||
|
||||
int iNewIndex = iCurIndex;
|
||||
std::string uiId = std::string(row.label) + " ##" + std::to_string(iID);
|
||||
|
||||
if (GUI::Combo(uiId.c_str(), &iNewIndex, motionItems, IM_ARRAYSIZE(motionItems)) && iNewIndex != iCurIndex)
|
||||
{
|
||||
PSX::PxD6Motion::Enum pxNewMotion =
|
||||
(iNewIndex == 0) ? PSX::PxD6Motion::eLOCKED :
|
||||
(iNewIndex == 1) ? PSX::PxD6Motion::eLIMITED :
|
||||
PSX::PxD6Motion::eFREE;
|
||||
|
||||
joint.setMotion(row.axis, pxNewMotion);
|
||||
bIsModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
const _bool bIsLinearLimited =
|
||||
(joint.getMotion(PSX::PxD6Axis::eX) == PSX::PxD6Motion::eLIMITED) ||
|
||||
(joint.getMotion(PSX::PxD6Axis::eY) == PSX::PxD6Motion::eLIMITED) ||
|
||||
(joint.getMotion(PSX::PxD6Axis::eZ) == PSX::PxD6Motion::eLIMITED);
|
||||
|
||||
const _bool bIsSwingLimited =
|
||||
(joint.getMotion(PSX::PxD6Axis::eSWING1) == PSX::PxD6Motion::eLIMITED) ||
|
||||
(joint.getMotion(PSX::PxD6Axis::eSWING2) == PSX::PxD6Motion::eLIMITED);
|
||||
|
||||
const _bool bIsTwistLimited =
|
||||
(joint.getMotion(PSX::PxD6Axis::eTWIST) == PSX::PxD6Motion::eLIMITED);
|
||||
|
||||
PSX::PxJointLinearLimit pxLinearLimit = joint.getLinearLimit();
|
||||
_float fLinearLimit = pxLinearLimit.value;
|
||||
|
||||
if (GUI::DragFloat((std::string("LinearLimit ##") + std::to_string(iID)).c_str(), &fLinearLimit, 0.01f, 0.f, 10.f, "%.3f"))
|
||||
bIsModified = true;
|
||||
|
||||
PSX::PxJointLimitCone pxSwingLimit = joint.getSwingLimit();
|
||||
PSX::PxJointAngularLimitPair pxTwistLimit = joint.getTwistLimit();
|
||||
|
||||
_float fSwingDeg = XMConvertToDegrees(pxSwingLimit.yAngle);
|
||||
_float fTwistAbsDeg = XMConvertToDegrees(PSX::PxMax(PSX::PxAbs(pxTwistLimit.lower), PSX::PxAbs(pxTwistLimit.upper)));
|
||||
|
||||
if (GUI::DragFloat((std::string("SwingDeg ##") + std::to_string(iID)).c_str(), &fSwingDeg, 1.f, 0.f, 180.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
if (GUI::DragFloat((std::string("TwistAbsDeg ##") + std::to_string(iID)).c_str(), &fTwistAbsDeg, 1.f, 0.f, 180.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
PSX::PxD6JointDrive pxSlerpDrive = joint.getDrive(PSX::PxD6Drive::eSLERP);
|
||||
_bool bIsSlerpDriveEnabled = (pxSlerpDrive.stiffness > 0.f) || (pxSlerpDrive.damping > 0.f) || (pxSlerpDrive.forceLimit > 0.f);
|
||||
|
||||
if (GUI::Checkbox((std::string("Enable SLERP Drive ##") + std::to_string(iID)).c_str(), &bIsSlerpDriveEnabled))
|
||||
bIsModified = true;
|
||||
|
||||
if (GUI::SliderFloat((std::string("SLERP stiffness ##") + std::to_string(iID)).c_str(), &pxSlerpDrive.stiffness, 0.f, 100.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
GUI::SameLine();
|
||||
|
||||
if (GUI::SliderFloat((std::string("SLERP damping ##") + std::to_string(iID)).c_str(), &pxSlerpDrive.damping, 0.f, 100.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
PSX::PxD6JointDrive pxLinearDriveX = joint.getDrive(PSX::PxD6Drive::eX);
|
||||
_bool bIsLinearDriveEnabled = (pxLinearDriveX.stiffness > 0.f) || (pxLinearDriveX.damping > 0.f) || (pxLinearDriveX.forceLimit > 0.f);
|
||||
|
||||
if (GUI::Checkbox((std::string("Enable Linear Drive(XYZ) ##") + std::to_string(iID)).c_str(), &bIsLinearDriveEnabled))
|
||||
bIsModified = true;
|
||||
|
||||
if (GUI::SliderFloat((std::string("Linear stiffness ##") + std::to_string(iID)).c_str(), &pxLinearDriveX.stiffness, 0.f, 100.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
GUI::SameLine();
|
||||
|
||||
if (GUI::SliderFloat((std::string("Linear damping ##") + std::to_string(iID)).c_str(), &pxLinearDriveX.damping, 0.f, 100.f, "%.2f"))
|
||||
bIsModified = true;
|
||||
|
||||
if (bIsModified)
|
||||
{
|
||||
pxLinearLimit.value = PSX::PxMax(0.f, fLinearLimit);
|
||||
joint.setLinearLimit(pxLinearLimit);
|
||||
|
||||
const _float fSwingRad = XMConvertToRadians(fSwingDeg);
|
||||
pxSwingLimit.yAngle = fSwingRad;
|
||||
pxSwingLimit.zAngle = fSwingRad;
|
||||
joint.setSwingLimit(pxSwingLimit);
|
||||
|
||||
const _float fTwistAbsRad = XMConvertToRadians(fTwistAbsDeg);
|
||||
pxTwistLimit.lower = -fTwistAbsRad;
|
||||
pxTwistLimit.upper = +fTwistAbsRad;
|
||||
joint.setTwistLimit(pxTwistLimit);
|
||||
|
||||
if (!bIsSlerpDriveEnabled)
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, PSX::PxD6JointDrive(0.f, 0.f, 0.f, pxSlerpDrive.flags & PSX::PxD6JointDriveFlag::eACCELERATION));
|
||||
else
|
||||
joint.setDrive(PSX::PxD6Drive::eSLERP, pxSlerpDrive);
|
||||
|
||||
if (!bIsLinearDriveEnabled)
|
||||
{
|
||||
const PSX::PxD6JointDrive pxOff(0.f, 0.f, 0.f, pxLinearDriveX.flags & PSX::PxD6JointDriveFlag::eACCELERATION);
|
||||
joint.setDrive(PSX::PxD6Drive::eX, pxOff);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, pxOff);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, pxOff);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.setDrive(PSX::PxD6Drive::eX, pxLinearDriveX);
|
||||
joint.setDrive(PSX::PxD6Drive::eY, pxLinearDriveX);
|
||||
joint.setDrive(PSX::PxD6Drive::eZ, pxLinearDriveX);
|
||||
}
|
||||
}
|
||||
|
||||
return bIsModified;
|
||||
}
|
||||
|
||||
|
||||
// 힌지 월드축을 가져와서 레볼루트 조인트의 회전 쿼터니언을 구함
|
||||
inline static PSX::PxQuat Calc_RevJointPosFromWorldHingeAxis(const PSX::PxVec3& pxHingeWorldAxis)
|
||||
{
|
||||
PSX::PxVec3 pxBasicAxis = PSX::PxVec3(0.f, 1.f, 0.f);
|
||||
if (PSX::PxAbs(pxHingeWorldAxis.dot(pxBasicAxis)) > 0.99f)
|
||||
{
|
||||
pxBasicAxis = PSX::PxVec3(0.f, 0.f, 1.f);
|
||||
}
|
||||
|
||||
PSX::PxVec3 zAxis = pxHingeWorldAxis.cross(pxBasicAxis).getNormalized();
|
||||
PSX::PxVec3 yAxis = zAxis.cross(pxHingeWorldAxis).getNormalized();
|
||||
|
||||
PSX::PxMat33 pxResultMatrix(pxHingeWorldAxis, yAxis, zAxis);
|
||||
return PSX::PxQuat(pxResultMatrix);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region FileSystem
|
||||
//static void Folder_Func(/* 재귀적으로 탐색할지 */ _In_ _bool bRecursive,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -36,7 +36,7 @@ class CPhysX_Manager final : public CBase
|
||||
|
||||
// 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);
|
||||
PSX::PxD6Joint* Create_PxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
PSX::PxD6Joint* Create_BasicPxD6Joint(PSX::PxRigidDynamic* pActor0, PSX::PxRigidDynamic* pActor1, const PSX::PxTransform& pxJointWorldPos);
|
||||
|
||||
void RegistTriMesh(const _char* pName, PSX::PxTriangleMesh* pPxTriMesh, _uint iLevel);
|
||||
void RegistHeight(const _tchar* pName, PSX::PxHeightFieldDesc& Desc, _uint iLevel);
|
||||
|
||||
@@ -134,13 +134,13 @@ class CPrototype_Manager final : public CBase
|
||||
return strName;
|
||||
}
|
||||
|
||||
if (ImGui::IsItemHovered()) {
|
||||
if (GUI::IsItemHovered()) {
|
||||
|
||||
ImGui::BeginTooltip(); // 툴팁 창 시작
|
||||
GUI::BeginTooltip(); // 툴팁 창 시작
|
||||
|
||||
ImGui::TextUnformatted(CMyTools::ToString(wstrComponentName).c_str()); // 텍스트 출력 (Text 대신 Unformatted 추천)
|
||||
GUI::TextUnformatted(CMyTools::ToString(wstrComponentName).c_str()); // 텍스트 출력 (Text 대신 Unformatted 추천)
|
||||
|
||||
ImGui::EndTooltip(); // 툴팁 창 종료
|
||||
GUI::EndTooltip(); // 툴팁 창 종료
|
||||
};
|
||||
|
||||
if ((iIndex++ + 1) % 4 != 0)
|
||||
@@ -159,9 +159,9 @@ class CPrototype_Manager final : public CBase
|
||||
if(GUI::BeginCombo(pComponentName, (s_iCurrentItem >= 0 && s_iCurrentItem < pComponentNames.size())
|
||||
? pComponentNames[s_iCurrentItem] : "NONE"))
|
||||
{
|
||||
if (ImGui::IsWindowAppearing())
|
||||
if (GUI::IsWindowAppearing())
|
||||
{
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
GUI::SetKeyboardFocusHere();
|
||||
filter.Clear();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class CPrototype_Manager final : public CBase
|
||||
if (is_selected)
|
||||
{
|
||||
|
||||
ImGui::SetItemDefaultFocus();
|
||||
GUI::SetItemDefaultFocus();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ class CRenderer final : public CBase
|
||||
|
||||
#pragma region TunningParameters
|
||||
/* TunningParam */
|
||||
// Variable
|
||||
_float m_fLightSpecularMaximum = { 1.f };
|
||||
|
||||
// MotionBlur
|
||||
_float m_fMBBlurRadius = { 28.f };
|
||||
|
||||
@@ -39,7 +39,8 @@ class ENGINE_DLL CRigidBody abstract : public CComponent
|
||||
PSX::PxShapeFlags Get_ShapeFlags() const { return m_ePxShapeFlags; }
|
||||
PSX::PxRigidBodyFlags Get_RigidBodyFlags() const { return m_ePxRigidBodyFlags; }
|
||||
|
||||
PHYSX_USERDATA* Get_UserDataPtr() { return &m_tagData; };
|
||||
PHYSX_USERDATA* Get_UserDataPtr() { return &m_tagData; };
|
||||
void OnRayCollision(class CGameObject* pCaster, _uint iCastedOrder, _float fDistance, _float3 vCastedWorldPos);
|
||||
|
||||
protected:
|
||||
ACTOR m_eActorType = ACTOR::END;
|
||||
@@ -53,6 +54,7 @@ class ENGINE_DLL CRigidBody abstract : public CComponent
|
||||
CTransform* m_pTransform = { nullptr };
|
||||
PHYSX_USERDATA m_tagData = {};
|
||||
|
||||
|
||||
protected:
|
||||
virtual HRESULT Initialize(void* pArg);
|
||||
|
||||
|
||||
@@ -6,6 +6,21 @@ NS_BEGIN(Engine)
|
||||
|
||||
class ENGINE_DLL CShader final : public CComponent
|
||||
{
|
||||
typedef struct tagShaderGlobalVariable {
|
||||
D3D_SHADER_VARIABLE_CLASS eClass = D3D_SVC_FORCE_DWORD;
|
||||
D3D_SHADER_VARIABLE_TYPE eType = D3D_SVT_FORCE_DWORD;
|
||||
_uint iNumElement;
|
||||
_uint iNumMember;
|
||||
union {
|
||||
ID3DX11EffectVariable* pVariable = { nullptr };
|
||||
ID3DX11EffectScalarVariable* pScalar;
|
||||
ID3DX11EffectVectorVariable* pVector;
|
||||
ID3DX11EffectMatrixVariable* pMatrix;
|
||||
ID3DX11EffectShaderResourceVariable* pSRV;
|
||||
ID3DX11EffectSamplerVariable* pSampler;
|
||||
};
|
||||
}SHADERVARIABLE;
|
||||
|
||||
private:
|
||||
CShader(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CShader(const CShader& rhs);
|
||||
@@ -24,8 +39,15 @@ class ENGINE_DLL CShader final : public CComponent
|
||||
HRESULT Bind_SRVs(const _char* pConstantName, ID3D11ShaderResourceView** ppSRV, _uint iNumSRVs);
|
||||
HRESULT Bind_IntArray(const _char* pConstantName, const _int* pData, _uint elementCount);
|
||||
|
||||
private:
|
||||
D3DX11_EFFECT_DESC m_EffectDesc = {};
|
||||
unordered_map<uint64_t, SHADERVARIABLE>* m_umapShaderRawVariables = {};
|
||||
|
||||
private:
|
||||
HRESULT CreateShader(const _tchar* pShaderFilePath, const D3D11_INPUT_ELEMENT_DESC* pElements, _uint iNumElements);
|
||||
HRESULT Hash_Variables();
|
||||
|
||||
SHADERVARIABLE* Find_VariableByName(const _char* pConstantName);
|
||||
|
||||
#ifdef _DEBUG
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user