commit
This commit is contained in:
@@ -486,6 +486,10 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShaderCom, "g_DepthTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,13 @@ HRESULT CNomalJapSide::Initialize(void* pArg)
|
||||
|
||||
m_pWandParticle = Get_PartObject<CEffectParts>("WandParticle1");
|
||||
m_pWandLight = Get_PartObject<CEffectParts>("Wand_Red_Long");
|
||||
m_pWandLight_R = Get_PartObject<CEffectParts>("Wand_Light_R");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
SAFE_ADDREF(m_pWandParticle);
|
||||
SAFE_ADDREF(m_pWandLight_R);
|
||||
|
||||
m_Events.emplace(0.6f, [&]() {
|
||||
|
||||
@@ -64,6 +66,7 @@ HRESULT CNomalJapSide::Initialize(void* pArg)
|
||||
m_isTrailEnd = true;
|
||||
|
||||
XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
|
||||
m_pWandLight_R->Set_Visible(false);
|
||||
|
||||
});
|
||||
|
||||
@@ -94,6 +97,7 @@ void CNomalJapSide::Update(_float fTimeDelta)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
m_pWandLight_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
// 파티클생성이 막히면 실행되지 않음
|
||||
if (m_isParticleEnd == false)
|
||||
@@ -130,6 +134,7 @@ HRESULT CNomalJapSide::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
m_pWandLight_R->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
@@ -139,7 +144,7 @@ HRESULT CNomalJapSide::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_pWandLight_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -198,6 +203,8 @@ void CNomalJapSide::Free()
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
Safe_Release(m_pWandParticle);
|
||||
Safe_Release(m_pWandLight_R);
|
||||
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class CNomalJapSide final : public CEffect_Container
|
||||
_bool m_isTrailEnd = {};
|
||||
_float4x4 m_TrailStopMat = {};
|
||||
|
||||
class CEffectParts* m_pWandLight_R = { nullptr };
|
||||
class CEffectParts* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
class CEffectParts* m_pWandParticle = { nullptr };
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
Materials[2] =
|
||||
{
|
||||
Materials[0] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
Materials[1] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
}
|
||||
SourceModels[0] = {}
|
||||
StaticMaterials[2] =
|
||||
{
|
||||
StaticMaterials[0] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
MaterialSlotName = constant
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 51.2115, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
StaticMaterials[1] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
MaterialSlotName = default_material
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 59.5543, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Sockets[0] = {}
|
||||
ExtendedBounds =
|
||||
{
|
||||
Origin = { X=-0.0218182, Y=0.0875816, Z=-9.53674e-07 }
|
||||
BoxExtent = { X=14.4636, Y=9.28013, Z=12.4679 }
|
||||
SphereRadius = 17.7629
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
Materials[2] =
|
||||
{
|
||||
Materials[0] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
Materials[1] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
}
|
||||
SourceModels[0] = {}
|
||||
StaticMaterials[2] =
|
||||
{
|
||||
StaticMaterials[0] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
MaterialSlotName = constant
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 49.676, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
StaticMaterials[1] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
MaterialSlotName = default_material
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 59.5587, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Sockets[0] = {}
|
||||
ExtendedBounds =
|
||||
{
|
||||
Origin = { X=-9.53674e-07, Y=0, Z=-0.138607 }
|
||||
BoxExtent = { X=10.5868, Y=21.5313, Z=12.3241 }
|
||||
SphereRadius = 26.4292
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
Materials[2] =
|
||||
{
|
||||
Materials[0] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
Materials[1] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
}
|
||||
SourceModels[0] = {}
|
||||
StaticMaterials[2] =
|
||||
{
|
||||
StaticMaterials[0] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
MaterialSlotName = constant
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 51.2662, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
StaticMaterials[1] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
MaterialSlotName = default_material
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 59.6151, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Sockets[0] = {}
|
||||
ExtendedBounds =
|
||||
{
|
||||
Origin = { X=0, Y=-5.72205e-06, Z=0.0365715 }
|
||||
BoxExtent = { X=14.9456, Y=15.8451, Z=15.9268 }
|
||||
SphereRadius = 24.9805
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -1,38 +0,0 @@
|
||||
Materials[2] =
|
||||
{
|
||||
Materials[0] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
Materials[1] = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
}
|
||||
SourceModels[0] = {}
|
||||
StaticMaterials[2] =
|
||||
{
|
||||
StaticMaterials[0] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_RockLight.VFX_MI_RockLight'
|
||||
MaterialSlotName = constant
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 50.2156, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
StaticMaterials[1] =
|
||||
{
|
||||
MaterialInterface = MaterialInstanceConstant'/Game/VFX/MasterMaterials/Mesh/MaterialInstance/VFX_MI_Rock.VFX_MI_Rock'
|
||||
MaterialSlotName = default_material
|
||||
UVChannelData =
|
||||
{
|
||||
bInitialized = true
|
||||
bOverrideDensities = false
|
||||
LocalUVDensities[4] = { 59.5161, 0, 0, 0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
Sockets[0] = {}
|
||||
ExtendedBounds =
|
||||
{
|
||||
Origin = { X=0, Y=-1.90735e-06, Z=0 }
|
||||
BoxExtent = { X=18.8974, Y=28.9561, Z=19.3048 }
|
||||
SphereRadius = 39.601
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -41,13 +41,15 @@ struct ParticleValue
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
float2 vDelay;
|
||||
|
||||
float4 vPrePos;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<Particle> g_ParticleBufferInput : register(t0);
|
||||
StructuredBuffer<ParticleValue> g_ParticleValueBufferInput : register(t1);
|
||||
|
||||
Texture2D g_DepthTexture : register(t2);
|
||||
|
||||
RWStructuredBuffer<Particle> g_VBInstanceOutput : register(u0);
|
||||
RWStructuredBuffer<ParticleValue> g_ParticleValueOutput : register(u1);
|
||||
|
||||
@@ -119,6 +121,9 @@ void CS_MAIN(
|
||||
// 라이프타임 움직임
|
||||
particle.vLifeTime.x += fTimeDelta;
|
||||
|
||||
// 내 이전 위치정보를 저장해둔다
|
||||
particleValue.vPrePos = particle.vTranslation;
|
||||
|
||||
if (particle.vLifeTime.x >= particle.vLifeTime.y)
|
||||
{
|
||||
if (isLoop == false)
|
||||
@@ -143,7 +148,6 @@ void CS_MAIN(
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
if (isMoveForward)
|
||||
{
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
@@ -31,10 +31,13 @@ struct ParticleValue
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
float2 vDelay;
|
||||
|
||||
float4 vPrePos;
|
||||
};
|
||||
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
matrix g_ProjMatrixInv, g_ViewMatrixInv;
|
||||
|
||||
Texture2D g_DiffuseTexture : register(t0);
|
||||
|
||||
@@ -49,7 +52,7 @@ StructuredBuffer<ParticleValue> g_ParticleValue : register(t5);
|
||||
Texture2D g_EmissiveTexture : register(t6);
|
||||
Texture2D g_DepthStencilTexture : register(t7);
|
||||
Texture2D g_DistortionTexture : register(t8);
|
||||
|
||||
Texture2D g_DepthTexture : register(t9);
|
||||
|
||||
|
||||
float4 g_vCamPosition;
|
||||
@@ -228,6 +231,71 @@ VS_OUT VS_NOWORLD(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
return Out;
|
||||
}
|
||||
|
||||
VS_OUT VS_DEPTH_STOP(VS_IN In, uint iGPUIndex : SV_InstanceID)
|
||||
{
|
||||
VS_OUT Out = (VS_OUT) 0;
|
||||
|
||||
matrix matW, matWV, matWVP;
|
||||
|
||||
|
||||
row_major matrix TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, In.vTranslation);
|
||||
|
||||
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
|
||||
vector vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
|
||||
/* 내 뎁스와 비교하여 만약 내가 가려지는 상황 이였다면 이동하지 않음*/
|
||||
float2 vTexcoord;
|
||||
|
||||
vTexcoord.x = vPosition.x / vPosition.w * 0.5f + 0.5f;
|
||||
vTexcoord.y = vPosition.y / vPosition.w * -0.5f + 0.5f;
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.SampleLevel(DefaultSampler, vTexcoord , 0); // VS에서 샘플함수 못씀
|
||||
|
||||
float fOldViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
if (vPosition.w <= fOldViewZ) // 내가 가려지는 상태
|
||||
{
|
||||
|
||||
float4 vWorldPosition; // 월드 복원
|
||||
|
||||
{
|
||||
|
||||
vWorldPosition.x = vTexcoord.x * 2 - 1;
|
||||
vWorldPosition.y = vTexcoord.y * -2 + 1;
|
||||
vWorldPosition.z = vDepthDesc.x;
|
||||
vWorldPosition.w = 1.f;
|
||||
vWorldPosition *= fOldViewZ;
|
||||
vWorldPosition = mul(vWorldPosition, g_ProjMatrixInv);
|
||||
vWorldPosition = mul(vWorldPosition, g_ViewMatrixInv);
|
||||
|
||||
}
|
||||
|
||||
TransformMatrix = float4x4(In.vRight, In.vUp, In.vLook, vWorldPosition);
|
||||
|
||||
matW = mul(TransformMatrix, g_WorldMatrix);
|
||||
matWV = mul(matW, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
}
|
||||
|
||||
|
||||
Out.vPosition = vPosition;
|
||||
Out.vNormal = normalize(mul(vector(In.vNormal, 0.f), matW));
|
||||
Out.vTangent = normalize(mul(vector(In.vTangent, 0.f), matW)).xyz;
|
||||
Out.vBinormal = normalize(mul(vector(In.vBinormal, 0.f), matW)).xyz;
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
Out.vLifeTime = In.vLifeTime;
|
||||
Out.vWorldPos = mul(vector(In.vPosition, 1.f), matW);
|
||||
Out.iGPUIndex = iGPUIndex;
|
||||
Out.vProjPos = vPosition;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
@@ -523,6 +591,21 @@ float4 DrawEffect(PS_IN In)
|
||||
discard;
|
||||
}
|
||||
|
||||
/* 소프트 이펙트 */
|
||||
|
||||
float2 vTexcoord;
|
||||
|
||||
vTexcoord.x = In.vProjPos.x / In.vProjPos.w * 0.5f + 0.5f;
|
||||
vTexcoord.y = In.vProjPos.y / In.vProjPos.w * -0.5f + 0.5f;
|
||||
|
||||
float4 vDepthDesc = g_DepthTexture.Sample(DefaultSampler, vTexcoord);
|
||||
|
||||
float fOldViewZ = vDepthDesc.y * g_fFar;
|
||||
|
||||
float fDistance = fOldViewZ - In.vProjPos.w;
|
||||
|
||||
vMtrlDiffuse.a = vMtrlDiffuse.a * saturate(fDistance);
|
||||
|
||||
return vMtrlDiffuse;
|
||||
}
|
||||
|
||||
@@ -611,22 +694,10 @@ PS_OUT PS_MAIN(PS_IN In)
|
||||
PS_OUT Out;
|
||||
vector vMtrlDiffuse;
|
||||
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vector vMtrlNormal = g_NormalTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
float3x3 NormalMap_WorldMatrix = float3x3(In.vTangent, In.vBinormal, In.vNormal.xyz);
|
||||
|
||||
float3 vNormal = mul(vMtrlNormal.xyz * 2.f - 1.f, NormalMap_WorldMatrix);
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
|
||||
|
||||
//Out.vNormal = float4(vNormal.xyz * 0.5f + 0.5f, 0.f);
|
||||
//Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 0.0f);
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
|
||||
Out.vDiffuse.a = saturate(In.vLifeTime.y - In.vLifeTime.x);
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
return Out;
|
||||
@@ -729,15 +800,15 @@ PS_BLUR_OUT PS_BLUR_NOEMISSIVE(PS_IN In)
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse.a = 1.f;
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
}
|
||||
//if (g_isDissolve == true)
|
||||
//{
|
||||
// if (g_isNomalDissolve)
|
||||
// {
|
||||
// vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
// }
|
||||
//}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity , vMtrlDiffuse.a);
|
||||
Out.vBlurWeight = g_iBlurWeight / 128.f;
|
||||
@@ -753,21 +824,24 @@ PS_BLUR_OUT PS_BLUR(PS_IN In)
|
||||
|
||||
vMtrlDiffuse = DrawEffect(In);
|
||||
|
||||
vMtrlDiffuse.a *= 5.f;
|
||||
|
||||
//// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
//vMtrlDiffuse.rgb += EmissiveDraw(In).rgb;
|
||||
|
||||
vMtrlDiffuse.a = 1.f;
|
||||
//vMtrlDiffuse.a = 1.f;
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
if (g_isNomalDissolve)
|
||||
{
|
||||
vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
}
|
||||
}
|
||||
//if (g_isDissolve == true)
|
||||
//{
|
||||
// if (g_isNomalDissolve)
|
||||
// {
|
||||
// vMtrlDiffuse.a *= (0.95f - In.vLifeTime.x / In.vLifeTime.y);
|
||||
// }
|
||||
//}
|
||||
|
||||
Out.vDiffuse = vector(vMtrlDiffuse.rgb * g_fBlurIntensity, vMtrlDiffuse.a);
|
||||
|
||||
Out.vBlurWeight = g_iBlurWeight / 128.f;
|
||||
|
||||
return Out;
|
||||
@@ -843,13 +917,14 @@ PS_BLOOM_OUT PS_WEIGHTED_FOR_BLEND(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass Model
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
@@ -977,6 +1052,27 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_WEIGHTED_FOR_BLEND();
|
||||
}
|
||||
|
||||
pass DEPTH_STOP
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_DEPTH_STOP();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
|
||||
//pass PARTICLE_DEPTH_STOP
|
||||
//{
|
||||
// SetRasterizerState(RS_Nocull);
|
||||
// SetDepthStencilState(DSS_Effect, 0);
|
||||
// SetBlendState(BS_WB_Acc, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
// VertexShader = compile vs_5_0 VS_MAIN();
|
||||
// GeometryShader = NULL;
|
||||
// PixelShader = compile ps_5_0 PS_PARTICLE_STOP();
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 113 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 244 KiB |
@@ -73,7 +73,7 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pLightCom != nullptr)
|
||||
{
|
||||
m_pLightCom->Update_AmbientRatio(fTimeDelta , m_EffectInfo.isLightTime);
|
||||
m_pLightCom->Update_IntensityRatio(fTimeDelta , m_EffectInfo.isLightTime , m_EffectInfo.fLightDeley);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ void CEditEffect::Describe_Entity()
|
||||
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "DECAL", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" ,"BLOOM" , "UI", "OCCLUSION" , "PRESHADOW"};
|
||||
const char* pEffectType[] = { "EFFECT" , "TRAIL" };
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND"};
|
||||
const char* pShaderPass[] = { "DEFAULT" , "NON_NOMALMAP" , "BLUR" , "WEIGHTBLEND" , "NON_WORLD" , "NON_WORLD_BLUR", "BLEND", "BLEND_NOWORLD", "BLOOM" ,"BLOOM_NOWORLD" ,"BLUR_NO_EMMISVE", "BLUR_NO_WORLD_NO_EMISSIVE","WEIGHTBLEND_FOR_BLEND" , "DEPTH_STOP" };
|
||||
const char* pBloomType[] = { "NONE" , "BASIC" , "MUILTY"};
|
||||
|
||||
_int iCurrentItem = static_cast<_int>(m_EffectInfo.eRenderOrder);
|
||||
@@ -600,6 +600,13 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
GUI::Checkbox("Light Dissolve", &m_EffectInfo.isLightDissolve);
|
||||
GUI::InputFloat("Light Time", &m_EffectInfo.isLightTime);
|
||||
GUI::InputFloat("Light Delay", &m_EffectInfo.fLightDeley);
|
||||
|
||||
if (GUI::InputFloat("Light Intensity", &m_EffectInfo.fLightIntensity))
|
||||
{
|
||||
|
||||
m_pLightCom->Set_LightIntensity(m_EffectInfo.fLightIntensity);
|
||||
}
|
||||
|
||||
if (GUI::Button("ADD_LIGHT_MANAGER"))
|
||||
{
|
||||
@@ -608,7 +615,7 @@ void CEditEffect::Describe_Entity()
|
||||
|
||||
if (GUI::Button("Reset_Dissolve"))
|
||||
{
|
||||
m_pLightCom->Reset_AmbientRatio();
|
||||
m_pLightCom->Reset_IntensityRatio();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@ HRESULT CEffectObject::Render()
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_OutPut_SRV_VS(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Render(i)))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -237,8 +240,10 @@ HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
m_pLightCom->Set_LightIntensity(m_EffectInfo.fLightIntensity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (m_EffectInfo.isDiffuse)
|
||||
@@ -720,6 +725,10 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Depth"), m_pShaderCom, "g_DepthTexture"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -727,6 +736,13 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrixInv", m_pGameInstance->Get_Transform_Float4x4(D3DTS::VIEW_INV)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrixInv", m_pGameInstance->Get_Transform_Float4x4(D3DTS::PROJ_INV)))) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_isDiffuse", &m_EffectInfo.isDiffuse, sizeof(_bool)))) {
|
||||
return E_FAIL;
|
||||
|
||||
@@ -335,7 +335,7 @@ void CEffect_Container::Reset_Light()
|
||||
if (pLight == nullptr)
|
||||
continue;
|
||||
|
||||
pLight->Reset_AmbientRatio();
|
||||
pLight->Reset_IntensityRatio();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "EffectPool.h"
|
||||
#include "InfoInstance.h"
|
||||
#include "Goblin.h"
|
||||
#include "Terrain.h"
|
||||
|
||||
CLevel_EffectViewer::CLevel_EffectViewer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -44,7 +45,8 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CTerrain>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_Terrain"))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEffectPool>(g_iStaticLevel, NEXT_LEVEL, TEXT("Layer_EffectPool")))) //플레이어보다 먼저 생성해야함!
|
||||
@@ -56,9 +58,9 @@ HRESULT CLevel_EffectViewer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))){
|
||||
return E_FAIL;
|
||||
}
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CDummy_Plane>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_CUBE))){
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CPlayer>(g_iStaticLevel, NEXT_LEVEL, LAYER_PLAYER))){
|
||||
|
||||
@@ -1080,6 +1080,32 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
|
||||
m_strMessage = TEXT("Texture Loading..");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("TerrainTest"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures//T_LandscapeStreamingProxy_0_LOD1_Summer_D.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* Terrain_Mask */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Mask"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Data/Map/T_OL_GrassBlend_Mask_D.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Diffuse */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Diffuse"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_D_%d.dds"), 4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_Normal */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_Normal"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_N_%d.dds"), 4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
/* Terrain_MRO */
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Terrain_MRO"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Terrain/Terrain_MRO_%d.dds"), 4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Effect/Noises", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
@@ -1162,6 +1188,18 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
CModel::Create(m_pDevice, m_pContext, MODEL::NONANIM, "../Bin/Resources/Models/SkyBox/SkyBox.fbx", XMMatrixIdentity()))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/Rock", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||
@@ -1238,6 +1276,28 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
Safe_Delete(pResult);
|
||||
}
|
||||
|
||||
{
|
||||
CVIBuffer_Terrain* pTerrain = CVIBuffer_Terrain::Create(m_pDevice, m_pContext, "Hogsmeade_HeightMap.bin", 512, 512);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Terrain"), pTerrain))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
pTerrain->ConvertToHeightField(TEXT("Hogsmeade_HeightMap"));
|
||||
|
||||
CRigidBody_Static::RIGIDBODY_STATIC_PROTOTYPEDESC Desc{}; // 터레인 리지드 지형 추가
|
||||
{
|
||||
Desc.eType = ACTOR::HEIGHTFIELD;
|
||||
Desc.ePxRigidBodyFlags = {};
|
||||
Desc.ePxShapeFlags = { PSX::PxShapeFlag::eVISUALIZATION | PSX::PxShapeFlag::eSCENE_QUERY_SHAPE | PSX::PxShapeFlag::eSIMULATION_SHAPE };
|
||||
Desc.ePxMaterialTypes = PXMATERIAL::DEFAULT;
|
||||
Desc.vMatInfo = _float3(0.5f, 0.5f, 0.6f);
|
||||
Desc.fContactOffset = 0.f;
|
||||
}
|
||||
CRigidBody_Static* pRigid = CRigidBody_Static::Create(m_pDevice, m_pContext, Desc);
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Prototype_Component_RigidBody_Static_Terrain_Hogsmeade"), pRigid))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
@@ -1365,7 +1425,9 @@ HRESULT CLoader::Loading_For_Effect()
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CPlayer>(g_iStaticLevel, CPlayer::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
/* For.Prototype_GameObject_Terrain */
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CTerrain>(g_iStaticLevel, CTerrain::Create(m_pDevice, m_pContext))))
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,9 +41,12 @@ HRESULT CNomalJapSide::Initialize(void* pArg)
|
||||
|
||||
|
||||
m_pWandParticle = Get_PartObject<CEditEffect>("WandParticle1");
|
||||
m_pWandLight_R = Get_PartObject<CEditEffect>("Wand_Light_R");
|
||||
m_pWandLight = Get_PartObject<CEditEffect>("Wand_Red_Long");
|
||||
m_pWandTrail = Get_PartObject<CTrailObject>();
|
||||
|
||||
|
||||
SAFE_ADDREF(m_pWandLight_R);
|
||||
SAFE_ADDREF(m_pWandLight);
|
||||
SAFE_ADDREF(m_pWandTrail);
|
||||
SAFE_ADDREF(m_pWandParticle);
|
||||
@@ -64,6 +67,7 @@ HRESULT CNomalJapSide::Initialize(void* pArg)
|
||||
m_isTrailEnd = true;
|
||||
|
||||
XMStoreFloat4x4(&m_TrailStopMat, pWand->Get_WorldMatrix());
|
||||
m_pWandLight_R->Set_Visible(false);
|
||||
|
||||
});
|
||||
|
||||
@@ -94,6 +98,7 @@ void CNomalJapSide::Update(_float fTimeDelta)
|
||||
return;
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
m_pWandLight_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
// 파티클생성이 막히면 실행되지 않음
|
||||
if (m_isParticleEnd == false)
|
||||
@@ -130,6 +135,7 @@ HRESULT CNomalJapSide::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
m_isParticleEnd = false; // 파티클이 일정시간이 되면 나오지 않게 하려고
|
||||
|
||||
m_pWandLight->Set_Visible(true);
|
||||
m_pWandLight_R->Set_Visible(true);
|
||||
|
||||
/*트레일 초기화 */
|
||||
m_pWandTrail->Set_Visible(true);
|
||||
@@ -139,7 +145,7 @@ HRESULT CNomalJapSide::Pre_Setting(CGameObject* pObject, void* pArg)
|
||||
/*_vector pPos = pPlayer->Get_WandPos().r[3];*/
|
||||
|
||||
m_pWandLight->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
|
||||
m_pWandLight_R->Get_Component<CTransform>()->Set_State(STATE::POSITION, pWand->Get_WorldPostion());
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -198,6 +204,7 @@ void CNomalJapSide::Free()
|
||||
Safe_Release(m_pWandLight);
|
||||
Safe_Release(m_pWandTrail);
|
||||
Safe_Release(m_pWandParticle);
|
||||
Safe_Release(m_pWandLight_R);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
|
||||
|
||||
@@ -381,15 +381,6 @@ void CPlayer::Update_CameraCoordinateSystem()
|
||||
XMStoreFloat3(&m_vCameraLookDir, xmvCameraLook);
|
||||
m_pInfoInstance->Update_CameraCoordinateSystem(m_vCameraLookDir, m_vRimLightColor);
|
||||
}
|
||||
void CPlayer::Add_Event(_uint AnimIndex, function<void()> Callback, _float fRatio, _bool bLoop)
|
||||
{
|
||||
PendingEvent Desc;
|
||||
Desc.AnimIndex = AnimIndex;
|
||||
Desc.fRatio = fRatio;
|
||||
Desc.Callback = Callback;
|
||||
Desc.bLoop = bLoop;
|
||||
m_PendingEvents.push_back(Desc);
|
||||
}
|
||||
|
||||
_matrix CPlayer::Get_WandPos()
|
||||
{
|
||||
|
||||
@@ -198,9 +198,6 @@ HRESULT CPlayer::Behavior_IdleExitCheck(_float fTimeDelta)
|
||||
else if (m_pGameInstance->Key_Down(DIK_G)) {
|
||||
m_pFSM->Change_State(FSMSTATE::COMBAT);
|
||||
}
|
||||
else if (m_pGameInstance->Key_Down(DIK_B)) {
|
||||
m_pFSM->Change_State(FSMSTATE::BROOM_RIDE);
|
||||
}
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Editor
|
||||
|
||||
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, TRAIL_BLEND, TRAILWB_FOR_BLEND, TRAIL_BLUR, TRAIL_BLOOM, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, END};
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, END };
|
||||
|
||||
|
||||
@@ -104,15 +104,13 @@ class CEffectObject abstract : public CPartObject
|
||||
_float2 vDissolveUVGainAmount = {};
|
||||
_bool isDissolveMove = {};
|
||||
|
||||
|
||||
|
||||
_float3 vDissolveValue = {};
|
||||
|
||||
|
||||
_float3 vPadding1 = {};
|
||||
|
||||
_float fPadding0 = {};
|
||||
_float2 vPadding1 = {};
|
||||
|
||||
_float fLightDeley = {};
|
||||
_float fLightIntensity = {};
|
||||
_float isLightTime = { 0.f };
|
||||
_bool isLightDissolve = {};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class CNomalJapSide final : public CEffect_Container
|
||||
_bool m_isTrailEnd = {};
|
||||
_float4x4 m_TrailStopMat = {};
|
||||
|
||||
|
||||
class CEditEffect* m_pWandLight_R = { nullptr };
|
||||
class CEditEffect* m_pWandLight = { nullptr };
|
||||
class CTrailObject* m_pWandTrail = { nullptr };
|
||||
class CEditEffect* m_pWandParticle = { nullptr };
|
||||
|
||||
@@ -100,9 +100,6 @@ class CPlayer final : public CUnit
|
||||
virtual void Set_Anim();
|
||||
|
||||
function<void()> m_InputAction = nullptr;
|
||||
void Play_Event();
|
||||
void Add_Event(_uint AnimIndex, function<void()> Callback, _float fRatio = 0.f, _bool bLoop = false);
|
||||
|
||||
|
||||
_float3 m_OffsetPos = {};
|
||||
_float m_fAmount = { 1.f };
|
||||
|
||||
@@ -41,13 +41,15 @@ struct ParticleValue
|
||||
float fSizeDrag;
|
||||
float3 vDeltaSize;
|
||||
float2 vDelay;
|
||||
|
||||
float4 vPrePos;
|
||||
};
|
||||
|
||||
|
||||
StructuredBuffer<Particle> g_ParticleBufferInput : register(t0);
|
||||
StructuredBuffer<ParticleValue> g_ParticleValueBufferInput : register(t1);
|
||||
|
||||
Texture2D g_DepthTexture : register(t2);
|
||||
|
||||
RWStructuredBuffer<Particle> g_VBInstanceOutput : register(u0);
|
||||
RWStructuredBuffer<ParticleValue> g_ParticleValueOutput : register(u1);
|
||||
|
||||
@@ -92,8 +94,7 @@ void CS_MAIN(
|
||||
|
||||
if (particleValue.vDelay.x < particleValue.vDelay.y)
|
||||
{
|
||||
|
||||
|
||||
|
||||
g_VBInstanceOutput[iIndex] = particle;
|
||||
g_ParticleValueOutput[iIndex] = particleValue;
|
||||
|
||||
@@ -119,6 +120,9 @@ void CS_MAIN(
|
||||
// 라이프타임 움직임
|
||||
particle.vLifeTime.x += fTimeDelta;
|
||||
|
||||
// 내 이전 위치정보를 저장해둔다
|
||||
particleValue.vPrePos = particle.vTranslation;
|
||||
|
||||
if (particle.vLifeTime.x >= particle.vLifeTime.y)
|
||||
{
|
||||
if (isLoop == false)
|
||||
@@ -143,7 +147,6 @@ void CS_MAIN(
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
if (isMoveForward)
|
||||
{
|
||||
float fTime = (particle.vLifeTime.x / particle.vLifeTime.y);
|
||||
|
||||
@@ -116,6 +116,13 @@ void CComputeShader::Bind_OutPut_SRV(_uint iIndex, _uint iBufferIndex)
|
||||
|
||||
}
|
||||
|
||||
void CComputeShader::Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex)
|
||||
{
|
||||
m_pContext->VSSetShaderResources(iIndex, // 시작슬롯 번호
|
||||
1, // 버퍼 개수
|
||||
&m_pOutputSRV[iBufferIndex]); // 버퍼 시작 주
|
||||
}
|
||||
|
||||
ID3D11UnorderedAccessView* CComputeShader::GetOutputUAV(_uint iIndex) const
|
||||
{
|
||||
return m_pOutputUAV[iIndex];
|
||||
@@ -147,6 +154,8 @@ vector<D3D11_MAPPED_SUBRESOURCE> CComputeShader::ReadBackOutputs()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CComputeShader::Reset()
|
||||
{
|
||||
//다음 랜더링 패스에 연관되지 않도록 초기화
|
||||
|
||||
@@ -605,6 +605,10 @@ HRESULT CGameInstance::Finish_RenderTarget(CVIBuffer_Rect* pVIBuffer, CShader* p
|
||||
{
|
||||
return m_pRenderTarget_Manager->Finish_RenderTarget(pVIBuffer, pShader, wstrRenderTargetOriginal, wstrRenderTargetBloomed, ePass);
|
||||
}
|
||||
HRESULT CGameInstance::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Bind_CS_RenderTarget(iIndex, strTargetTag);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
void CGameInstance::RenderTarget_Debuger()
|
||||
{
|
||||
|
||||
@@ -567,6 +567,8 @@ void CInstance_Model::Drop(_float fTimeDelta)
|
||||
vector<D3D11_MAPPED_SUBRESOURCE> OutSubResources = {};
|
||||
D3D11_MAPPED_SUBRESOURCE VBInstanceResource = {};
|
||||
|
||||
m_pGameInstance->Bind_CS_RenderTarget(2, L"Target_Depth");
|
||||
|
||||
OutSubResources = m_pComputeShader->Dispatch(0, 0, _float3((_float)iGroupCountX, 1.f, 1.f), CSBuffers, m_pConstantBuffer);
|
||||
|
||||
if (SUCCEEDED(m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_DISCARD, 0, &VBInstanceResource)))
|
||||
@@ -745,7 +747,17 @@ HRESULT CInstance_Model::Bind_CS_Output(_uint Index, _uint iBufferIndex)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CInstance_Model::Bind_OutPut_SRV_VS(_uint Index, _uint iBufferIndex)
|
||||
{
|
||||
if (m_pComputeShader == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
m_pComputeShader->Bind_OutPut_SRV_VS(Index, iBufferIndex);
|
||||
|
||||
return S_OK;
|
||||
|
||||
}
|
||||
|
||||
CInstance_Model* CInstance_Model::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const _char* pModelFilePath, MODEL eType, _fmatrix& PreTransformMatrix, _uint iRootBoneIndex)
|
||||
{
|
||||
CInstance_Model* pInstance = new CInstance_Model(pDevice, pContext);
|
||||
|
||||
@@ -126,19 +126,19 @@ HRESULT CLight::Render(CShader* pShader, CVIBuffer* pVIBuffer) const
|
||||
|
||||
/* 라이트를 서서히 감쇄시키기 위한 감쇄값 */
|
||||
|
||||
_float4 vAmbient = _float4(m_LightDesc.vAmbient.x * m_fAmbientRatio,
|
||||
m_LightDesc.vAmbient.y * m_fAmbientRatio,
|
||||
m_LightDesc.vAmbient.z * m_fAmbientRatio,
|
||||
m_LightDesc.vAmbient.w * m_fAmbientRatio);
|
||||
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightAmbient", &vAmbient, sizeof(_float4)))) {
|
||||
|
||||
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightAmbient", &m_LightDesc.vAmbient, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Bind_RawValue("g_vLightSpecular", &m_LightDesc.vSpecular, sizeof(_float4)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightIntensity", &m_fLightIntensity, sizeof(_float)))) {
|
||||
_float fLightIntensity = m_fIntensityRatio * m_fLightIntensity;
|
||||
|
||||
if (FAILED(pShader->Bind_RawValue("g_fLightIntensity", &fLightIntensity, sizeof(_float)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(pShader->Begin(iPassIndex))) {
|
||||
|
||||
@@ -199,6 +199,23 @@ HRESULT CRenderTarget_Manager::Paste_RenderTarget(const _wstring& strTargetTag,
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
|
||||
if (nullptr == pRenderTarget) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
ID3D11ShaderResourceView* pSrc = pRenderTarget->Get_SRV();
|
||||
|
||||
m_pContext->CSSetShaderResources(iIndex, // 시작슬롯 번호
|
||||
1, // 버퍼 개수
|
||||
&pSrc); // 버퍼 시작 주소
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRenderTarget_Manager::Accumulate_RenderTarget(CVIBuffer_Rect* pVIBuffer, CShader* pShader,
|
||||
const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB,
|
||||
const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass)
|
||||
|
||||
@@ -427,6 +427,8 @@ void CRenderer::Render_Effect()
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::EFFECT)])
|
||||
{
|
||||
if (nullptr != pRenderObject)
|
||||
@@ -648,6 +650,7 @@ void CRenderer::Render_Blend()
|
||||
return pSour->Get_Depth() > pDest->Get_Depth();
|
||||
});
|
||||
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::BLEND)])
|
||||
{
|
||||
if (nullptr != pRenderObject) {
|
||||
|
||||
@@ -16,6 +16,7 @@ class ENGINE_DLL CComputeShader final : public CBase
|
||||
public:
|
||||
vector<D3D11_MAPPED_SUBRESOURCE> Dispatch(_uint iSRVIndex, _uint iUAVIndex, _float3 vGroupCount, ID3D11Buffer** ppBuffers, ID3D11Buffer* pConstantBuffer = nullptr);
|
||||
void Bind_OutPut_SRV(_uint iIndex, _uint iBufferIndex);
|
||||
void Bind_OutPut_SRV_VS(_uint iIndex, _uint iBufferIndex);
|
||||
ID3D11ComputeShader* Get_Compute() { return m_pComputeShader; }
|
||||
ID3D11UnorderedAccessView* GetOutputUAV(_uint iIndex) const;
|
||||
vector<D3D11_MAPPED_SUBRESOURCE> ReadBackOutputs();
|
||||
|
||||
@@ -167,6 +167,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Accumulate_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB, const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Finish_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetOriginal, const _wstring& wstrRenderTargetBloomed, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag);
|
||||
#ifdef _DEBUG
|
||||
void RenderTarget_Debuger();
|
||||
HRESULT Render_RenderTarget_Debug(class CShader* pShader, class CVIBuffer_Rect* pVIBuffer);
|
||||
|
||||
@@ -181,6 +181,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
_float3 vDeltaSize = {};
|
||||
|
||||
_float2 vDelay = {};
|
||||
_float4 vPrePos = {};
|
||||
|
||||
}CS_PARTICLE_VALUE_DESC;
|
||||
|
||||
@@ -203,6 +204,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
||||
void Instane_Buffer_ReStruct();
|
||||
_uint Get_NumMeshes() const { return m_iNumMeshes; }
|
||||
HRESULT Bind_CS_Output(_uint Index, _uint iBufferIndex);
|
||||
HRESULT Bind_OutPut_SRV_VS(_uint Index, _uint iBufferIndex);
|
||||
INSTANCE_DESC Get_EffectValue() { return m_InstanceDesc; }
|
||||
HRESULT Load_InstanceModel(HANDLE hFile);
|
||||
private:
|
||||
|
||||
@@ -31,23 +31,31 @@ class ENGINE_DLL CLight final : public CComponent
|
||||
const LIGHT_DESC* Get_LightDesc() { return &m_LightDesc; }
|
||||
void Set_Color(_float4& vDiffuse, _float4& vAmbient, _float4& vSpecular);
|
||||
|
||||
void Reset_AmbientRatio()
|
||||
void Reset_IntensityRatio()
|
||||
{
|
||||
m_fAmbientRatio = 1.f;
|
||||
m_fIntensityRatio = 1.f;
|
||||
m_fAccLightTime = 0.f;
|
||||
|
||||
m_fAccDelayTime = 0.f;
|
||||
}
|
||||
void Update_AmbientRatio(_float fTimeDelta , _float fTime) {
|
||||
void Update_IntensityRatio(_float fTimeDelta , _float fTime , _float fTimeDelay = 0) {
|
||||
|
||||
if (fTime <= 0)
|
||||
return;
|
||||
|
||||
m_fAccDelayTime += fTimeDelta;
|
||||
|
||||
if (m_fAccDelayTime <= fTimeDelay)
|
||||
{
|
||||
m_fIntensityRatio = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
m_fAccLightTime += fTimeDelta;
|
||||
|
||||
m_fAmbientRatio = 1 - (m_fAccLightTime / fTime);
|
||||
m_fIntensityRatio = 1 - (m_fAccLightTime / fTime);
|
||||
|
||||
if (m_fAmbientRatio <= 0)
|
||||
m_fAmbientRatio = 0;
|
||||
if (m_fIntensityRatio <= 0)
|
||||
m_fIntensityRatio = 0;
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -58,8 +66,10 @@ class ENGINE_DLL CLight final : public CComponent
|
||||
_bool m_bUsePowerAttenuation = { true };
|
||||
_float m_fLightAttenuationPower = { 3.30f };
|
||||
|
||||
_float m_fAmbientRatio = { 1.f };
|
||||
_float m_fIntensityRatio = { 1.f };
|
||||
_float m_fAccLightTime = { 0.f };
|
||||
_float m_fAccDelayTime = { 0.f };
|
||||
|
||||
_float m_fLightIntensity = { 4.f };
|
||||
|
||||
// 1 -> Linear,
|
||||
|
||||
@@ -20,6 +20,7 @@ class CRenderTarget_Manager final : public CBase
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Paste_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
HRESULT Bind_CS_RenderTarget(_uint iIndex, const _wstring& strTargetTag);
|
||||
|
||||
HRESULT Accumulate_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTarget_SrcA, const _wstring& wstrRenderTarget_SrcB, const _wstring& wstrRenderTarget_Target, SHADER_PASS_DEFERRED ePass);
|
||||
HRESULT Refit_RenderTarget(class CVIBuffer_Rect* pVIBuffer, class CShader* pShader, const _wstring& wstrRenderTargetInput, const _wstring& wstrRenderTargetOutput, SHADER_PASS_DEFERRED ePass);
|
||||
|
||||
Reference in New Issue
Block a user