Major update - Architecture Rework

This commit is contained in:
2025-01-27 22:46:27 +01:00
parent 425224a96c
commit 0d5e26266b
131 changed files with 426 additions and 1348 deletions

View File

@@ -0,0 +1,45 @@
/////////////
// GLOBALS //
/////////////
Texture2D shaderTexture1 : register(t0);
Texture2D shaderTexture2 : register(t1);
Texture2D shaderTexture3 : register(t2);
SamplerState SampleType : register(s0);
//////////////
// TYPEDEFS //
//////////////
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
};
////////////////////////////////////////////////////////////////////////////////
// Pixel Shader
////////////////////////////////////////////////////////////////////////////////
float4 AlphaMapPixelShader(PixelInputType input) : SV_TARGET
{
float4 color1;
float4 color2;
float4 alphaValue;
float4 blendColor;
// Get the pixel color from the first texture.
color1 = shaderTexture1.Sample(SampleType, input.tex);
// Get the pixel color from the second texture.
color2 = shaderTexture2.Sample(SampleType, input.tex);
// Get the pixel color from the alpha texture.
alphaValue = shaderTexture3.Sample(SampleType, input.tex);
// Combine the two textures based on the alpha value.
blendColor = (alphaValue * color1) + ((1.0 - alphaValue) * color2);
// Saturate the final color value.
blendColor = saturate(blendColor);
return blendColor;
}