softpipe: Fix cube face selection.
If arx and ary are equal, we still want to choose from one of them, and not arz.
This commit is contained in:
parent
fb2c7b6743
commit
de685b37a9
|
@ -464,7 +464,7 @@ choose_cube_face(float rx, float ry, float rz, float *newS, float *newT)
|
||||||
unsigned face;
|
unsigned face;
|
||||||
float sc, tc, ma;
|
float sc, tc, ma;
|
||||||
|
|
||||||
if (arx > ary && arx > arz) {
|
if (arx >= ary && arx >= arz) {
|
||||||
if (rx >= 0.0F) {
|
if (rx >= 0.0F) {
|
||||||
face = PIPE_TEX_FACE_POS_X;
|
face = PIPE_TEX_FACE_POS_X;
|
||||||
sc = -rz;
|
sc = -rz;
|
||||||
|
@ -478,7 +478,7 @@ choose_cube_face(float rx, float ry, float rz, float *newS, float *newT)
|
||||||
ma = arx;
|
ma = arx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (ary > arx && ary > arz) {
|
else if (ary >= arx && ary >= arz) {
|
||||||
if (ry >= 0.0F) {
|
if (ry >= 0.0F) {
|
||||||
face = PIPE_TEX_FACE_POS_Y;
|
face = PIPE_TEX_FACE_POS_Y;
|
||||||
sc = rx;
|
sc = rx;
|
||||||
|
|
Loading…
Reference in New Issue