| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- Parameters =
- {
- mat4x4 matViewProj;
- Sampler2D mainTexSamp : alias("mainTexture");
- Texture2D mainTexture;
- };
- Technique =
- {
- Language = "HLSL11";
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = LTE;
-
- Vertex =
- {
- float4x4 matViewProj;
- void main(
- in float3 inPos : POSITION,
- in float2 uv : TEXCOORD0,
- in float4 color : COLOR0,
- out float4 oPosition : SV_Position,
- out float2 oUv : TEXCOORD0,
- out float4 oColor : COLOR0)
- {
- oPosition = mul(matViewProj, float4(inPos.xyz, 1));
- oUv = uv;
- oColor = color;
- }
- };
-
- Fragment =
- {
- SamplerState mainTexSamp : register(s0);
- Texture2D mainTexture : register(t0);
- float4 main(
- in float4 inPos : SV_Position,
- float2 uv : TEXCOORD0,
- float4 color : COLOR0) : SV_Target
- {
- return color * mainTexture.Sample(mainTexSamp, uv);
- }
- };
- };
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = GT;
-
- Vertex =
- {
- float4x4 matViewProj;
- void main(
- in float3 inPos : POSITION,
- in float2 uv : TEXCOORD0,
- in float4 color : COLOR1,
- out float4 oPosition : SV_Position,
- out float2 oUv : TEXCOORD0,
- out float4 oColor : COLOR0)
- {
- oPosition = mul(matViewProj, float4(inPos.xyz, 1));
- oUv = uv;
- oColor = color;
- }
- };
-
- Fragment =
- {
- SamplerState mainTexSamp : register(s0);
- Texture2D mainTexture : register(t0);
- float4 main(
- in float4 inPos : SV_Position,
- float2 uv : TEXCOORD0,
- float4 color : COLOR0) : SV_Target
- {
- return color * mainTexture.Sample(mainTexSamp, uv);
- }
- };
- };
- };
- Technique =
- {
- Language = "HLSL9";
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = LTE;
-
- Vertex =
- {
- float4x4 matViewProj;
- void main(
- in float3 inPos : POSITION,
- in float4 color : COLOR0,
- in float2 uv : TEXCOORD0,
- out float4 oPosition : POSITION,
- out float4 oColor : COLOR0,
- out float2 oUv : TEXCOORD0)
- {
- oPosition = mul(matViewProj, float4(inPos.xyz, 1));
- oColor = color;
- oUv = uv;
- }
- };
-
- Fragment =
- {
- sampler2D mainTexture;
- float4 main(float2 uv : TEXCOORD0, float4 color : COLOR0) : COLOR0
- {
- return color * tex2D(mainTexture, uv);
- }
- };
- };
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = GT;
-
- Vertex =
- {
- float4x4 matViewProj;
- void main(
- in float3 inPos : POSITION,
- in float4 color : COLOR1,
- in float2 uv : TEXCOORD0,
- out float4 oPosition : POSITION,
- out float4 oColor : COLOR0,
- out float2 oUv : TEXCOORD0)
- {
- oPosition = mul(matViewProj, float4(inPos.xyz, 1));
- oColor = color;
- oUv = uv;
- }
- };
-
- Fragment =
- {
- sampler2D mainTexture;
- float4 main(float2 uv : TEXCOORD0, float4 color : COLOR0) : COLOR0
- {
- return color * tex2D(mainTexture, uv);
- }
- };
- };
- };
- Technique =
- {
- Language = "GLSL";
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = LTE;
-
- Vertex =
- {
- uniform mat4 matViewProj;
- in vec3 bs_position;
- in vec4 bs_color0;
- in vec2 bs_texcoord0;
- out vec4 color0;
- out vec2 texcoord0;
- out gl_PerVertex
- {
- vec4 gl_Position;
- };
-
- void main()
- {
- gl_Position = matViewProj * vec4(bs_position.xyz, 1);
- texcoord0 = bs_texcoord0;
- color0 = bs_color0;
- }
- };
-
- Fragment =
- {
- uniform sampler2D mainTexture;
- in vec4 color0;
- in vec2 texcoord0;
- out vec4 fragColor;
- void main()
- {
- vec4 texColor = texture2D(mainTexture, texcoord0.st);
- fragColor = color0 * texColor;
- }
- };
- };
-
- Pass =
- {
- Target =
- {
- Blend = true;
- Color = { SRCA, SRCIA, ADD };
- };
-
- DepthWrite = false;
- CompareFunc = GT;
-
- Vertex =
- {
- uniform mat4 matViewProj;
- in vec3 bs_position;
- in vec4 bs_color1;
- in vec2 bs_texcoord0;
- out vec4 color0;
- out vec2 texcoord0;
- out gl_PerVertex
- {
- vec4 gl_Position;
- };
-
- void main()
- {
- gl_Position = matViewProj * vec4(bs_position.xyz, 1);
- texcoord0 = bs_texcoord0;
- color0 = bs_color1;
- }
- };
-
- Fragment =
- {
- uniform sampler2D mainTexture;
- in vec4 color0;
- in vec2 texcoord0;
- out vec4 fragColor;
- void main()
- {
- vec4 texColor = texture2D(mainTexture, texcoord0.st);
- fragColor = color0 * texColor;
- }
- };
- };
- };
|