[Fluxus] texture problems

gabor papp gabor.lists at mndl.hu
Wed Apr 8 01:21:43 PDT 2009


> looks correct. You'll notice that the x,y coordinates are the same as the
> s,t coordinates and they're all 1st quadrant.
yes, you are right. the default plane coordinates look like this:
0: p: #(-0.5 -0.5 0.0) t: #(0.0 0.0 0.0)
1: p: #( 0.5 -0.5 0.0) t: #(1.0 0.0 0.0)
2: p: #( 0.5  0.5 0.0) t: #(1.0 1.0 0.0)
3: p: #(-0.5  0.5 0.0) t: #(0.0 1.0 0.0)
p0 is bottom-left and p2 is top-right. texture coordinates: t0 is (0, 0)
and t2 is (1, 1). i think the cause of the problem is that the top-left
of the texture (1st pixel) should be at the texture coordinate (0, 0),
and the bottom-right (last pixel) should be at (1, 1). so with these 1st
quadrant texture coordinates the original, vertically flipped behaviour
was right. now we have flipped the rows in the texture reading code
(reading the last line first, and the first line last), which results in
the problems with the pixels data.

i think the coordinates should be vertically flipped, and the png
reading code should be restored to its normal behaviour:
0: p: #(-0.5 -0.5 0.0) t: #(0.0 1.0 0.0)
1: p: #( 0.5 -0.5 0.0) t: #(1.0 1.0 0.0)
2: p: #( 0.5  0.5 0.0) t: #(1.0 0.0 0.0)
3: p: #(-0.5  0.5 0.0) t: #(0.0 0.0 0.0)

or we can choose to have first quadrant texture coordinates with the
normal, flipped texture.

what is your opinion? am i missing something?

best,
gabor




More information about the Fluxus mailing list