This commit is contained in:
GiJungSUk
2025-11-15 22:04:24 +09:00
parent b4eb62c025
commit 137e1ebb54
29 changed files with 578 additions and 50 deletions
@@ -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();
}
}