Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

DX11 draw a solid line

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>