I am doing it in geometry shader right now but the objects aren't displayed properly on screen..
before, when I am only using vertex shader and doing the transformation there, the transformation works correctly..
Here is some piece of my code on geometry shader:
cbuffer MatrixBuffer
{
matrix worldMatrix;
matrix viewMatrix;
matrix projectionMatrix;
};
struct GeometryInputType
{
float4 position : POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR;
float pSize : PARTICLE_SIZE;
};
struct PixelInputType
{
float4 position : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR;
};
void GS( point GeometryInputType vert[1], inout TriangleStream triStream )
{
PixelInputType output;
GeometryInputType temp;
//1
temp = vert[0];
// Calculate the position of the vertex against the world, view, and projection matrices.
output.position = mul(temp.position, worldMatrix);
output.position = mul(temp.position, viewMatrix);
output.position = mul(temp.position, projectionMatrix);
output.tex = temp.tex;
output.color = temp.color;
triStream.Append(output);
etc etc etc....

Find content
Not Telling

