Forums > Gen

sample + float bias


Sep 27 2016 | 3:14 pm

A few questions… (they gradually get less relevant).
The sample operator in gen often does the work that texture2d does in glsl. Occasionally, I encounter a third, optional argument for texture2d that represents the ‘float bias’. Does the float bias simply get added to the second argument of sample to achieve the same result? iow, texture2d(tex, uv, 4.0)sample(tex, uv + 4) ?
If so, and the 2nd arg of sample is norm, is the bias calculated as vec(4, 4) due to the size of norm? Is there any reason I should ever bother to specify the bias as a vector rather than a float, or is it best practice to allow gen to figure it out based upon the size of the 2nd arg?

Viewing 1 post (of 1 total)

Forums > Gen