Advertisement

Geometry shader error

Started by June 19, 2018 08:51 AM
2 comments, last by MikhailGorobets 6 years, 5 months ago

error X3502: 'main': input parameter 'input' missing semantics

 


#include "Common.hlsli"

struct PSInput {
    float4 Position;
    float2 Texcoord;
};

PSInput OffsetNProjected(PSInput data, float2 offset, float2 texcoord) {
    data.Position.xy += offset;
    data.Position = mul(data.Position, Project);
    data.Texcoord = texcoord;
    return data;
}

[maxvertexcount(4)]
void main(point PSInput input[1], inout TriangleStream<PSInput> stream) {

    PSInput output = input[0];
    const float size = 0.1f;
    stream.Append(OffsetNProjected(output, float2(-1, -1) * size, float2(0, 0)));
    stream.Append(OffsetNProjected(output, float2(-1, -1) * size, float2(0, 1)));
    stream.Append(OffsetNProjected(output, float2(1, -1) * size, float2(1, 0)));
    stream.Append(OffsetNProjected(output, float2(1, 1) * size, float2(1, 1)));
    stream.RestartStrip();
}


 

9 hours ago, MikhailGorobets said:

point PSInput input[1]

I would guess this should be something else, e.g. "inout PSInput input[1]".

Hello to all my stalkers.

Advertisement
1 minute ago, Lactose said:

I would guess this should be something else, e.g. "inout PSInput input[1]".

No. I don't set Position:SV_Position, Texcoord : TEXCOORD

This topic is closed to new replies.

Advertisement