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

How to declare XMCOLOR in HLSL?

$
0
0

So my vertex structure has an XMCOLOR member in it and I want to use it in HLSL but I'm getting errors while compiling the shaders.

error X4577: Not all elements of SV_Position were written.

error X4576: Output signature parameter  (1-based Entry 0) type must be float32 and mask must be xyzw.

I'm new to HLSL and DirectX so I can't understand what's the problem...

My vertex (VS) and pixel (PS) shaders:

cbuffer cbPerObj : register(b0)
{
	float4x4 vWorldViewProj; 
};

struct VertexIn
{
	float3 pos  : POSITION;
	float3 tan  : TANGENT;
	float3 norm : NORMAL;
	float3 tex0 : TEX0;
	float3 tex1 : TEX1 …

Viewing all articles
Browse latest Browse all 17560

Trending Articles



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