|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 296 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 285 B |
|
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 245 B |
@@ -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);
|
||||
|
||||
@@ -8,6 +8,7 @@ int g_iImageCountY;
|
||||
|
||||
float g_fFar;
|
||||
float g_fTime;
|
||||
float g_fTimeMult;
|
||||
float g_fFrame;
|
||||
float g_fAlpha;
|
||||
float g_fOwnerAlpha;
|
||||
@@ -16,8 +17,11 @@ float g_fDeltaU;
|
||||
float g_fDeltaV;
|
||||
uint g_iIndexU;
|
||||
uint g_iIndexV;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
float2 g_fOrigin_Size;
|
||||
float2 g_fCurrent_Size;
|
||||
uint g_iQuestType;
|
||||
float g_fPI;
|
||||
|
||||
Texture2D g_Texture;
|
||||
Texture2D g_Texture1;
|
||||
@@ -64,7 +68,7 @@ struct PS_OUT
|
||||
float4 vColor : SV_Target0;
|
||||
};
|
||||
|
||||
PS_OUT PS_MAIN(PS_IN In) // ?쇰컲 UI
|
||||
PS_OUT PS_MAIN(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
@@ -142,19 +146,31 @@ PS_OUT PS_Cursor(PS_IN In)
|
||||
|
||||
Color = White;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Key_Hold_Rotation(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
float4 Color = g_Texture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
if (Color.a <= 0.1f)
|
||||
discard;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
float2 uv = In.vTexcoord;
|
||||
|
||||
float4 tex = g_Texture.Sample(DefaultSampler, uv);
|
||||
|
||||
float2 center = float2(0.5f, 0.5f);
|
||||
float2 dir = uv - center;
|
||||
|
||||
float angle = atan2(dir.x, -dir.y);
|
||||
if (angle < 0)
|
||||
angle += g_fPI;
|
||||
|
||||
float rotation = saturate(g_fTime * g_fTimeMult) * g_fPI;
|
||||
|
||||
tex.rgb = (angle <= rotation) ? 1.0 : tex.rgb;
|
||||
|
||||
Out.vColor = tex;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -224,6 +240,52 @@ PS_OUT PS_UVMult(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_NineSlice(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
float Left = g_fNine_Slice.x / g_fOrigin_Size.x;
|
||||
float Right = (g_fOrigin_Size.x - g_fNine_Slice.y) / g_fOrigin_Size.x;
|
||||
float Top = g_fNine_Slice.z / g_fOrigin_Size.y;
|
||||
float Bottom = (g_fOrigin_Size.y - g_fNine_Slice.w) / g_fOrigin_Size.y;
|
||||
|
||||
float2 ratio = g_fCurrent_Size / g_fOrigin_Size;
|
||||
|
||||
float2 UV = In.vTexcoord * 0.5f + 0.5f;
|
||||
float2 ScaledUV = UV;
|
||||
|
||||
if(UV.x < Left)
|
||||
{
|
||||
ScaledUV.x = UV.x;
|
||||
}
|
||||
else if(UV.x > Right)
|
||||
{
|
||||
ScaledUV.x = 1.0f - ((1.0f - UV.x) / ratio.x);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaledUV.x = Left + (UV.x - Left) / ratio.x;
|
||||
}
|
||||
|
||||
if(UV.y < Top)
|
||||
{
|
||||
ScaledUV.y = UV.y;
|
||||
}
|
||||
else if(UV.y > Bottom)
|
||||
{
|
||||
ScaledUV.y = 1.0f - ((1.0f - UV.y) / ratio.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
ScaledUV.y = Top + (UV.y - Top) / ratio.y;
|
||||
}
|
||||
|
||||
float4 color = g_Texture.Sample(ClampSampler, ScaledUV);
|
||||
|
||||
Out.vColor = color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -305,4 +367,15 @@ technique11 PosTexTechnique11
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_UVMult();
|
||||
}
|
||||
|
||||
pass NineSlice
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_NineSlice();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -304,7 +304,35 @@ PS_OUT PS_MAIN_TEST(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
PS_OUT PS_EYELASH(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
if (vMtrlDiffuse.a < 0.4f)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
|
||||
|
||||
if (true == g_bRimLight)
|
||||
{
|
||||
float fRimLight = GetRimLight(g_vCamPosition.xyz, In.vWorldPos.xyz, vNormal, g_fRimPower, g_fRimStrength);
|
||||
vMtrlDiffuse.xyz = (vMtrlDiffuse.xyz * (1 - fRimLight)) + g_vRimColor * fRimLight;
|
||||
}
|
||||
|
||||
|
||||
Out.vDiffuse = float4(vMtrlDiffuse.rgb, vMtrlDiffuse.g);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
|
||||
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
|
||||
technique11 DefaultTechnique
|
||||
@@ -357,4 +385,14 @@ technique11 DefaultTechnique
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_TEST();
|
||||
}
|
||||
|
||||
pass EyeLashPass
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetDepthStencilState(DSS_Default, 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_EYELASH();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ Texture2D g_MaskingTexture;
|
||||
Texture2D g_ClippingTexture;
|
||||
Texture2D g_DisolveTexture;
|
||||
Texture2D g_NormalTexture;
|
||||
Texture2D g_GlowTexture;
|
||||
|
||||
struct VS_IN
|
||||
{
|
||||
@@ -201,6 +202,25 @@ PS_OUT PS_MAIN_SELECT(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_GLASS(PS_IN In)
|
||||
{
|
||||
PS_OUT Out;
|
||||
|
||||
vector vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
vector vMtrlGlow = g_GlowTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
|
||||
vector vNormalDesc = g_NormalTexture.Sample(MirrorSampler, In.vTexcoord);
|
||||
float3x3 WorldMatrix = float3x3(In.vTangent, In.vBinormal * -1.f, In.vNormal);
|
||||
|
||||
float3 vNormal = mul(vNormalDesc.xyz * 2.f - 1.f, WorldMatrix);
|
||||
|
||||
Out.vDiffuse = lerp(vMtrlDiffuse, vMtrlGlow, vMtrlDiffuse.a);
|
||||
Out.vNormal = float4(vNormal * 0.5f + 0.5f, 0.f);
|
||||
Out.vDepth = float4(In.vProjPos.z / In.vProjPos.w, In.vProjPos.w / g_fFar, 0.0f, 1.f);
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
struct PS_IN_SHADOW
|
||||
{
|
||||
float4 vPosition : SV_POSITION;
|
||||
@@ -336,7 +356,7 @@ technique11 MeshTechnique11
|
||||
{
|
||||
pass MeshPass // 0
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
@@ -442,11 +462,21 @@ technique11 MeshTechnique11
|
||||
|
||||
pass MapToolPass // 11
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_MAIN_SELECT();
|
||||
}
|
||||
|
||||
pass GlassPass // 12
|
||||
{
|
||||
SetRasterizerState(RS_Nocull);
|
||||
SetDepthStencilState(DSS_Default, 0);
|
||||
SetBlendState(BS_None, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff);
|
||||
VertexShader = compile vs_5_0 VS_MAIN();
|
||||
GeometryShader = NULL;
|
||||
PixelShader = compile ps_5_0 PS_GLASS();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "Engine_Shader_Defines.hlsli"
|
||||
|
||||
float PI = 3.141592;
|
||||
|
||||
struct ParticleValue
|
||||
{
|
||||
@@ -28,6 +29,7 @@ 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);
|
||||
|
||||
@@ -41,10 +43,18 @@ float2 g_vMaskingUVGainAmount;
|
||||
float2 g_vDiffuseNoiseUVGainAmount;
|
||||
float2 g_vMaskNoiseUVGainAmount;
|
||||
|
||||
//
|
||||
int g_iMaskMoveLerpOption;
|
||||
int g_iDiffuseMoveLerpOption;
|
||||
int g_iMaskNoiseMoveLerpOption;
|
||||
int g_iDiffuseNoiseMoveLerpOption;
|
||||
//
|
||||
|
||||
float2 g_vUVCutting;
|
||||
float2 g_vUVMaskCutting;
|
||||
|
||||
|
||||
int g_iBlurWeight; // 블러 강도
|
||||
float g_fBlurIntensity; //블러 세기
|
||||
float g_fNoiseDistortionIntensity; // 노이즈 왜곡 세기
|
||||
|
||||
@@ -56,12 +66,53 @@ bool g_isDiffuse;
|
||||
bool g_isMasking;
|
||||
bool g_isDissolve;
|
||||
bool g_isNoise;
|
||||
bool g_isEmissive;
|
||||
|
||||
bool g_isDiffuseUVMove;
|
||||
bool g_isMaskUVMove;
|
||||
|
||||
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
|
||||
{
|
||||
@@ -136,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)
|
||||
{
|
||||
|
||||
@@ -176,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;
|
||||
@@ -188,14 +275,15 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -235,8 +323,8 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
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);
|
||||
|
||||
@@ -247,7 +335,7 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
if (g_isMaskUVMove)
|
||||
{
|
||||
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);
|
||||
@@ -269,14 +357,25 @@ PS_OUT PS_NON_NORMALMAP(PS_IN In)
|
||||
discard;
|
||||
}
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse;
|
||||
|
||||
|
||||
// 색깔 추가할 처리 (이미시브)
|
||||
if (vMtrlDiffuse.a >= g_fEmissiveCutAlpha)
|
||||
Out.vColorTarget = vector(g_vEmissive.rgb, g_fColorOption / 10.f);
|
||||
else
|
||||
Out.vColorTarget = vector(0.f, 0.f, 0.f, 0.f);
|
||||
|
||||
float4 vEmissiveMtrl;
|
||||
|
||||
if (g_isEmissive == true)
|
||||
{
|
||||
vEmissiveMtrl = g_EmissiveTexture.Sample(DefaultSampler, In.vTexcoord);
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -324,6 +423,7 @@ struct PS_BLUR_IN
|
||||
struct PS_BLUR_OUT
|
||||
{
|
||||
float4 vDiffuse : SV_TARGET0;
|
||||
float4 vBlurWeight : SV_TARGET1;
|
||||
};
|
||||
|
||||
|
||||
@@ -332,6 +432,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
PS_BLUR_OUT Out;
|
||||
|
||||
|
||||
vector vMtrlDiffuse;
|
||||
vector vMtrlMask;
|
||||
vector vMtrlNoise;
|
||||
@@ -344,31 +445,20 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
|
||||
if (g_isDiffuse == true)
|
||||
{
|
||||
float2 UV = In.vTexcoord; // 이미지의 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로 만든 다음에 한줄씩 밑으로 내려준다.
|
||||
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
UV = UV_Cutting(In.vTexcoord, g_vUVCutting, int(fAnimIndex.x));
|
||||
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -387,7 +477,8 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
/* 최종 색깔 */
|
||||
vMtrlDiffuse = g_DiffuseTexture.Sample(DefaultSampler, UV);
|
||||
|
||||
vMtrlDiffuse += g_vColor;
|
||||
if (g_vColor.a > 0)
|
||||
vMtrlDiffuse += g_vColor;
|
||||
|
||||
if (vMtrlDiffuse.a < 0.3f)
|
||||
discard;
|
||||
@@ -402,10 +493,13 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
{
|
||||
float2 vMaskTexcoord = In.vTexcoord;
|
||||
|
||||
vMaskTexcoord = UV_Cutting(In.vTexcoord, g_vUVMaskCutting, int(fAnimIndex.x));
|
||||
|
||||
if (g_isNoise == true)
|
||||
{
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + (g_vMaskNoiseUVGainAmount) * (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y);
|
||||
float2 UV; // 이미지의 UV값
|
||||
|
||||
float2 vNoiseUV = In.vTexcoord + SelectLerpUV(g_vMaskNoiseUVGainAmount, (vNoiseUVMoveTime.x / vNoiseUVMoveTime.y), g_iMaskNoiseMoveLerpOption);
|
||||
|
||||
vMtrlNoise = g_NoiseTexture.Sample(DefaultSampler, vNoiseUV);
|
||||
|
||||
@@ -416,7 +510,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
if (g_isMaskUVMove)
|
||||
{
|
||||
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);
|
||||
@@ -428,6 +522,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);
|
||||
|
||||
if (g_isDissolve == true)
|
||||
@@ -439,6 +544,7 @@ PS_BLUR_OUT PS_BLUR(PS_BLUR_IN In)
|
||||
}
|
||||
|
||||
Out.vDiffuse = vMtrlDiffuse * g_fBlurIntensity;
|
||||
Out.vBlurWeight.r = g_iBlurWeight / 32.f;
|
||||
|
||||
return Out;
|
||||
}
|
||||
@@ -460,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();
|
||||
@@ -476,4 +582,10 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 538 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 2.6 KiB |