🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DX11 draw a solid line

Started by
0 comments, last by Kabak 4 years, 3 months ago

Hi everybody !

I just try to render lines in DX11.

VS

cbuffer cbPerObject
{
matrix WVP;
matrix Ortho;
};

struct VS_OUTPUT
{
float4 Pos : SV_POSITION;
float4 Color : COLOR;
};

VS_OUTPUT VS(float4 inPos : POSITION, float4 inColor : COLOR)
{
VS_OUTPUT output;
output.Pos = mul(inPos,    Ortho);
output.Color = inColor;

return output;
}
PS
cbuffer cbPerObject
{
matrix WVP;
matrix Ortho;
};

struct VS_OUTPUT
{
float4 Pos : SV_POSITION;
float4 Color : COLOR;
};

float4 PS ( VS_OUTPUT input ) : SV_TARGET
{
return input.Color;
}

Lines has gaps




1) Why does it happened ?

2) How to draw solid lines in DX11 ?

This topic is closed to new replies.

Advertisement