I take it I'm the only one who has no issues with shaders in GDK, try this for point sprites(very cut down version):
////////////////////////////////
// PS 2.0 Point Sprites //
// //
// By Carlos(Darkcoder)Wilkes //
// Darkcoder.co.uk //
////////////////////////////////
matrix WorldViewProjection : WorldViewProjection;
matrix Projection : Projection;
float ViewportHeight = 600.0f;
texture DiffuseTX
<string ResourceName = "" ;>;
sampler2D DiffuseSampler = sampler_state
{
texture = <DiffuseTX>;
MipFilter = Linear;
MinFilter = Linear;
MagFilter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};
//---------------------------------------------------------
// Point sprites - ( Shader 1 )
//
// basic point sprites
//---------------------------------------------------------
struct S0_vIN
{
float4 Position : POSITION;
};
struct S0_vOUT
{
float4 Position : POSITION;
float2 UV0 : TEXCOORD0;
float PSize : PSize;
};
S0_vOUT S0_VertexShader( S0_vIN IN )
{
S0_vOUT OUT;
OUT.Position = mul( IN.Position, WorldViewProjection );
OUT.UV0 = 0.0;
OUT.PSize = 1.0f * Projection._m11 / OUT.Position.w * ViewportHeight / 2;
return OUT;
}
float4 S0_PixelShader( S0_vOUT IN ) : COLOR
{
return float4( 0.0f, 1.0f, 0.0f, 1.0f );
}
technique tech_Shading
{
pass p0
{
FillMode = Point;
PointSpriteEnable = True;
vertexShader = compile vs_2_0 S0_VertexShader();
pixelShader = compile ps_2_0 S0_PixelShader();
}
}
and code:
#include "DarkGDK.h"
void DarkGDK()
{
dbSyncOn();
dbMakeObjectSphere( 1, 10.0f );
dbLoadEffect( "PointSprite.fx", 1, 0 );
dbSetObjectEffect( 1, 1 );
while ( LoopGDK() )
{
dbTurnObjectRight( 1, 5.0f );
dbSync();
}
}