forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
a64b2cb575
commit
71246e5b75
502 files changed
+4245
-19
No files matched your search
+37
@@ -0,0 +1,37 @@
|
||||
float4 g_fogColor : register(c1);
|
||||
|
||||
sampler2D texDiffuse : register(s0);
|
||||
|
||||
struct PS_INPUT
|
||||
{
|
||||
float4 diffuse : COLOR;
|
||||
float2 uv_albedo : TEXCOORD0;
|
||||
float1 fog : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct PS_OUTPUT
|
||||
{
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
PS_OUTPUT main(const PS_INPUT v)
|
||||
{
|
||||
PS_OUTPUT output;
|
||||
|
||||
// Sample maps
|
||||
float4 diffuse = tex2D(texDiffuse, v.uv_albedo);
|
||||
|
||||
// Multiply by vertex color
|
||||
float4 finalColor = diffuse * v.diffuse;
|
||||
|
||||
// Pre-multiply diffuse by alpha
|
||||
finalColor.xyz = finalColor.xyz * finalColor.w;
|
||||
|
||||
// Multiply fog by alpha
|
||||
float4 fogColor = g_fogColor * finalColor.w;
|
||||
|
||||
// Interpolate between diffuse color and fog color
|
||||
output.color = lerp(fogColor.xyzw, finalColor.xyzw, v.fog.xxxx);
|
||||
|
||||
return output;
|
||||
}
|
||||
Reference in new issue
Block a user