251115
This commit is contained in:
@@ -157,6 +157,52 @@ BlendState BS_UIBlend
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
BlendState BS_WB_Acc
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend[0] = one;
|
||||
DestBlend[0] = one;
|
||||
BlendOp[0] = Add;
|
||||
|
||||
SrcBlend[1] = Zero;
|
||||
DestBlend[1] = Inv_Src_Alpha;
|
||||
BlendOp[1] = Add;
|
||||
|
||||
|
||||
SrcBlend[2] = one;
|
||||
DestBlend[2] = one;
|
||||
BlendOp[2] = Add;
|
||||
};
|
||||
|
||||
BlendState BS_WeightBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
|
||||
SrcBlend[0] = Inv_Src_Alpha;
|
||||
DestBlend[0] = Src_Alpha;
|
||||
|
||||
BlendOp[0] = Add;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
|
||||
@@ -99,7 +99,7 @@ void CS_MAIN(
|
||||
}
|
||||
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particle.vTranslation.y = 0.f;
|
||||
|
||||
}
|
||||
|
||||
Billboard(particle);
|
||||
|
||||
@@ -114,7 +114,6 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -188,9 +187,45 @@ struct PS_IN
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vColorTarget : SV_TARGET1;
|
||||
float4 vRevealage : SV_TARGET1;
|
||||
float4 vColorTarget : SV_TARGET2;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
|
||||
|
||||
float3 vColor = fDiffuse.rgb;
|
||||
float fAlpha = fDiffuse.a;
|
||||
|
||||
|
||||
float fWeight =
|
||||
max(
|
||||
min(1.0, max(max(vColor.r, vColor.g), vColor.b) * fAlpha),
|
||||
fAlpha
|
||||
) *
|
||||
clamp(
|
||||
0.03 / (1e-4 + pow(fLinearZ / 200, 4.0)),
|
||||
1e-2, 3e3
|
||||
);
|
||||
|
||||
|
||||
//float fWeight = clamp(0.03f / (1e-5 + pow(fLinearZ, 4.0f)), 0.01, 3e3);
|
||||
//fWeight = max(fWeight, 1.0);
|
||||
//이게 오리지널 웨이트 함수
|
||||
|
||||
//float fWeight = pow(fLinearZ, -2.5);
|
||||
//float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
Out.vRevealage.r = fAlpha;
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
|
||||
@@ -228,7 +263,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDissolve;
|
||||
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
|
||||
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
|
||||
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
|
||||
@@ -322,7 +357,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
discard;
|
||||
}
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
@@ -332,12 +367,15 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
|
||||
|
||||
if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
Out.vColorTarget = vector(g_vEmissive.rgb + vEmissiveMtrl.rgb, g_fColorOption / 10.f);
|
||||
else
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
Out = BlendedWeight(vMtrlDiffuse , In.vProjPos.w);
|
||||
|
||||
|
||||
//if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
// Out.vColorTarget = vector(g_vEmissive.rgb + vEmissiveMtrl.rgb, g_fColorOption / 10.f);
|
||||
//else
|
||||
// Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -528,7 +566,7 @@ technique11 DefaultTechnique
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
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_NON_NORMALMAP();
|
||||
@@ -544,6 +582,8 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass ScissorPass
|
||||
{
|
||||
SetRasterizerState(RS_Scissor);
|
||||
@@ -107,6 +108,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass UIPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -116,6 +118,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass UVMovePass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -125,6 +128,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_UVMove();
|
||||
}
|
||||
|
||||
pass TrailPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -134,4 +138,5 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Trail();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -157,6 +157,52 @@ BlendState BS_UIBlend
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
BlendState BS_WB_Acc
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend[0] = one;
|
||||
DestBlend[0] = one;
|
||||
BlendOp[0] = Add;
|
||||
|
||||
SrcBlend[1] = Zero;
|
||||
DestBlend[1] = Inv_Src_Alpha;
|
||||
BlendOp[1] = Add;
|
||||
|
||||
|
||||
SrcBlend[2] = one;
|
||||
DestBlend[2] = one;
|
||||
BlendOp[2] = Add;
|
||||
};
|
||||
|
||||
BlendState BS_WeightBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
|
||||
SrcBlend[0] = Inv_Src_Alpha;
|
||||
DestBlend[0] = Src_Alpha;
|
||||
|
||||
BlendOp[0] = Add;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
|
||||
@@ -99,7 +99,7 @@ void CS_MAIN(
|
||||
}
|
||||
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particle.vTranslation.y = 0.f;
|
||||
|
||||
}
|
||||
|
||||
Billboard(particle);
|
||||
|
||||
@@ -29,10 +29,15 @@ Texture2D g_NormalTexture : register(t1);
|
||||
Texture2D g_MaskingTexture : register(t2);
|
||||
Texture2D g_DissolveTexture : register(t3);
|
||||
Texture2D g_NoiseTexture : register(t4);
|
||||
Texture2D g_EmissiveTexture : register(t6);
|
||||
|
||||
StructuredBuffer<ParticleValue> g_ParticleValue : register(t5);
|
||||
|
||||
|
||||
Texture2D g_EmissiveTexture : register(t6);
|
||||
Texture2D g_DepthStencilTexture : register(t7);
|
||||
|
||||
|
||||
|
||||
float4 g_vCamPosition;
|
||||
|
||||
vector g_vColor;
|
||||
@@ -70,7 +75,6 @@ bool g_isEmissive;
|
||||
|
||||
bool g_isDiffuseUVMove;
|
||||
bool g_isMaskUVMove;
|
||||
bool g_isBlendedWeight;
|
||||
|
||||
float g_fFar;
|
||||
|
||||
@@ -115,7 +119,6 @@ float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
|
||||
|
||||
}
|
||||
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
@@ -189,9 +192,49 @@ struct PS_IN
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vColorTarget : SV_TARGET1;
|
||||
float4 vRevealage : SV_TARGET1;
|
||||
float4 vColorTarget : SV_TARGET2;
|
||||
};
|
||||
|
||||
|
||||
PS_OUT BlendedWeight(vector fDiffuse, float fLinearZ , PS_IN In , float fProjZ)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
|
||||
|
||||
float3 vColor = fDiffuse.rgb;
|
||||
float fAlpha = fDiffuse.a;
|
||||
|
||||
|
||||
// float fWeight =
|
||||
//max(
|
||||
// min(1.0, max(max(vColor.r, vColor.g), vColor.b) * fAlpha),
|
||||
// fAlpha
|
||||
//) *
|
||||
//clamp(
|
||||
// 0.01 / (1e-4 + pow(fLinearZ / 200, 4.0)),
|
||||
// 0.01f, 1000
|
||||
//);
|
||||
|
||||
|
||||
|
||||
float fWeight = clamp(0.03f / (1e-5 + pow(fLinearZ, 2.0f)), 0.01, 3e3);
|
||||
fWeight = max(fWeight, 1.0);
|
||||
|
||||
//이게 오리지널 웨이트 함수
|
||||
|
||||
//float fWeight = pow(fLinearZ, -2.5);
|
||||
//float fWeight = clamp(pow(fLinearZ, -2.5f), 1.0f, 1000.0f);
|
||||
|
||||
Out.vDiffuse = vector(vColor.rgb * fAlpha, fAlpha) * fWeight;
|
||||
|
||||
|
||||
Out.vRevealage.a = fAlpha;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
|
||||
@@ -229,7 +272,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
vector vMtrlNoise;
|
||||
vector vMtrlDissolve;
|
||||
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float fAnimIndex = g_ParticleValue[In.iGPUIndex].vAniIndex.x;
|
||||
float2 vDiffuseTime = g_ParticleValue[In.iGPUIndex].vDiffuseUVMoveTime;
|
||||
float2 vMaskingTime = g_ParticleValue[In.iGPUIndex].vMaskingUVMoveTime;
|
||||
float2 vNoiseUVMoveTime = g_ParticleValue[In.iGPUIndex].vNoiseUVMoveTime;
|
||||
@@ -315,6 +358,9 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
|
||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||
|
||||
if (vMtrlDiffuse.a <= 0.f)
|
||||
discard;
|
||||
|
||||
if (g_isDissolve == true)
|
||||
{
|
||||
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
@@ -323,7 +369,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
discard;
|
||||
}
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
|
||||
@@ -333,12 +379,24 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
|
||||
int2 texel = int2(In.vPosition.xy);
|
||||
|
||||
if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
Out.vColorTarget = vector(g_vEmissive.rgb + vEmissiveMtrl.rgb, g_fColorOption / 10.f);
|
||||
else
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
float fDepthStencilValue = g_DepthStencilTexture.Load(int3(texel, 0));
|
||||
|
||||
|
||||
float bias = 0.0005f;
|
||||
|
||||
if (fDepthStencilValue + bias < In.vProjPos.z / In.vProjPos.w)
|
||||
discard;
|
||||
|
||||
Out = BlendedWeight(vMtrlDiffuse, In.vProjPos.w, In, In.vProjPos.z / In.vProjPos.w);
|
||||
|
||||
|
||||
//if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
// Out.vColorTarget = vector(g_vEmissive.rgb + vEmissiveMtrl.rgb, g_fColorOption / 10.f);
|
||||
//else
|
||||
// Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -528,8 +586,8 @@ technique11 DefaultTechnique
|
||||
pass NON_NOMALMAP
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
SetDepthStencilState(DSS_None, 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_NON_NORMALMAP();
|
||||
@@ -545,6 +603,8 @@ technique11 DefaultTechnique
|
||||
PixelShader = compile ps_5_0 PS_BLUR();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass ScissorPass
|
||||
{
|
||||
SetRasterizerState(RS_Scissor);
|
||||
@@ -107,6 +108,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass UIPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -116,6 +118,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
pass UVMovePass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -125,6 +128,7 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_UVMove();
|
||||
}
|
||||
|
||||
pass TrailPass
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
@@ -134,4 +138,5 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_Trail();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
|
||||
Texture2D g_MixedDiffuseTexture;
|
||||
Texture2D g_RevealageTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMixedDiffuse = g_MixedDiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
vector vRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord);
|
||||
|
||||
if(vRevealage.b >= 1.f)
|
||||
discard;
|
||||
|
||||
Out.vBackBuffer = vector(vMixedDiffuse.rgb / max(vMixedDiffuse.a, 1e-5), 1 - vRevealage.r);
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass WeightBlend
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -40,6 +40,9 @@ HRESULT CEffectObject::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_DepthStencil(m_pShaderCom, "g_DepthStencilTexture")))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pInstance_ModelCom->Bind_CS_Output(5, 1)))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -48,8 +51,6 @@ HRESULT CEffectObject::Render()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
@@ -97,6 +98,18 @@ HRESULT CEffectObject::Render_Blur()
|
||||
|
||||
HRESULT CEffectObject::Load(const _char* pFilePath , LEVEL eLevel)
|
||||
{
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pNoise_TextureCom);
|
||||
SAFE_RELEASE(m_pMasking_TextureCom);
|
||||
SAFE_RELEASE(m_pDissolve_TextureCom);
|
||||
SAFE_RELEASE(m_pEmissive_TextureCom);
|
||||
|
||||
SAFE_RELEASE(m_pInstance_ModelCom);
|
||||
|
||||
if (m_pLightCom != nullptr)
|
||||
SAFE_RELEASE(m_pLightCom);
|
||||
|
||||
_string strPerfectFilePath = pFilePath;
|
||||
|
||||
strPerfectFilePath += ".bin";
|
||||
|
||||
@@ -303,6 +303,7 @@ HRESULT CEffect_Editor::Load_Edit(const _char* pPath)
|
||||
|
||||
if (m_pEditEffect == nullptr)
|
||||
return E_FAIL;
|
||||
|
||||
|
||||
if (FAILED(m_pEditEffect->Load(pPath, LEVEL::EFFECT)))
|
||||
{
|
||||
@@ -404,6 +405,7 @@ void CEffect_Editor::Describe_Entity()
|
||||
return;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ImGui::EndPopup();
|
||||
|
||||
@@ -97,7 +97,6 @@ class CEffectObject abstract : public CPartObject
|
||||
_string m_strModelName = {};
|
||||
_string m_strEmissiveName = {};
|
||||
|
||||
_bool m_isBlendedWeight = {};
|
||||
|
||||
public:
|
||||
virtual void Free() override;
|
||||
|
||||
@@ -157,6 +157,52 @@ BlendState BS_UIBlend
|
||||
RenderTargetWriteMask[0] = 0x0F; // RGBA 모두 출력
|
||||
};
|
||||
|
||||
BlendState BS_WB_Acc
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
SrcBlend[0] = one;
|
||||
DestBlend[0] = one;
|
||||
BlendOp[0] = Add;
|
||||
|
||||
SrcBlend[1] = Zero;
|
||||
DestBlend[1] = Inv_Src_Alpha;
|
||||
BlendOp[1] = Add;
|
||||
|
||||
|
||||
SrcBlend[2] = one;
|
||||
DestBlend[2] = one;
|
||||
BlendOp[2] = Add;
|
||||
};
|
||||
|
||||
BlendState BS_WeightBlend
|
||||
{
|
||||
BlendEnable[0] = true;
|
||||
BlendEnable[1] = true;
|
||||
BlendEnable[2] = true;
|
||||
BlendEnable[3] = true;
|
||||
BlendEnable[4] = true;
|
||||
BlendEnable[5] = true;
|
||||
BlendEnable[6] = true;
|
||||
BlendEnable[7] = true;
|
||||
|
||||
|
||||
SrcBlend[0] = Inv_Src_Alpha;
|
||||
DestBlend[0] = Src_Alpha;
|
||||
|
||||
BlendOp[0] = Add;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
float ShadowVisibility_hwPCF(Texture2D ShadowMap, float4 vLightClip, float2 vShadowMapSize, float bias)
|
||||
{
|
||||
float2 uv = float2(vLightClip.x / vLightClip.w, -vLightClip.y / vLightClip.w) * 0.5f + 0.5f;
|
||||
|
||||
@@ -99,7 +99,7 @@ void CS_MAIN(
|
||||
}
|
||||
|
||||
particle.vLifeTime.x = 0.f;
|
||||
particle.vTranslation.y = 0.f;
|
||||
|
||||
}
|
||||
|
||||
Billboard(particle);
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
matrix g_WorldMatrix, g_ViewMatrix, g_ProjMatrix;
|
||||
|
||||
|
||||
Texture2D g_MixedDiffuseTexture;
|
||||
Texture2D g_RevealageTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
float3 vPosition : POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct VS_OUT
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
VS_OUT VS_MAIN(VS_IN In)
|
||||
{
|
||||
VS_OUT Out;
|
||||
|
||||
matrix matWV, matWVP;
|
||||
|
||||
matWV = mul(g_WorldMatrix, g_ViewMatrix);
|
||||
matWVP = mul(matWV, g_ProjMatrix);
|
||||
|
||||
Out.vPosition = mul(vector(In.vPosition, 1.f), matWVP);
|
||||
Out.vTexcoord = In.vTexcoord;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
float2 vTexcoord : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct PS_OUT
|
||||
{
|
||||
float4 vBackBuffer : SV_TARGET0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMixedDiffuse = g_MixedDiffuseTexture.Sample(PointSampler, In.vTexcoord);
|
||||
vector vRevealage = g_RevealageTexture.Sample(PointSampler, In.vTexcoord);
|
||||
|
||||
if(vRevealage.b >= 1.f)
|
||||
discard;
|
||||
|
||||
Out.vBackBuffer = vector(vMixedDiffuse.rgb / max(vMixedDiffuse.a, 1e-5), 1 - vRevealage.r);
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 DefaultTechnique
|
||||
{
|
||||
pass WeightBlend
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_None, 0);
|
||||
SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -539,6 +539,10 @@ call Update_Lib.bat
|
||||
<None Include="..\Public\fMod\fmod_errors.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_WeightBlend.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">5.0</ShaderModel>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_LastColor.hlsl">
|
||||
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Effect</ShaderType>
|
||||
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">5.0</ShaderModel>
|
||||
|
||||
@@ -1128,5 +1128,8 @@
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_LastColor.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
<FxCompile Include="..\Bin\Resources\ShaderFiles\Shader_WeightBlend.hlsl">
|
||||
<Filter>99.Define\01.SHADER</Filter>
|
||||
</FxCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -226,6 +226,11 @@ void CGameInstance::Render_End()
|
||||
#endif // _DEBUG
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Bind_DepthStencil(CShader* pShader, const _char* pContantName)
|
||||
{
|
||||
return m_pGraphic_Device->Bind_DepthStencil(pShader , pContantName);
|
||||
}
|
||||
|
||||
_float CGameInstance::Get_TimeDelta(const _wstring& strTimerTag)
|
||||
{
|
||||
return m_pTimer_Manager->Get_TimeDelta(strTimerTag);
|
||||
@@ -485,6 +490,11 @@ HRESULT CGameInstance::Begin_MRT_Include_BackBuffer(const _wstring& strMRTTag, I
|
||||
return m_pRenderTarget_Manager->Begin_MRT_Include_BackBuffer(strMRTTag, pDSV);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag)
|
||||
{
|
||||
return m_pRenderTarget_Manager->Begin_MRT_NO_DepthStencil(strMRTTag);
|
||||
}
|
||||
|
||||
HRESULT CGameInstance::End_MRT()
|
||||
{
|
||||
return m_pRenderTarget_Manager->End_MRT();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "Graphic_Device.h"
|
||||
#include "Shader.h"
|
||||
|
||||
CGraphic_Device::CGraphic_Device()
|
||||
: m_pDevice{ nullptr }
|
||||
@@ -83,6 +84,14 @@ HRESULT CGraphic_Device::Present()
|
||||
return m_pSwapChain->Present(0, 0);
|
||||
}
|
||||
|
||||
HRESULT CGraphic_Device::Bind_DepthStencil(CShader* pShader, const _char* pContantName)
|
||||
{
|
||||
if (FAILED(pShader->Bind_SRV(pContantName, m_pDepthStencilSRV)))
|
||||
return E_FAIL;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
HRESULT CGraphic_Device::Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY)
|
||||
{
|
||||
@@ -172,20 +181,37 @@ HRESULT CGraphic_Device::Ready_DepthStencilView(_uint iWinCX, _uint iWinCY)
|
||||
TextureDesc.Height = iWinCY;
|
||||
TextureDesc.MipLevels = 1;
|
||||
TextureDesc.ArraySize = 1;
|
||||
TextureDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
TextureDesc.Format = DXGI_FORMAT_R24G8_TYPELESS;
|
||||
|
||||
TextureDesc.SampleDesc.Quality = 0;
|
||||
TextureDesc.SampleDesc.Count = 1;
|
||||
|
||||
TextureDesc.Usage = D3D11_USAGE_DEFAULT;
|
||||
TextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
|
||||
TextureDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE;
|
||||
TextureDesc.CPUAccessFlags = 0;
|
||||
TextureDesc.MiscFlags = 0;
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pDepthStencilTexture)))
|
||||
return E_FAIL;
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pDepthStencilTexture, nullptr, &m_pDepthStencilView)))
|
||||
D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc = {};
|
||||
dsvDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
|
||||
dsvDesc.Texture2D.MipSlice = 0;
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pDepthStencilTexture, &dsvDesc, &m_pDepthStencilView)))
|
||||
return E_FAIL;
|
||||
|
||||
/* DepthStencil SRV */
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
|
||||
srvDesc.Format = DXGI_FORMAT_R24_UNORM_X8_TYPELESS; // 뎁스 샘플링용
|
||||
srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
|
||||
srvDesc.Texture2D.MipLevels = 1;
|
||||
srvDesc.Texture2D.MostDetailedMip = 0;
|
||||
|
||||
if(FAILED(m_pDevice->CreateShaderResourceView(pDepthStencilTexture, &srvDesc, &m_pDepthStencilSRV)))
|
||||
return E_FAIL;
|
||||
|
||||
SAFE_RELEASE(pDepthStencilTexture);
|
||||
@@ -212,6 +238,7 @@ void CGraphic_Device::Free()
|
||||
SAFE_RELEASE(m_pDepthStencilView);
|
||||
SAFE_RELEASE(m_pBackBufferRTV);
|
||||
SAFE_RELEASE(m_pDeviceContext);
|
||||
SAFE_RELEASE(m_pDepthStencilSRV);
|
||||
|
||||
#if defined(DEBUG) || defined(_DEBUG)
|
||||
ID3D11Debug* d3dDebug;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Prototype_Manager.h"
|
||||
#include "GameObject.h"
|
||||
|
||||
@@ -115,6 +115,13 @@ HRESULT CPrototype_Manager::Ready_EngineAssets()
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(Add_Asset_Prototype(g_iStaticLevel, TEXT("FX_WEIGHTBELND"),
|
||||
CShader::Create(m_pDevice, m_pContext, TEXT("../Bin/Resources/ShaderFiles/Shader_WeightBlend.hlsl"),
|
||||
VTXPOSTEX::Elements, VTXPOSTEX::iNumElements)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "RenderTarget_Manager.h"
|
||||
#include "RenderTarget.h"
|
||||
|
||||
@@ -114,6 +114,33 @@ HRESULT CRenderTarget_Manager::Begin_MRT_Include_BackBuffer(const _wstring& strM
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRenderTarget_Manager::Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag)
|
||||
{
|
||||
m_pContext->OMGetRenderTargets(1, &m_pBackBufferRTV, &m_pOriginalDSV);
|
||||
|
||||
list<CRenderTarget*>* pMRTList = Find_MRT(strMRTTag);
|
||||
|
||||
if (nullptr == pMRTList)
|
||||
return E_FAIL;
|
||||
|
||||
_uint iNumRenderTargets = { 0 };
|
||||
ID3D11RenderTargetView* pRenderTargetViews[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT] = {};
|
||||
|
||||
m_pContext->OMSetRenderTargets(0, nullptr, nullptr);
|
||||
|
||||
for (auto& pRenderTarget : *pMRTList)
|
||||
{
|
||||
pRenderTarget->Clear();
|
||||
pRenderTargetViews[iNumRenderTargets++] = pRenderTarget->Get_RTV();
|
||||
}
|
||||
if (0 == iNumRenderTargets) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pContext->OMSetRenderTargets(iNumRenderTargets, pRenderTargetViews, nullptr);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
HRESULT CRenderTarget_Manager::Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D)
|
||||
{
|
||||
CRenderTarget* pRenderTarget = Find_RenderTarget(strTargetTag);
|
||||
|
||||
@@ -111,6 +111,7 @@ void CRenderer::Render()
|
||||
Render_Blur();
|
||||
Render_Combined();
|
||||
Render_Effect();
|
||||
Render_WeightBlend();
|
||||
Render_NonLight();
|
||||
Render_Blend();
|
||||
Render_LastColor();
|
||||
@@ -317,10 +318,11 @@ void CRenderer::Render_Combined()
|
||||
|
||||
void CRenderer::Render_Effect()
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Begin_MRT_Include_BackBuffer(TEXT("MRT_Color")))) {
|
||||
if (FAILED(m_pGameInstance->Begin_MRT_NO_DepthStencil(TEXT("MRT_WB")))) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::EFFECT)])
|
||||
{
|
||||
if (nullptr != pRenderObject)
|
||||
@@ -337,6 +339,30 @@ void CRenderer::Render_Effect()
|
||||
}
|
||||
}
|
||||
|
||||
void CRenderer::Render_WeightBlend()
|
||||
{
|
||||
// Bind_Resorces
|
||||
|
||||
m_pWeightBlendShader->Bind_Matrix("g_WorldMatrix", &m_WorldMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix);
|
||||
m_pWeightBlendShader->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_WB_Color"), m_pWeightBlendShader, "g_MixedDiffuseTexture"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_WB_Revealage"), m_pWeightBlendShader, "g_RevealageTexture"))) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_pWeightBlendShader->Begin(0);
|
||||
|
||||
m_pVIBuffer->Bind_Resources();
|
||||
m_pVIBuffer->Render();
|
||||
|
||||
}
|
||||
|
||||
void CRenderer::Render_NonLight()
|
||||
{
|
||||
for (auto& pRenderObject : m_RenderObjects[ENUM_CLASS(RENDER::NONLIGHT)])
|
||||
@@ -464,9 +490,9 @@ void CRenderer::Render_LastColor()
|
||||
|
||||
}
|
||||
|
||||
HRESULT CRenderer::Ready_DepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
HRESULT CRenderer::Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
{
|
||||
ID3D11Texture2D* pDepthStencilTexture = nullptr;
|
||||
ID3D11Texture2D* pShadowDepthStencilTexture = nullptr;
|
||||
|
||||
D3D11_TEXTURE2D_DESC TextureDesc;
|
||||
ZeroMemory(&TextureDesc, sizeof(D3D11_TEXTURE2D_DESC));
|
||||
@@ -485,16 +511,16 @@ HRESULT CRenderer::Ready_DepthStencilView(_uint iSizeX, _uint iSizeY)
|
||||
TextureDesc.CPUAccessFlags = 0;
|
||||
TextureDesc.MiscFlags = 0;
|
||||
|
||||
if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pDepthStencilTexture))) {
|
||||
if (FAILED(m_pDevice->CreateTexture2D(&TextureDesc, nullptr, &pShadowDepthStencilTexture))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pDepthStencilTexture, nullptr, &m_pShadowDSV))) {
|
||||
if (FAILED(m_pDevice->CreateDepthStencilView(pShadowDepthStencilTexture, nullptr, &m_pShadowDSV))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
SAFE_RELEASE(pDepthStencilTexture);
|
||||
SAFE_RELEASE(pShadowDepthStencilTexture);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -608,19 +634,20 @@ HRESULT CRenderer::Initialize()
|
||||
|
||||
/*WB_COLOR*/
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Color"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
/* WB_A*/
|
||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_WB_Revealage"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||
DXGI_FORMAT_R16G16B16A16_FLOAT, _float4(1.0f, 1.0f, 1.0f, 1.0f)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
if (FAILED(Ready_DepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) {
|
||||
|
||||
if (FAILED(Ready_ShadowDepthStencilView(g_iMaxShadowWidth, g_iMaxShadowHeight))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -703,7 +730,12 @@ HRESULT CRenderer::Initialize()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pWeightBlendShader = (CShader*)m_pGameInstance->Clone_Asset_Prototype(g_iStaticLevel, TEXT("FX_WEIGHTBELND"), nullptr, nullptr);
|
||||
|
||||
if (nullptr == m_pWeightBlendShader) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_pVIBuffer = CVIBuffer_Rect::Create(m_pDevice, m_pContext);
|
||||
if (nullptr == m_pVIBuffer) {
|
||||
return E_FAIL;
|
||||
@@ -752,6 +784,7 @@ void CRenderer::Free()
|
||||
SAFE_RELEASE(m_pShadowDSV);
|
||||
SAFE_RELEASE(m_pShader);
|
||||
SAFE_RELEASE(m_pLastColorShader);
|
||||
SAFE_RELEASE(m_pWeightBlendShader);
|
||||
SAFE_RELEASE(m_pVIBuffer);
|
||||
SAFE_RELEASE(m_pDevice);
|
||||
SAFE_RELEASE(m_pContext);
|
||||
|
||||
@@ -27,6 +27,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
public:
|
||||
void Render_Begin(const _float4* pClearColor);
|
||||
void Render_End();
|
||||
HRESULT Bind_DepthStencil(class CShader* pShader, const _char* pContantName);
|
||||
#pragma endregion
|
||||
|
||||
#pragma region TIMER_MANAGER
|
||||
@@ -149,6 +150,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
||||
HRESULT Add_MRT(const _wstring& strMultiRenderTargetKey, const _wstring& strRenderTargetKey);
|
||||
HRESULT Begin_MRT(const _wstring& strMRTTag, ID3D11DepthStencilView* pDSV = nullptr);
|
||||
HRESULT Begin_MRT_Include_BackBuffer(const _wstring& strMRTTag, ID3D11DepthStencilView* pDSV = nullptr);
|
||||
HRESULT Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag);
|
||||
HRESULT End_MRT();
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
|
||||
@@ -20,6 +20,8 @@ class CGraphic_Device final
|
||||
|
||||
HRESULT Present();
|
||||
|
||||
HRESULT Bind_DepthStencil(class CShader* pShader, const _char* pContantName);
|
||||
|
||||
private:
|
||||
ID3D11Device* m_pDevice = { nullptr };
|
||||
ID3D11DeviceContext* m_pDeviceContext = { nullptr };
|
||||
@@ -27,7 +29,7 @@ class CGraphic_Device final
|
||||
IDXGISwapChain* m_pSwapChain = { nullptr };
|
||||
ID3D11RenderTargetView* m_pBackBufferRTV = { nullptr };
|
||||
ID3D11DepthStencilView* m_pDepthStencilView = { nullptr };
|
||||
|
||||
ID3D11ShaderResourceView* m_pDepthStencilSRV = { nullptr };
|
||||
private:
|
||||
HRESULT Ready_SwapChain(HWND hWnd, _uint iWinCX, _uint iWinCY);
|
||||
HRESULT Ready_BackBufferRenderTargetView();
|
||||
@@ -38,4 +40,4 @@ class CGraphic_Device final
|
||||
virtual void Free() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include "Base.h"
|
||||
|
||||
NS_BEGIN(Engine)
|
||||
@@ -14,6 +14,7 @@ class CRenderTarget_Manager final : public CBase
|
||||
HRESULT Add_MRT(const _wstring& strMultiRenderTargetKey, const _wstring& strRenderTargetKey);
|
||||
HRESULT Begin_MRT(const _wstring& strMRTTag, ID3D11DepthStencilView* pDSV);
|
||||
HRESULT Begin_MRT_Include_BackBuffer(const _wstring& strMRTTag, ID3D11DepthStencilView* pDSV);
|
||||
HRESULT Begin_MRT_NO_DepthStencil(const _wstring& strMRTTag);
|
||||
HRESULT End_MRT();
|
||||
HRESULT Bind_RenderTarget(const _wstring& strTargetTag, class CShader* pShader, const _char* pConstantName);
|
||||
HRESULT Copy_RenderTarget(const _wstring& strTargetTag, ID3D11Texture2D* pTexture2D);
|
||||
@@ -48,4 +49,4 @@ class CRenderTarget_Manager final : public CBase
|
||||
virtual void Free()override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
|
||||
@@ -32,6 +32,7 @@ class CRenderer final : public CBase
|
||||
private:
|
||||
class CShader* m_pShader = { nullptr };
|
||||
class CShader* m_pLastColorShader = { nullptr };
|
||||
class CShader* m_pWeightBlendShader = { nullptr };
|
||||
class CVIBuffer_Rect* m_pVIBuffer = { nullptr };
|
||||
|
||||
private:
|
||||
@@ -59,6 +60,7 @@ class CRenderer final : public CBase
|
||||
void Render_Blur();
|
||||
void Render_Combined();
|
||||
void Render_Effect();
|
||||
void Render_WeightBlend();
|
||||
void Render_NonLight();
|
||||
void Render_Blend();
|
||||
void Render_LastColor();
|
||||
@@ -71,9 +73,7 @@ class CRenderer final : public CBase
|
||||
#endif
|
||||
|
||||
private:
|
||||
HRESULT Ready_DepthStencilView(_uint iSizeX, _uint iSizeY);
|
||||
|
||||
|
||||
HRESULT Ready_ShadowDepthStencilView(_uint iSizeX, _uint iSizeY);
|
||||
|
||||
private:
|
||||
HRESULT Initialize();
|
||||
@@ -82,4 +82,4 @@ class CRenderer final : public CBase
|
||||
virtual void Free();
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
Reference in New Issue
Block a user