Skip to content

texture2D gives wrong result in experimental backend shader interface #955

Answered by nick87720z
nick87720z asked this question in Q&A
Discussion options

You must be logged in to vote

Hm, discovered. Looks like texture() expects normalized coordinates format in range [0:1]. Passing divided by 100 coordinates gives some meaningful feedback (tile from window miniature).

Right usage:

return texture( tex, texcoord / textureSize( tex, 0));

Replies: 1 comment

Comment options

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