Merge branch 'Effect_1113_Follow' into Develope
This commit is contained in:
@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
|||||||
float g_fLightRange;
|
float g_fLightRange;
|
||||||
float g_fSpotInnerAngle;
|
float g_fSpotInnerAngle;
|
||||||
float g_fSpotOuterAngle;
|
float g_fSpotOuterAngle;
|
||||||
|
|
||||||
vector g_vLightDir;
|
vector g_vLightDir;
|
||||||
vector g_vLightPos;
|
vector g_vLightPos;
|
||||||
vector g_vCamPosition;
|
vector g_vCamPosition;
|
||||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
|||||||
Texture2D g_PreShadowTexture;
|
Texture2D g_PreShadowTexture;
|
||||||
Texture2D g_BlurTexture;
|
Texture2D g_BlurTexture;
|
||||||
Texture2D g_BlurXTexture;
|
Texture2D g_BlurXTexture;
|
||||||
|
Texture2D g_BlurWeightTexture;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
|||||||
vector g_vLightAmbient;
|
vector g_vLightAmbient;
|
||||||
vector g_vLightSpecular;
|
vector g_vLightSpecular;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct VS_IN
|
struct VS_IN
|
||||||
{
|
{
|
||||||
float3 vPosition : POSITION;
|
float3 vPosition : POSITION;
|
||||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
float g_fWeights[13] =
|
float g_fWeights[32] =
|
||||||
{
|
{
|
||||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||||
0.0448, 0.0218, 0.0090
|
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||||
|
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||||
{
|
{
|
||||||
PS_OUT_BACKBUFFER Out;
|
PS_OUT_BACKBUFFER Out;
|
||||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
//{
|
//{
|
||||||
// Out.vBackBuffer *= 0.5f;
|
// Out.vBackBuffer *= 0.5f;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x;
|
vTexcoord.x = In.vTexcoord.x;
|
||||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBackBuffer += vColor;
|
Out.vBackBuffer += vColor;
|
||||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
|||||||
float2 vTexcoord;
|
float2 vTexcoord;
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//TODO 블러 조절 해보려햇는데 실패함..
|
||||||
|
|
||||||
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||||
vTexcoord.y = In.vTexcoord.y;
|
vTexcoord.y = In.vTexcoord.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBlurX = vColor;
|
Out.vBlurX = vColor;
|
||||||
|
|||||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
|
|
||||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||||
|
|
||||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
|
|
||||||
|
|
||||||
if (0.f == vColorTexture.a)
|
if (0.f == vColorTexture.a)
|
||||||
{
|
{
|
||||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
switch (iOption)
|
switch (iOption)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
|||||||
float g_fLightRange;
|
float g_fLightRange;
|
||||||
float g_fSpotInnerAngle;
|
float g_fSpotInnerAngle;
|
||||||
float g_fSpotOuterAngle;
|
float g_fSpotOuterAngle;
|
||||||
|
|
||||||
vector g_vLightDir;
|
vector g_vLightDir;
|
||||||
vector g_vLightPos;
|
vector g_vLightPos;
|
||||||
vector g_vCamPosition;
|
vector g_vCamPosition;
|
||||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
|||||||
Texture2D g_PreShadowTexture;
|
Texture2D g_PreShadowTexture;
|
||||||
Texture2D g_BlurTexture;
|
Texture2D g_BlurTexture;
|
||||||
Texture2D g_BlurXTexture;
|
Texture2D g_BlurXTexture;
|
||||||
|
Texture2D g_BlurWeightTexture;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
|||||||
vector g_vLightAmbient;
|
vector g_vLightAmbient;
|
||||||
vector g_vLightSpecular;
|
vector g_vLightSpecular;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct VS_IN
|
struct VS_IN
|
||||||
{
|
{
|
||||||
float3 vPosition : POSITION;
|
float3 vPosition : POSITION;
|
||||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
float g_fWeights[13] =
|
float g_fWeights[32] =
|
||||||
{
|
{
|
||||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||||
0.0448, 0.0218, 0.0090
|
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||||
|
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||||
{
|
{
|
||||||
PS_OUT_BACKBUFFER Out;
|
PS_OUT_BACKBUFFER Out;
|
||||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
//{
|
//{
|
||||||
// Out.vBackBuffer *= 0.5f;
|
// Out.vBackBuffer *= 0.5f;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x;
|
vTexcoord.x = In.vTexcoord.x;
|
||||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBackBuffer += vColor;
|
Out.vBackBuffer += vColor;
|
||||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
|||||||
float2 vTexcoord;
|
float2 vTexcoord;
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//TODO 블러 조절 해보려햇는데 실패함..
|
||||||
|
|
||||||
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||||
vTexcoord.y = In.vTexcoord.y;
|
vTexcoord.y = In.vTexcoord.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBlurX = vColor;
|
Out.vBlurX = vColor;
|
||||||
|
|||||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
|
|
||||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||||
|
|
||||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
|
|
||||||
|
|
||||||
if (0.f == vColorTexture.a)
|
if (0.f == vColorTexture.a)
|
||||||
{
|
{
|
||||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
switch (iOption)
|
switch (iOption)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "Engine_Shader_Defines.hlsli"
|
#include "Engine_Shader_Defines.hlsli"
|
||||||
|
|
||||||
|
float PI = 3.141592;
|
||||||
|
|
||||||
struct ParticleValue
|
struct ParticleValue
|
||||||
{
|
{
|
||||||
@@ -41,10 +42,18 @@ float2 g_vMaskingUVGainAmount;
|
|||||||
float2 g_vDiffuseNoiseUVGainAmount;
|
float2 g_vDiffuseNoiseUVGainAmount;
|
||||||
float2 g_vMaskNoiseUVGainAmount;
|
float2 g_vMaskNoiseUVGainAmount;
|
||||||
|
|
||||||
|
//
|
||||||
|
int g_iMaskMoveLerpOption;
|
||||||
|
int g_iDiffuseMoveLerpOption;
|
||||||
|
int g_iMaskNoiseMoveLerpOption;
|
||||||
|
int g_iDiffuseNoiseMoveLerpOption;
|
||||||
|
//
|
||||||
|
|
||||||
float2 g_vUVCutting;
|
float2 g_vUVCutting;
|
||||||
float2 g_vUVMaskCutting;
|
float2 g_vUVMaskCutting;
|
||||||
|
|
||||||
|
|
||||||
|
int g_iBlurWeight; // 블러 강도
|
||||||
float g_fBlurIntensity; //블러 세기
|
float g_fBlurIntensity; //블러 세기
|
||||||
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
||||||
|
|
||||||
@@ -62,6 +71,47 @@ bool g_isMaskUVMove;
|
|||||||
|
|
||||||
float g_fFar;
|
float g_fFar;
|
||||||
|
|
||||||
|
float2 SelectLerpUV(float2 fAmount, float _fRatio, int iSelectOption)
|
||||||
|
{
|
||||||
|
if (iSelectOption < 0)
|
||||||
|
return float2(0 , 0);
|
||||||
|
|
||||||
|
float fRatio = _fRatio;
|
||||||
|
switch (iSelectOption)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
fRatio = fRatio; // Linear
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
fRatio = fRatio * fRatio; // EaseInQuad 후반에 속도 증가
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
fRatio = 1 - (1 - fRatio * fRatio); // EaseOutQuad 초반에 속도 증가
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
fRatio = fRatio * fRatio * fRatio; // EaseInCubic 더 강하게 후반 속도 증가
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
fRatio = 1 - (1 - fRatio * fRatio * fRatio); // EaseOutCubic 더 강하게 초반 속도 증가
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
fRatio = 0.5f * (1 - cos(PI * fRatio)); // EaseInOutSin 사인 곡선
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
fRatio = sin(13 * PI * fRatio) * (1 - fRatio) * (1 - fRatio); // EaseInBack 뒤로갔다가 앞으로
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
fRatio = pow(2, 10 * (fRatio - 1)); // Expo 지수 함수
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
fRatio = 1 - pow(1 - fRatio * fRatio, 0.5); // 원형 궤적
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return fAmount * fRatio;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct VS_IN
|
struct VS_IN
|
||||||
{
|
{
|
||||||
@@ -189,13 +239,14 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
|
|
||||||
if (g_isDiffuseUVMove)
|
if (g_isDiffuseUVMove)
|
||||||
{
|
{
|
||||||
UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
|
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 노이즈 */
|
/* 노이즈 */
|
||||||
if (g_isNoise == true)
|
if (g_isNoise == true)
|
||||||
{
|
{
|
||||||
float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
|
||||||
|
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
|
||||||
|
|
||||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||||
|
|
||||||
@@ -236,7 +287,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
{
|
{
|
||||||
float2 UV; // 이미지의 UV값
|
float2 UV; // 이미지의 UV값
|
||||||
|
|
||||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
|
||||||
|
|
||||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||||
|
|
||||||
@@ -247,7 +298,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
|||||||
if (g_isMaskUVMove)
|
if (g_isMaskUVMove)
|
||||||
{
|
{
|
||||||
if (vMaskingTime.y > 0)
|
if (vMaskingTime.y > 0)
|
||||||
vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
|
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||||
@@ -324,6 +375,7 @@ struct PS_BLUR_IN
|
|||||||
struct PS_BLUR_OUT
|
struct PS_BLUR_OUT
|
||||||
{
|
{
|
||||||
float4 vDiffuse : SV_TARGET0;
|
float4 vDiffuse : SV_TARGET0;
|
||||||
|
float4 vBlurWeight : SV_TARGET1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -332,6 +384,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
|
|
||||||
PS_BLUR_OUT Out;
|
PS_BLUR_OUT Out;
|
||||||
|
|
||||||
|
|
||||||
vector vMtrlDiffuse;
|
vector vMtrlDiffuse;
|
||||||
vector vMtrlMask;
|
vector vMtrlMask;
|
||||||
vector vMtrlNoise;
|
vector vMtrlNoise;
|
||||||
@@ -344,31 +397,20 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
|
|
||||||
if (g_isDiffuse == true)
|
if (g_isDiffuse == true)
|
||||||
{
|
{
|
||||||
float2 UV = In.vTexcoord; // 이미지의 UV값
|
float2 UV; // 이미지의 UV값
|
||||||
|
|
||||||
int iTotalFrame = g_vUVCutting.x * g_vUVCutting.y; // 이미지의 최대 프레임 (몇 곱하기 몇인지)
|
|
||||||
|
|
||||||
int iCurrentFrame = int(fAnimIndex.x); // 현재 프레임이 어디 위치인지
|
|
||||||
|
|
||||||
int iFrameX = iCurrentFrame % (int) g_vUVCutting.x; // 현재 x축의 위치(현재 이미지의 몇번째 칸을 보여줄 지)
|
|
||||||
int iFrameY = iCurrentFrame / (int) g_vUVCutting.x; // 현재 y축의 위치(현재 이미지의 몇번째 줄을 보여줄 지)
|
|
||||||
|
|
||||||
float fFreamWidth = 1.0 / g_vUVCutting.x; // 1.0 나누기 이미지 갯수를 해서 한칸에 얼마나 갈지 정해준다.
|
|
||||||
float fFreamHeight = 1.0 / g_vUVCutting.y; // 1.0 나누기 이미지 갯수를 해서 한줄에 얼마나 갈지 정해준다.
|
|
||||||
|
|
||||||
UV.x = UV.x * fFreamWidth + iFrameX * fFreamWidth; // 먼저 uv를 0~1이 아닌 0~fFrameWidth로 만든 다음에 한칸씩 옆으로 밀어준다.
|
|
||||||
UV.y = UV.y * fFreamHeight + iFrameY * fFreamHeight; // 먼저 uv를 0~1이 아닌 0~fFrameHeight로 만든 다음에 한줄씩 밑으로 내려준다.
|
|
||||||
|
|
||||||
|
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||||
|
|
||||||
if (g_isDiffuseUVMove)
|
if (g_isDiffuseUVMove)
|
||||||
{
|
{
|
||||||
UV += (g_vDiffuseUVGainAmount / g_vUVCutting) * (vDiffuseTime.x / vDiffuseTime.y);
|
UV += SelectLerpUV((g_vDiffuseUVGainAmount / g_vUVCutting), (vDiffuseTime.x / vDiffuseTime.y), g_iDiffuseMoveLerpOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 노이즈 */
|
/* 노이즈 */
|
||||||
if (g_isNoise == true)
|
if (g_isNoise == true)
|
||||||
{
|
{
|
||||||
float2 vNoiseUV = In.vTexcoord + (g_vDiffuseNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
|
||||||
|
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vDiffuseNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iDiffuseNoiseMoveLerpOption);
|
||||||
|
|
||||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||||
|
|
||||||
@@ -387,7 +429,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
/* 최종 색깔 */
|
/* 최종 색깔 */
|
||||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||||
|
|
||||||
vMtrlDiffuse += g_vColor;
|
if (g_vColor.a > 0)
|
||||||
|
vMtrlDiffuse += g_vColor;
|
||||||
|
|
||||||
if (vMtrlDiffuse.a < 0.3f)
|
if (vMtrlDiffuse.a < 0.3f)
|
||||||
discard;
|
discard;
|
||||||
@@ -402,10 +445,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
{
|
{
|
||||||
float2 vMaskTexcoord = In.vTexcoord;
|
float2 vMaskTexcoord = In.vTexcoord;
|
||||||
|
|
||||||
|
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
|
||||||
|
|
||||||
if (g_isNoise == true)
|
if (g_isNoise == true)
|
||||||
{
|
{
|
||||||
|
float2 UV; // 이미지의 UV값
|
||||||
|
|
||||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
|
||||||
|
|
||||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||||
|
|
||||||
@@ -416,7 +462,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
if (g_isMaskUVMove)
|
if (g_isMaskUVMove)
|
||||||
{
|
{
|
||||||
if (vMaskingTime.y > 0)
|
if (vMaskingTime.y > 0)
|
||||||
vMaskTexcoord += g_vMaskingUVGainAmount * (vMaskingTime.x / vMaskingTime.y);
|
vMaskTexcoord += SelectLerpUV(g_vMaskingUVGainAmount / g_vUVMaskCutting, (vMaskingTime.x / vMaskingTime.y), g_iMaskMoveLerpOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
vMtrlMask = g_MaskingTexture.Sample(PointSampler, vMaskTexcoord);
|
||||||
@@ -428,6 +474,17 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||||
|
|
||||||
|
if (g_isDissolve == true)
|
||||||
|
{
|
||||||
|
vMtrlDissolve = g_DissolveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||||
|
|
||||||
|
if (vMtrlDissolve.r < (In.vLifeTime.x / In.vLifeTime.y))
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
vMtrlDiffuse.a = saturate(vMtrlDiffuse.a * vMtrlMask.r);
|
||||||
|
|
||||||
if (g_isDissolve == true)
|
if (g_isDissolve == true)
|
||||||
@@ -439,6 +496,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
||||||
|
Out.vBlurWeight.r = g_iBlurWeight / 32.f;
|
||||||
|
|
||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
@@ -477,3 +535,7 @@ technique11 DefaultTechnique
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ void CEditEffect::Priority_Update(_float fTimeDelta)
|
|||||||
void CEditEffect::Update(_float fTimeDelta)
|
void CEditEffect::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
|
||||||
Reference_Mat_For_EditEffect();
|
|
||||||
|
|
||||||
if (m_isBillboard)
|
if (m_isBillboard)
|
||||||
m_pGameInstance->BillBoard(m_pTransformCom);
|
m_pGameInstance->BillBoard(m_pTransformCom);
|
||||||
@@ -69,7 +69,7 @@ void CEditEffect::Late_Update(_float fTimeDelta)
|
|||||||
|
|
||||||
void CEditEffect::Reference_Mat_For_EditEffect()
|
void CEditEffect::Reference_Mat_For_EditEffect()
|
||||||
{
|
{
|
||||||
ImGui::Begin("Reference Material");
|
|
||||||
|
|
||||||
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" };
|
const char* pCompute[] = { "DIFFUSE" , "MASK", "NOISE", "DISSOLVE" };
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ void CEditEffect::Reference_Mat_For_EditEffect()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ImGui::End();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,12 +148,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
{
|
{
|
||||||
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
//여기서 모델, 텍스쳐, 선택할 수 있도록 함
|
||||||
|
|
||||||
//트레일 만들기
|
const char* pLerp[] = { "Linear" , "EaseInQuad", "EaseOutQuad", "EaseInCubic" , "EaseOutCubic" , "EaseInOutSin" , "EaseInBack" , "Expo" , "Circle" };
|
||||||
//사인 러프
|
|
||||||
//머테리얼 바인딩
|
|
||||||
//블러가 디졸브에 안사라짐
|
|
||||||
//루프 빌보드
|
|
||||||
|
|
||||||
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
const char* pRenderNames[] = { "PRIORITY" , "SHADOW", "NONBLEND", "BLUR" , "NONLIGHT" ,"EFFECT", "BLEND" , "UI" };
|
||||||
|
|
||||||
_int iCurrentItem = static_cast<_int>(m_eRenderOrder);
|
_int iCurrentItem = static_cast<_int>(m_eRenderOrder);
|
||||||
@@ -169,7 +164,7 @@ void CEditEffect::Describe_Entity()
|
|||||||
GUI::Checkbox("Masking", &m_isMasking);
|
GUI::Checkbox("Masking", &m_isMasking);
|
||||||
GUI::Checkbox("Dissolve", &m_isDissolve);
|
GUI::Checkbox("Dissolve", &m_isDissolve);
|
||||||
GUI::Checkbox("Noise", &m_isNoise);
|
GUI::Checkbox("Noise", &m_isNoise);
|
||||||
GUI::Checkbox("Blur", &m_isBlur);
|
|
||||||
|
|
||||||
if (GUI::Checkbox("Billboard", &m_isBillboard))
|
if (GUI::Checkbox("Billboard", &m_isBillboard))
|
||||||
{
|
{
|
||||||
@@ -184,8 +179,13 @@ void CEditEffect::Describe_Entity()
|
|||||||
|
|
||||||
if (GUI::TreeNode("BLUR"))
|
if (GUI::TreeNode("BLUR"))
|
||||||
{
|
{
|
||||||
|
GUI::Checkbox("Blur", &m_isBlur);
|
||||||
|
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity, 0.005f, 0.f, 1.f);
|
GUI::DragFloat("BlurIntensity", &m_fBlurIntensity, 0.005f, 0.f, 1.f);
|
||||||
|
GUI::DragInt("BlurWeight", &m_iBlurWeight, 1.f, 0, 32);
|
||||||
|
|
||||||
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
GUI::TreePop();
|
GUI::TreePop();
|
||||||
@@ -194,11 +194,11 @@ void CEditEffect::Describe_Entity()
|
|||||||
|
|
||||||
if (GUI::TreeNode("EMISSIVE"))
|
if (GUI::TreeNode("EMISSIVE"))
|
||||||
{
|
{
|
||||||
const char* pCompute[] = { "EQUL" , "PLUS", "SUBSTRACT", "MULTY" , "DIV" };
|
const char* pCompute[] = {"NONE", "DIV" , "PLUS", "SUBSTRACT", "MULTY" , "EQUL" };
|
||||||
|
|
||||||
_int iColorOption = (_int)m_fColorOption;
|
_int iColorOption = (_int)m_fColorOption;
|
||||||
|
|
||||||
if (ImGui::Combo("OPTION", &iColorOption, pCompute, 5))
|
if (ImGui::Combo("OPTION", &iColorOption, pCompute , 6))
|
||||||
{
|
{
|
||||||
m_fColorOption = (_float)iColorOption;
|
m_fColorOption = (_float)iColorOption;
|
||||||
}
|
}
|
||||||
@@ -243,12 +243,28 @@ void CEditEffect::Describe_Entity()
|
|||||||
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
GUI::Checkbox("DiffuseUVMove", &m_isDiffuseUVMove);
|
||||||
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
|
GUI::InputFloat2("DiffuseUVCutting", (_float*)&m_vUVCutting);
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
GUI::DragFloat2("DiffuseUVGainAmount", (_float*)&m_vDiffuseUVGainAmount, 0.01f);
|
||||||
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
|
||||||
|
|
||||||
|
|
||||||
|
_int iDiffuseMoveLerpOption = (_int)m_iDiffuseMoveLerpOption;
|
||||||
|
|
||||||
|
if (ImGui::Combo("Lerp DiffuseMove Option", &iDiffuseMoveLerpOption, pLerp, 9))
|
||||||
|
{
|
||||||
|
m_iDiffuseMoveLerpOption = iDiffuseMoveLerpOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
if (GUI::TreeNode("DIFFUSE_TEX"))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DIFFUSE_TEXTURE", (CComponent**)&m_pDiffuse_TextureCom, nullptr, this);
|
||||||
|
GUI::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
GUI::Separator(); GUI::Spacing();
|
GUI::Separator(); GUI::Spacing();
|
||||||
|
|
||||||
@@ -267,11 +283,27 @@ void CEditEffect::Describe_Entity()
|
|||||||
|
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
|
GUI::DragFloat2("MaskingUVGainAmount", (_float*)&m_vMaskingUVGainAmount, 0.01f);
|
||||||
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
|
|
||||||
|
_int iMaskMoveLerpOption = (_int)m_iMaskMoveLerpOption;
|
||||||
|
|
||||||
|
if (ImGui::Combo("Lerp MaskMove Option", &iMaskMoveLerpOption, pLerp, 9))
|
||||||
|
{
|
||||||
|
m_iMaskMoveLerpOption = iMaskMoveLerpOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
|
if (GUI::TreeNode("MASKING_TEX"))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "MASKING_TEXTURE", (CComponent**)&m_pMasking_TextureCom, nullptr, this);
|
||||||
|
GUI::TreePop();
|
||||||
|
}
|
||||||
GUI::Separator(); GUI::Spacing();
|
GUI::Separator(); GUI::Spacing();
|
||||||
|
|
||||||
GUI::TreePop();
|
GUI::TreePop();
|
||||||
@@ -282,8 +314,11 @@ void CEditEffect::Describe_Entity()
|
|||||||
{
|
{
|
||||||
if (GUI::TreeNode("DISSOLVE"))
|
if (GUI::TreeNode("DISSOLVE"))
|
||||||
{
|
{
|
||||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
if (GUI::TreeNode("DISSOLV_TEX"))
|
||||||
|
{
|
||||||
|
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "DISSOLVE_TEXTURE", (CComponent**)&m_pDissolve_TextureCom, nullptr, this);
|
||||||
|
GUI::TreePop();
|
||||||
|
}
|
||||||
GUI::Separator(); GUI::Spacing();
|
GUI::Separator(); GUI::Spacing();
|
||||||
|
|
||||||
GUI::TreePop();
|
GUI::TreePop();
|
||||||
@@ -295,11 +330,40 @@ void CEditEffect::Describe_Entity()
|
|||||||
if (GUI::TreeNode("NOISE"))
|
if (GUI::TreeNode("NOISE"))
|
||||||
{
|
{
|
||||||
ImGui::PushItemWidth(80);
|
ImGui::PushItemWidth(80);
|
||||||
|
|
||||||
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
GUI::DragFloat("NoiseDistortionIntensity", &m_fNoiseDistortionIntensity, 0.005f, 0.f, 1.f);
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
|
GUI::DragFloat2("DiffuseNoiseUVGainAmount", (_float*)&m_vDiffuseNoiseUVGainAmount, 0.01f);
|
||||||
|
|
||||||
|
_int iDiffuseNoiseMoveLerpOption = (_int)m_iDiffuseNoiseMoveLerpOption;
|
||||||
|
|
||||||
|
if (ImGui::Combo("Lerp DiffuseNoiseMove Option", &iDiffuseNoiseMoveLerpOption, pLerp, 9))
|
||||||
|
{
|
||||||
|
m_iDiffuseNoiseMoveLerpOption = iDiffuseNoiseMoveLerpOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
|
GUI::DragFloat2("MaskNoiseUVGainAmount", (_float*)&m_vMaskNoiseUVGainAmount, 0.01f);
|
||||||
|
|
||||||
|
_int iMaskNoiseMoveLerpOption = (_int)m_iMaskNoiseMoveLerpOption;
|
||||||
|
|
||||||
|
if (ImGui::Combo("Lerp MaskNoiseMove Option", &iMaskNoiseMoveLerpOption, pLerp, 9))
|
||||||
|
{
|
||||||
|
m_iMaskNoiseMoveLerpOption = iMaskNoiseMoveLerpOption;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUI::Spacing();
|
||||||
|
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
|
if (GUI::TreeNode("NOISE_TEX"))
|
||||||
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
{
|
||||||
|
m_pGameInstance->Asset_Description<CTexture>(ENUM_CLASS(LEVEL::EFFECT), "NOISE_TEXTURE", (CComponent**)&m_pNoise_TextureCom, nullptr, this);
|
||||||
|
GUI::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
GUI::Separator(); GUI::Spacing();
|
GUI::Separator(); GUI::Spacing();
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
|
|
||||||
CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CEffectObject::CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
:CGameObject(pDevice, pContext)
|
:CPartObject(pDevice, pContext)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CEffectObject::CEffectObject(const CEffectObject& rhs)
|
CEffectObject::CEffectObject(const CEffectObject& rhs)
|
||||||
:CGameObject(rhs)
|
:CPartObject(rhs)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,6 +66,12 @@ HRESULT CEffectObject::Render_Blur()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_iBlurWeight", &m_iBlurWeight, sizeof(_int)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
for (_uint i = 0; i < m_pInstance_ModelCom->Get_NumMeshes(); i++)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -174,6 +180,26 @@ HRESULT CEffectObject::Bind_ShaderResources()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskMoveLerpOption", &m_iMaskMoveLerpOption, sizeof(_int)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseMoveLerpOption", &m_iDiffuseMoveLerpOption, sizeof(_int)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_iMaskNoiseMoveLerpOption", &m_iMaskNoiseMoveLerpOption, sizeof(_int)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (FAILED(m_pShaderCom->Bind_RawValue("g_iDiffuseNoiseMoveLerpOption", &m_iDiffuseNoiseMoveLerpOption, sizeof(_int)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (m_pDiffuse_TextureCom != nullptr)
|
if (m_pDiffuse_TextureCom != nullptr)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
CEffect_Editor::CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CEffect_Editor::CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
: CEffectObject{ pDevice, pContext }
|
: CContainerObject{ pDevice, pContext }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs)
|
CEffect_Editor::CEffect_Editor(const CEffect_Editor& rhs)
|
||||||
: CEffectObject(rhs)
|
: CContainerObject(rhs)
|
||||||
, m_MatFiles(rhs.m_MatFiles)
|
, m_MatFiles(rhs.m_MatFiles)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -23,8 +23,8 @@ HRESULT CEffect_Editor::Initialize_Prototype()
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Base_Mat");
|
ReadMaterials("../Bin/Resources/VFX/Particles/Magic/Protego");
|
||||||
ReadMaterials("../Bin/Resources/VFX/ParticleMaterials/Mat_Instance");
|
|
||||||
|
|
||||||
for (auto iter : m_MatFiles)
|
for (auto iter : m_MatFiles)
|
||||||
{
|
{
|
||||||
@@ -38,6 +38,7 @@ HRESULT CEffect_Editor::Initialize_Prototype()
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -60,17 +61,19 @@ HRESULT CEffect_Editor::Initialize(void* pArg)
|
|||||||
|
|
||||||
void CEffect_Editor::Priority_Update(_float fTimeDelta)
|
void CEffect_Editor::Priority_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
__super::Priority_Update(fTimeDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEffect_Editor::Update(_float fTimeDelta)
|
void CEffect_Editor::Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
Describe_Entity();
|
Describe_Entity();
|
||||||
|
__super::Update(fTimeDelta);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEffect_Editor::Late_Update(_float fTimeDelta)
|
void CEffect_Editor::Late_Update(_float fTimeDelta)
|
||||||
{
|
{
|
||||||
|
__super::Late_Update(fTimeDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT CEffect_Editor::Ready_Components(void* pArg)
|
HRESULT CEffect_Editor::Ready_Components(void* pArg)
|
||||||
@@ -84,9 +87,20 @@ HRESULT CEffect_Editor::Ready_Components(void* pArg)
|
|||||||
|
|
||||||
HRESULT CEffect_Editor::Ready_Child()
|
HRESULT CEffect_Editor::Ready_Child()
|
||||||
{
|
{
|
||||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CEditEffect>(ENUM_CLASS(LEVEL::EFFECT), NEXT_LEVEL, LAYER_EFFECT, nullptr, this, reinterpret_cast<CEditEffect**>(&m_pEditEffect))))
|
|
||||||
|
|
||||||
|
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||||
|
|
||||||
|
PartsDesc.pParentTransform = m_pTransformCom;
|
||||||
|
|
||||||
|
if (FAILED(Add_PartObject<CEditEffect>("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), &m_pEditEffect, &PartsDesc)))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
m_strCurrentEffectName = "EffectObject0";
|
||||||
|
SAFE_RELEASE(m_pEditEffect);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,17 +324,136 @@ CGameObject* CEffect_Editor::Clone(void* pArg, CGameObject* pOwner)
|
|||||||
void CEffect_Editor::Free()
|
void CEffect_Editor::Free()
|
||||||
{
|
{
|
||||||
__super::Free();
|
__super::Free();
|
||||||
|
|
||||||
|
SAFE_RELEASE(m_pEditEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CEffect_Editor::Describe_Entity()
|
void CEffect_Editor::Describe_Entity()
|
||||||
{
|
{
|
||||||
ImGui::Begin("Effect Editor");
|
ImGui::Begin("Effect Editor");
|
||||||
|
|
||||||
|
GUI::TextColored(ImVec4(1.f, 0.f, 1.f, 1.f), m_strCurrentEffectName.c_str());
|
||||||
|
|
||||||
if (m_pEditEffect != nullptr)
|
if (m_pEditEffect != nullptr)
|
||||||
m_pEditEffect->Describe_Entity();
|
m_pEditEffect->Describe_Entity();
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
|
ImGui::Begin("Reference Material");
|
||||||
|
|
||||||
|
if (m_pEditEffect != nullptr)
|
||||||
|
m_pEditEffect->Reference_Mat_For_EditEffect();
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
|
||||||
|
ImGui::Begin("Effect Hierarchy");
|
||||||
|
|
||||||
|
#pragma region PopUp
|
||||||
|
|
||||||
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right))
|
||||||
|
ImGui::OpenPopup("Effect Hierarchy");
|
||||||
|
|
||||||
|
|
||||||
|
if (ImGui::BeginPopup("Effect Hierarchy"))
|
||||||
|
{
|
||||||
|
if (ImGui::MenuItem("Create Effect"))
|
||||||
|
{
|
||||||
|
|
||||||
|
CPartObject::PARTOBJECT_DESC PartsDesc{};
|
||||||
|
|
||||||
|
PartsDesc.pParentTransform = m_pTransformCom;
|
||||||
|
|
||||||
|
if (FAILED(Add_PartObject<CEditEffect>("EffectObject" + to_string(m_iNumPart++), ENUM_CLASS(LEVEL::EFFECT), nullptr, &PartsDesc)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndPopup();
|
||||||
|
}
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
|
_int iIndex = {};
|
||||||
|
|
||||||
|
for (auto& pPartObject : m_PartObjects)
|
||||||
|
{
|
||||||
|
_string strName = "EffectObject" + to_string(iIndex);
|
||||||
|
|
||||||
|
if (GUI::TreeNode(strName.c_str()))
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma region PopUp
|
||||||
|
|
||||||
|
if (GUI::IsItemClicked(ImGuiMouseButton_Right))
|
||||||
|
GUI::OpenPopup(strName.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
if (GUI::BeginPopup(strName.c_str()))
|
||||||
|
{
|
||||||
|
|
||||||
|
if (ImGui::MenuItem("Delete Effect"))
|
||||||
|
{
|
||||||
|
auto iter = m_PartObjects.begin();
|
||||||
|
advance(iter, iIndex); // 이터레이터를 증가시킨다
|
||||||
|
|
||||||
|
SAFE_RELEASE(pPartObject.second);
|
||||||
|
m_PartObjects.erase(iter);
|
||||||
|
|
||||||
|
GUI::EndPopup();
|
||||||
|
GUI::TreePop();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GUI::EndPopup();
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma endregion
|
||||||
|
|
||||||
|
if (GUI::IsItemClicked()) // 선택창에 띄우기
|
||||||
|
{
|
||||||
|
CEditEffect* pSelectedEffectObject = dynamic_cast<CEditEffect*>(pPartObject.second);
|
||||||
|
|
||||||
|
if (pSelectedEffectObject == nullptr)
|
||||||
|
{
|
||||||
|
GUI::TreePop();
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (m_pEditEffect == pSelectedEffectObject)
|
||||||
|
{
|
||||||
|
GUI::TreePop();
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Safe_Release(m_pEditEffect);
|
||||||
|
|
||||||
|
m_pEditEffect = pSelectedEffectObject;
|
||||||
|
|
||||||
|
Safe_AddRef(pSelectedEffectObject);
|
||||||
|
|
||||||
|
m_strCurrentEffectName = strName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GUI::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
|
iIndex++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ImGui::End();
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT CEffect_Editor::Bind_ShaderResources()
|
||||||
|
{
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ HRESULT CLoader::Loading_For_Effect()
|
|||||||
Asset_FileLoad("../Bin/Resources/Models/Effect/ParticleMesh", L"Prototype_Instance_Model_", [&](_wstring wstrFileName, const _char* pFilePath) {
|
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,
|
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::EFFECT), wstrFileName,
|
||||||
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.01f, 0.01f, 0.01f) * XMMatrixIdentity(), 0))))
|
CInstance_Model::Create(m_pDevice, m_pContext, pFilePath, MODEL::NONANIM, XMMatrixScaling(0.1f, 0.1f, 0.1f) * XMMatrixIdentity(), 0))))
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Editor_Define.h"
|
#include "Editor_Define.h"
|
||||||
#include "GameObject.h"
|
#include "PartObject.h"
|
||||||
|
|
||||||
NS_BEGIN(Engine)
|
NS_BEGIN(Engine)
|
||||||
class CInstance_Model;
|
class CInstance_Model;
|
||||||
@@ -11,7 +11,7 @@ NS_END
|
|||||||
|
|
||||||
NS_BEGIN(Editor)
|
NS_BEGIN(Editor)
|
||||||
|
|
||||||
class CEffectObject abstract : public CGameObject
|
class CEffectObject abstract : public CPartObject
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CEffectObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
@@ -51,6 +51,13 @@ class CEffectObject abstract : public CGameObject
|
|||||||
_float2 m_vUVCutting = { 1.f ,1.f };
|
_float2 m_vUVCutting = { 1.f ,1.f };
|
||||||
_float2 m_vUVMaskCutting = { 1.f ,1.f };
|
_float2 m_vUVMaskCutting = { 1.f ,1.f };
|
||||||
|
|
||||||
|
_int m_iMaskMoveLerpOption = { 0 };
|
||||||
|
_int m_iDiffuseMoveLerpOption = { 0 };
|
||||||
|
_int m_iMaskNoiseMoveLerpOption = { 0 };
|
||||||
|
_int m_iDiffuseNoiseMoveLerpOption = { 0 };
|
||||||
|
_int m_iBlurWeight = { 0 };
|
||||||
|
|
||||||
|
|
||||||
_bool m_isDiffuse = {};
|
_bool m_isDiffuse = {};
|
||||||
_bool m_isMasking = {};
|
_bool m_isMasking = {};
|
||||||
_bool m_isDissolve = {};
|
_bool m_isDissolve = {};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Editor_Define.h"
|
#include "Editor_Define.h"
|
||||||
#include "EffectObject.h"
|
#include "ContainerObject.h"
|
||||||
|
|
||||||
NS_BEGIN(Engine)
|
NS_BEGIN(Engine)
|
||||||
class CModel;
|
class CModel;
|
||||||
@@ -10,7 +10,7 @@ NS_END
|
|||||||
|
|
||||||
NS_BEGIN(Editor)
|
NS_BEGIN(Editor)
|
||||||
|
|
||||||
class CEffect_Editor final : public CEffectObject
|
class CEffect_Editor final : public CContainerObject
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
CEffect_Editor(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
@@ -30,18 +30,24 @@ class CEffect_Editor final : public CEffectObject
|
|||||||
virtual HRESULT Initialize(void* pArg) override;
|
virtual HRESULT Initialize(void* pArg) override;
|
||||||
virtual HRESULT Ready_Components(void* pArg) override;
|
virtual HRESULT Ready_Components(void* pArg) override;
|
||||||
HRESULT Ready_Child();
|
HRESULT Ready_Child();
|
||||||
|
HRESULT Bind_ShaderResources() override;
|
||||||
private:
|
private:
|
||||||
void ReadMaterials(const char* pDirectoryName);
|
void ReadMaterials(const char* pDirectoryName);
|
||||||
void ReadMaterial(_wstring wstrFileName, const char* pFilePath);
|
void ReadMaterial(_wstring wstrFileName, const char* pFilePath);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CGameObject* m_pEditEffect = { nullptr };
|
_string m_strCurrentEffectName = {};
|
||||||
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
_uint m_iNumPart = { 0 };
|
||||||
|
class CEditEffect* m_pEditEffect = { nullptr };
|
||||||
|
map<_wstring, vector<pair<_wstring, _wstring>>> m_MatFiles = {}; // map<머테리얼 이름, vector<텍스쳐이름 , 텍스쳐 경로>>
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
static CEffect_Editor* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||||
virtual void Free() override;
|
virtual void Free() override;
|
||||||
void Describe_Entity() override;
|
void Describe_Entity() override;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_END
|
NS_END
|
||||||
@@ -16,6 +16,7 @@ Texture2D g_Texture;
|
|||||||
float g_fLightRange;
|
float g_fLightRange;
|
||||||
float g_fSpotInnerAngle;
|
float g_fSpotInnerAngle;
|
||||||
float g_fSpotOuterAngle;
|
float g_fSpotOuterAngle;
|
||||||
|
|
||||||
vector g_vLightDir;
|
vector g_vLightDir;
|
||||||
vector g_vLightPos;
|
vector g_vLightPos;
|
||||||
vector g_vCamPosition;
|
vector g_vCamPosition;
|
||||||
@@ -29,6 +30,7 @@ Texture2D g_ShadowTexture;
|
|||||||
Texture2D g_PreShadowTexture;
|
Texture2D g_PreShadowTexture;
|
||||||
Texture2D g_BlurTexture;
|
Texture2D g_BlurTexture;
|
||||||
Texture2D g_BlurXTexture;
|
Texture2D g_BlurXTexture;
|
||||||
|
Texture2D g_BlurWeightTexture;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -36,6 +38,8 @@ vector g_vLightDiffuse;
|
|||||||
vector g_vLightAmbient;
|
vector g_vLightAmbient;
|
||||||
vector g_vLightSpecular;
|
vector g_vLightSpecular;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct VS_IN
|
struct VS_IN
|
||||||
{
|
{
|
||||||
float3 vPosition : POSITION;
|
float3 vPosition : POSITION;
|
||||||
@@ -219,13 +223,15 @@ PS_OUT_LIGHT PS_MAIN_SPOT(PS_IN In)
|
|||||||
return Out;
|
return Out;
|
||||||
}
|
}
|
||||||
|
|
||||||
float g_fWeights[13] =
|
float g_fWeights[32] =
|
||||||
{
|
{
|
||||||
0.0090, 0.0218, 0.0448, 0.0784, 0.1169,
|
0.000400, 0.000700, 0.001200, 0.002000, 0.003200, 0.005000, 0.007500, 0.011000,
|
||||||
0.1486, 0.1610, 0.1486, 0.1169, 0.0784,
|
0.015700, 0.021700, 0.029000, 0.037300, 0.046200, 0.055200, 0.063600, 0.070800,
|
||||||
0.0448, 0.0218, 0.0090
|
0.075900, 0.078500, 0.078500, 0.075900, 0.070800, 0.063600, 0.055200, 0.046200,
|
||||||
|
0.037300, 0.029000, 0.021700, 0.015700, 0.011000, 0.007500, 0.005000, 0.003200
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
||||||
{
|
{
|
||||||
PS_OUT_BACKBUFFER Out;
|
PS_OUT_BACKBUFFER Out;
|
||||||
@@ -295,15 +301,31 @@ PS_OUT_BACKBUFFER PS_MAIN_COMBINED(PS_IN In)
|
|||||||
//{
|
//{
|
||||||
// Out.vBackBuffer *= 0.5f;
|
// Out.vBackBuffer *= 0.5f;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x;
|
vTexcoord.x = In.vTexcoord.x;
|
||||||
vTexcoord.y = In.vTexcoord.y + (float)i / g_vResolution.y;
|
vTexcoord.y = In.vTexcoord.y + (float) i / g_vResolution.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurXTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBackBuffer += vColor;
|
Out.vBackBuffer += vColor;
|
||||||
@@ -324,12 +346,32 @@ PS_OUT_BLUR_X PS_MAIN_BLUR_X(PS_IN In)
|
|||||||
float2 vTexcoord;
|
float2 vTexcoord;
|
||||||
float4 vColor = 0.f;
|
float4 vColor = 0.f;
|
||||||
|
|
||||||
for (int i = -6; i < 7; ++i)
|
//TODO 블러 조절 해보려햇는데 실패함..
|
||||||
|
|
||||||
|
//int iBlurWeight = g_BlurWeightTexture.Sample(ClampSampler, In.vTexcoord).r * 32.f;
|
||||||
|
|
||||||
|
//int iBlurMin;
|
||||||
|
//int iBlurMax;
|
||||||
|
|
||||||
|
//if (iBlurWeight % 2 == 0)
|
||||||
|
//{
|
||||||
|
// iBlurMin = -1 * iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2;
|
||||||
|
//}
|
||||||
|
//else
|
||||||
|
//{
|
||||||
|
// iBlurMin = -iBlurWeight / 2;
|
||||||
|
// iBlurMax = iBlurWeight / 2 + 1;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//[loop] // 변수로 루프돌리려면 반드시 필요함
|
||||||
|
|
||||||
|
for (int i = -15; i < 16; ++i)
|
||||||
{
|
{
|
||||||
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
vTexcoord.x = In.vTexcoord.x + (float) i / g_vResolution.x;
|
||||||
vTexcoord.y = In.vTexcoord.y;
|
vTexcoord.y = In.vTexcoord.y;
|
||||||
|
|
||||||
vColor += g_fWeights[i + 6] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
vColor += g_fWeights[i + 15] * g_BlurTexture.Sample(ClampSampler, vTexcoord);
|
||||||
}
|
}
|
||||||
|
|
||||||
Out.vBlurX = vColor;
|
Out.vBlurX = vColor;
|
||||||
|
|||||||
@@ -50,10 +50,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
|
|
||||||
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
Out.vBackBuffer = float4(0.f, 0.f, 0.f, 0.f);
|
||||||
|
|
||||||
vector vColorTexture = g_ColorTexture.Sample(DefaultSampler, In.vTexcoord);
|
vector vColorTexture = g_ColorTexture.Sample(ClampSampler, In.vTexcoord);
|
||||||
|
|
||||||
vector vDiffuseTexture = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
|
||||||
|
|
||||||
|
|
||||||
if (0.f == vColorTexture.a)
|
if (0.f == vColorTexture.a)
|
||||||
{
|
{
|
||||||
@@ -66,7 +63,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
switch (iOption)
|
switch (iOption)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
Out.vBackBuffer.rgb += vColorTexture.rgb;
|
||||||
@@ -78,7 +75,7 @@ PS_OUT_BACKBUFFER PS_OUT_LASTCOLOR(PS_IN In)
|
|||||||
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
Out.vBackBuffer.rgb *= vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
Out.vBackBuffer.rgb /= vColorTexture.rgb;
|
Out.vBackBuffer.rgb = vColorTexture.rgb;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ void CComputeShader::Free()
|
|||||||
Safe_Release(m_pOutputUAV[i]);
|
Safe_Release(m_pOutputUAV[i]);
|
||||||
Safe_Release(m_pOutputBuffer[i]);
|
Safe_Release(m_pOutputBuffer[i]);
|
||||||
Safe_Release(m_pOutputSRV[i]);
|
Safe_Release(m_pOutputSRV[i]);
|
||||||
|
Safe_Release(m_pOutputStagingBuffer[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "Mesh.h"
|
#include "Mesh.h"
|
||||||
#include "GameInstance.h"
|
#include "GameInstance.h"
|
||||||
#include "ComputeShader.h"
|
#include "ComputeShader.h"
|
||||||
|
#include "Bone.h"
|
||||||
|
|
||||||
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
CInstance_Model::CInstance_Model(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||||
:CComponent{ pDevice , pContext }
|
:CComponent{ pDevice , pContext }
|
||||||
@@ -427,6 +428,9 @@ void CInstance_Model::Free()
|
|||||||
for (auto& pMesh : m_Meshes)
|
for (auto& pMesh : m_Meshes)
|
||||||
Safe_Release(pMesh);
|
Safe_Release(pMesh);
|
||||||
|
|
||||||
|
for (auto& pBone : m_Bones)
|
||||||
|
Safe_Release(pBone);
|
||||||
|
|
||||||
Safe_Release(m_pComputeShader);
|
Safe_Release(m_pComputeShader);
|
||||||
Safe_Release(m_pConstantBuffer);
|
Safe_Release(m_pConstantBuffer);
|
||||||
Safe_Release(m_pParticleValueBuffer);
|
Safe_Release(m_pParticleValueBuffer);
|
||||||
|
|||||||
@@ -113,8 +113,8 @@ void CRenderer::Render()
|
|||||||
Render_Effect();
|
Render_Effect();
|
||||||
Render_NonLight();
|
Render_NonLight();
|
||||||
Render_Blend();
|
Render_Blend();
|
||||||
Render_UI();
|
|
||||||
Render_LastColor();
|
Render_LastColor();
|
||||||
|
Render_UI();
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if(m_pGameInstance->Key_Pressing(DIK_F10))
|
if(m_pGameInstance->Key_Pressing(DIK_F10))
|
||||||
@@ -301,6 +301,10 @@ void CRenderer::Render_Combined()
|
|||||||
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) {
|
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_X"), m_pShader, "g_BlurXTexture"))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::COMBINED));
|
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::COMBINED));
|
||||||
@@ -379,6 +383,11 @@ void CRenderer::Render_Blur()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Bind_RenderTarget(TEXT("Target_Blur_Weight"), m_pShader, "g_BlurWeightTexture"))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR));
|
m_pShader->Begin(ENUM_CLASS(SHADER_PASS_DEFERRED::BLUR));
|
||||||
|
|
||||||
m_pVIBuffer->Bind_Resources();
|
m_pVIBuffer->Bind_Resources();
|
||||||
@@ -588,6 +597,12 @@ HRESULT CRenderer::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Target_Blur */
|
/* Target_Blur */
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur_Weight"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||||
|
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 1.0f)))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
if (FAILED(m_pGameInstance->Add_RenderTarget(TEXT("Target_Blur"), (_uint)Viewport.Width, (_uint)Viewport.Height,
|
||||||
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
DXGI_FORMAT_R8G8B8A8_UNORM, _float4(0.0f, 0.0f, 0.0f, 0.0f)))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -648,6 +663,10 @@ HRESULT CRenderer::Initialize()
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur"), TEXT("Target_Blur_Weight")))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
/* MRT_Blur_X */
|
/* MRT_Blur_X */
|
||||||
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) {
|
if (FAILED(m_pGameInstance->Add_MRT(TEXT("MRT_Blur_X"), TEXT("Target_Blur_X")))) {
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
@@ -695,25 +714,27 @@ HRESULT CRenderer::Initialize()
|
|||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Specular"), 225.f, 225.f, 150.0f, 150.0f))) {
|
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Specular"), 225.f, 225.f, 150.0f, 150.0f))) {
|
||||||
// return E_FAIL;
|
// return E_FAIL;
|
||||||
//}
|
//}
|
||||||
|
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Color"),75.f , 1080 - 75.f, 150.f, 150.f))) {
|
||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Color"), 375.f, 225.f, 450.f, 450.0f))) {
|
return E_FAIL;
|
||||||
// return E_FAIL;
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Shadow"), Viewport.Width - 150.0f, 150.0f, 300.f, 300.f))) {
|
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Shadow"), Viewport.Width - 150.0f, 150.0f, 300.f, 300.f))) {
|
||||||
// return E_FAIL;
|
// return E_FAIL;
|
||||||
//}
|
//}
|
||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_PreShadow"), Viewport.Width - 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
|
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_PreShadow"), Viewport.Width - 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
|
||||||
// return E_FAIL;
|
// return E_FAIL;
|
||||||
//}
|
|
||||||
|
|
||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur"), 150.0f, Viewport.Height - 150.0f, 300.f, 300.f))) {
|
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_Weight"), 75.f, 75.f, 150.0f, 150.0f))) {
|
||||||
// return E_FAIL;
|
return E_FAIL;
|
||||||
//}
|
}
|
||||||
|
|
||||||
//if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_X"), Viewport.Width * 0.75f, Viewport.Height * 0.75f, Viewport.Width * 0.5f, Viewport.Height * 0.5f))) {
|
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur"), 75.f, 225.f, 150.0f, 150.0f))) {
|
||||||
// return E_FAIL;
|
return E_FAIL;
|
||||||
//}
|
}
|
||||||
|
|
||||||
|
if (FAILED(m_pGameInstance->Ready_RenderTarget_Debug(TEXT("Target_Blur_X"), 225.f, 75.f, 150.0f, 150.0f))) {
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class ENGINE_DLL CGameInstance final : public CBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||||
{
|
{
|
||||||
return m_pPrototype_Manager->CPrototype_Manager::Asset_Description<T>(iLevel, pComponentName, ppOut, pDesc, pOwner, wstrGroupName);
|
return m_pPrototype_Manager->CPrototype_Manager::Asset_Description<T>(iLevel, pComponentName, ppOut, pDesc, pOwner, wstrGroupName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
|||||||
HRESULT Create_SubResource_Buffer();
|
HRESULT Create_SubResource_Buffer();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ID3D11Buffer* m_pVBInstance = { nullptr };
|
ID3D11Buffer* m_pVBInstance = { nullptr };
|
||||||
|
|
||||||
INSTANCE_DESC m_InstanceDesc = {};
|
INSTANCE_DESC m_InstanceDesc = {};
|
||||||
|
|
||||||
@@ -114,9 +114,9 @@ class ENGINE_DLL CInstance_Model final : public CComponent
|
|||||||
vector<class CBone*> m_Bones = {}; // 나중에 혹시 애님메쉬를 인스턴싱 할 일이 있을지도 모르니 남겨놓음
|
vector<class CBone*> m_Bones = {}; // 나중에 혹시 애님메쉬를 인스턴싱 할 일이 있을지도 모르니 남겨놓음
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class CComputeShader* m_pComputeShader = {};
|
class CComputeShader* m_pComputeShader = {};
|
||||||
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
|
ID3D11Buffer* m_pConstantBuffer = { nullptr }; // 컴퓨트 쉐이드 전용 상수버퍼
|
||||||
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
|
ID3D11Buffer* m_pParticleValueBuffer = { nullptr }; // 컴퓨트 쉐이드 두번째 버퍼 (스피드, 로테이션)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef EDITOR_PROJECT
|
#ifdef EDITOR_PROJECT
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ class CPrototype_Manager final : public CBase
|
|||||||
//만들고 선택할 시에 내 ppOut에 클론하는 기능을 담당
|
//만들고 선택할 시에 내 ppOut에 클론하는 기능을 담당
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void Asset_Description(_uint iLevel, const _char* pComponentName, CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
void Asset_Description(_uint iLevel, const _char* pComponentName, Engine::CComponent** ppOut, void* pDesc, class CGameObject* pOwner = nullptr, _wstring wstrGroupName = L"")
|
||||||
{
|
{
|
||||||
vector<const _char*> pComponentNames = {};
|
vector<const _char*> pComponentNames = {};
|
||||||
vector<_string> strNames = {};
|
vector<_string> strNames = {};
|
||||||
@@ -131,26 +131,67 @@ class CPrototype_Manager final : public CBase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static _int s_iCurrentItem = -1;
|
static _int s_iCurrentItem = 0;
|
||||||
|
static ImGuiTextFilter filter;
|
||||||
|
|
||||||
// 다른 어셋일 경우 콤보로 띄우기
|
// 다른 어셋일 경우 콤보로 띄우기
|
||||||
|
|
||||||
if (GUI::Combo(pComponentName, &s_iCurrentItem, pComponentNames.data(), (_int)pComponentNames.size()))
|
if(GUI::BeginCombo(pComponentName, (s_iCurrentItem >= 0 && s_iCurrentItem < pComponentNames.size())
|
||||||
|
? pComponentNames[s_iCurrentItem] : "NONE"))
|
||||||
{
|
{
|
||||||
if (*ppOut != nullptr)
|
if (ImGui::IsWindowAppearing())
|
||||||
Safe_Release(*ppOut);
|
{
|
||||||
|
ImGui::SetKeyboardFocusHere();
|
||||||
|
filter.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
_string strComponentName = pComponentNames[s_iCurrentItem];
|
|
||||||
_wstring wstrComponentName = CMyTools::ToWstring(strComponentName);
|
|
||||||
|
|
||||||
auto iter = m_pAssets[iLevel].find(wstrComponentName);
|
filter.Draw("##Filter", -FLT_MIN);
|
||||||
|
|
||||||
|
|
||||||
|
for (_uint i = 0; i < pComponentNames.size(); i++)
|
||||||
|
{
|
||||||
|
bool is_selected = (s_iCurrentItem == i);
|
||||||
|
|
||||||
|
if (filter.PassFilter(pComponentNames[i]))
|
||||||
|
{
|
||||||
|
|
||||||
|
if (GUI::Selectable(pComponentNames[i], is_selected))
|
||||||
|
{
|
||||||
|
s_iCurrentItem = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_selected)
|
||||||
|
{
|
||||||
|
|
||||||
|
ImGui::SetItemDefaultFocus();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
GUI::EndCombo();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GUI::Button("Select"))
|
||||||
|
{
|
||||||
|
auto iter = m_pAssets[iLevel].find(CMyTools::ToWstring(pComponentNames[s_iCurrentItem]));
|
||||||
|
|
||||||
if (iter == m_pAssets[iLevel].end()) {
|
if (iter == m_pAssets[iLevel].end()) {
|
||||||
|
|
||||||
|
|
||||||
|
GUI::EndCombo();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*ppOut != nullptr)
|
||||||
|
Safe_Release(*ppOut);
|
||||||
|
|
||||||
*ppOut = iter->second->Clone(pDesc, pOwner);
|
*ppOut = iter->second->Clone(pDesc, pOwner);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,9 @@ class CRenderer final : public CBase
|
|||||||
void Render_Effect();
|
void Render_Effect();
|
||||||
void Render_NonLight();
|
void Render_NonLight();
|
||||||
void Render_Blend();
|
void Render_Blend();
|
||||||
void Render_UI();
|
|
||||||
void Render_LastColor();
|
void Render_LastColor();
|
||||||
|
void Render_UI();
|
||||||
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user