Skip to content

How to convert vertex coordinates correctly in shader? #1440

Answered by tebjan
yhl533556 asked this question in Q&A
Discussion options

You must be logged in to vote

The ShadingPosition is usually already in screen space if you have a regular vertex shader.

float4 posss0=streams.ShadingPosition;

so maybe try:

float4 posss0=streams.Position;

because you multiply by WorldViewPostion in the vertexOutput method.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tebjan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants