ScarletBlackMarket/script/sample/SamplePS01_HLSL.txt

60 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2022-08-20 05:42:00 +00:00
//================================================================
//<2F><><EFBFBD><EFBFBD><EFBFBD>ݒ<EFBFBD><DD92>l
//Texture
sampler sampler0_ : register(s0);
//================================================================
//--------------------------------
//<2F>s<EFBFBD>N<EFBFBD>Z<EFBFBD><5A><EFBFBD>V<EFBFBD>F<EFBFBD>[<5B>_<EFBFBD><5F><EFBFBD>͒l
struct PS_INPUT
{
float4 diffuse : COLOR0; //<2F>f<EFBFBD>B<EFBFBD>t<EFBFBD><74><EFBFBD>[<5B>Y<EFBFBD>F
float2 texCoord : TEXCOORD0; //<2F>e<EFBFBD>N<EFBFBD>X<EFBFBD>`<60><><EFBFBD><EFBFBD><EFBFBD>W
float2 vPos : VPOS; //<2F>`<60><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>W
};
//--------------------------------
//<2F>s<EFBFBD>N<EFBFBD>Z<EFBFBD><5A><EFBFBD>V<EFBFBD>F<EFBFBD>[<5B>_<EFBFBD>o<EFBFBD>͒l
struct PS_OUTPUT
{
float4 color : COLOR0; //<2F>o<EFBFBD>͐F
};
//================================================================
// <20>V<EFBFBD>F<EFBFBD>[<5B>_
//--------------------------------
//<2F>s<EFBFBD>N<EFBFBD>Z<EFBFBD><5A><EFBFBD>V<EFBFBD>F<EFBFBD>[<5B>_
PS_OUTPUT PsMonotone( PS_INPUT In ) : COLOR0
{
PS_OUTPUT Out;
//<2F>e<EFBFBD>N<EFBFBD>X<EFBFBD>`<60><><EFBFBD>̐F
float4 colorTexture = tex2D(sampler0_, In.texCoord);
//<2F><><EFBFBD>_<EFBFBD>f<EFBFBD>B<EFBFBD>t<EFBFBD>[<5B>Y<EFBFBD>F
float4 colorDiffuse = In.diffuse;
//<2F><><EFBFBD><EFBFBD>
float4 color = colorTexture * colorDiffuse;
//<2F><><EFBFBD>m<EFBFBD>g<EFBFBD>[<5B><><EFBFBD>̌v<CC8C>Z
Out.color.rgb = ( color.r + color.g + color.b ) * 0.3333f;
Out.color.a = color.a;
return Out;
}
//================================================================
//--------------------------------
//technique
technique TecMonotone
{
pass P0
{
PixelShader = compile ps_3_0 PsMonotone();
}
}