Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Passing arbitrary float values to vertex shader in texcoord - should they lie in 0-1 range?

$
0
0
Hi,

I need to pass two floating point values for use in calculations in a vertex shader and, since it doesn't require texture coordinates for anything else, I'm currently encoding these values in texcoord.u and texccord.v.

This works great.

However, my only concern is that these values are somewhat arbitrary and may lie anywhere from -2,500 to +2,500, say. A shader presumeably expects texture coordinates only to take values in the range 0 - 1, so am I running risk of causing any "issues" by...

Passing arbitrary float values to vertex shader in texcoord - should they lie in 0-1 range?

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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