I am trying to use a texture as a lookup for opacity for use in a material.
Basically I take a text object, gray scale texture that represent the values I want, and use Texture Sample to lookup a value by UV (Between 0.0 and 1.0)
For the purposes here I output the value as debug. The blueprint material I m using looks like this
So for a UV value of zero I get 0.50, when the gradiant I am using should give me a 0.0 at the far left
Some other samples are
0.0 -> 0.5 //unexpected
0.1 -> 0.0
0.2 -> 0.03
0.3 -> 0.07
0.4 -> 0.12
0.5 -> 0.21
0.6 -> 0.32
0.7 -> 0.44
0.8 -> 0.60
0.9 -> 0.80
1.0 -> 0.50 //unexpected
0.01 -> 0.00
0.001 -> 0.24 //unexpected
0.09 -> 0.99
0.999 -> 0.75 //unexpected
Is there a better way to sample a texture by index? Why doesnt this work?