rendered paste bodyfloat4x4 WorldViewProj : WORLDVIEWPROJECTION;
texture ParticleTexture : TEXTURE;
struct VS_INPUT
{
float4 position : POSITION0;
float2 texCoord : TEXCOORD0;
float4 color : COLOR0;
float pointSize : PSIZE0;
};
struct VS_OUTPUT
{
float4 position : POSITION0;
float2 texCoord : TEXCOORD0;
float4 color : COLOR0;
float pointSize : PSIZE;
};
sampler ParticleSampler = sampler_state
{
Texture = <ParticleTexture>;
};
VS_OUTPUT VertexShader( VS_INPUT input )
{
VS_OUTPUT output = (VS_OUTPUT)0;
output.position = mul( input.position , WorldViewProj);
output.texCoord = input.texCoord;
output.color = input.color;
output.pointSize = input.pointSize;
return output;
}
float4 PixelShader( VS_OUTPUT input ) : COLOR0
{
float4 texColor = tex2D( ParticleSampler , input.texCoord );
float4 color = texColor * input.color;
return color;
}
technique PointSpriteTechnique
{
pass P0
{
vertexShader = compile vs_2_0 VertexShader();
pixelShader = compile ps_2_0 PixelShader();
}
}