Skip to content

HLSL: VSInput semantics have no effect #318

@Jordandionduval

Description

@Jordandionduval

While working with the tool, I was trying some stuff with normal maps and I noticed that while inputs can be changed, the semantics have no effects.

For example, if I wanted to define a variable for the position, normal and Texture Coordinates in an HLSL, I would write it like this:

struct VSInput {
	float3 Position 	: POSITION;
	float3 Normal 		: NORMAL;
	float2 TexCoord		: TEXCOORD;
};

Now, if I tried this instead:

struct VSInput {
	float3 Position 	: POSITION;
	float2 TexCoord 	: TEXCOORD;
	float3 Normal		: NORMAL;
};

My Normal variable would contain texture coordinates data and vice versa.

This bug also makes it so you can't access the other inputs provided in the documentation.

I tried with Color on a mesh that had vertex color applied and it didn't work. I can't exactly confirm for Binormal and Tangent (new to HLSL so not sure I understand everything), but compared to results in other applications it didn't look like it worked either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions