I’m getting discrepancies with two ways of sampling the same texture.
The first method relies on GLSL to do texture sampling, i’ll call it “Internal Sampling”. I’m taking a SOP’s UV coordinates and converting it to a TOP texture (so all Red Green pixel data is UV coordinates) to then be sampled inside a vertex shader into a vector2 called “SopUVPos”. That is then used to sample a TOP texture (in this case a circular Ramp) and put those color values into the vertex colors.
The second method relies on a TOPtoCHOP (which has its UV input fed by those SOP UV coordinates) to do the texture sampling, and that CHOP data then gets packed back into a TOP texture, which then gets sampled inside the vertex shader using a more standard way of determining uv coordinates. This method we’ll call “External Sampling”.
I’d assume that both results would be the same, since they’re essentially doing the same process of sampling a texture, except one is in GLSL and the other in CHOP, but the results are different.
Compare the top row of pixel color of these next two images:
Changing the sColorMap’s Extend V to “Hold” under the GLSL Mat parameters kinda makes it better, but there’s still a difference with the external sampling. Look at the white edges, they’re a bit more faded.
What is causing these slight differences?
GLSL sampling.toe (11.7 KB)