You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling, e.g., textureSampleGrad(tex, sampler, st, dst_dx, dst_dy), is the effective sampled area of the texture a patch with "origin" at st, e.g. st + J * xy, with xy in [0,1]^2 and J the Jacobian to sample? Or is st the center of the sampled patch, with st in [-0.5, 0.5]`? Or something else?
What does the spec say? I couldn't find anything explicit, but I might not be searching for the right keywords.
The text was updated successfully, but these errors were encountered:
When you sample from a texture, the st represents the "center" of the sample. E.g. with linear interpolation you'd get the exact pixel value when st is exactly on top of a pixel, but if it's in between two pixels, you get the mean.
Does this make sense? Or are you asking for a specific detail for the Grad-variant of texture sampling? I'm not 100% sure I understand the question.
When calling, e.g.,
textureSampleGrad(tex, sampler, st, dst_dx, dst_dy)
, is the effective sampled area of the texture a patch with "origin" atst
, e.g.st + J * xy
, withxy
in[0,1]^2
and J the Jacobian to sample? Or isst
the center of the sampled patch, withst
in [-0.5, 0.5]`? Or something else?What does the spec say? I couldn't find anything explicit, but I might not be searching for the right keywords.
The text was updated successfully, but these errors were encountered: