I wrote:

I have a simple six-sided cube with a trivial (depth 2) 3D texture on
it. 4 of the six sides display correctly, but the right and back sides
display the left and front texture respectively.

So I've found what's happening, but I don't know the cause. Something is causing my floating point value of 1.0f to become just marginally bigger than 1.0 and then the default texture wrap comes in. Thus the sides of the box end up looking like the opposite side. Why this is happening I don't know, but something other than my code is introducing floating point inaccuracies into the passed arrays. This is really annoying as that is certainly not in the specification

"WRAP - repeats the texture by wrapping texture coordinates that are
outside the range [0,1]. Only the fractional portion of the texture
coordinates is used. The integer portion is discarded"

Note the square brackets here - zero to one inclusive, not exclusive.
So, for now I've had to use CLAMP to get it to look correct. :(

--
Justin Couch                         http://www.vlc.com.au/~justin/
Java Architect & Bit Twiddler              http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to