bugfix: labels missing on some ATI cards

some ATI cards require the first shader attribute at position 0 to
be bound.  The problem was that the attr_pickcolor attribute was
automatically bound to position 0, and was not always being used, which
caused the ATI card to fail (not exactly sure why, but binding position 0
fixes the problem)

binding also did not always work in the open-source version, since ATI
assigns the attribute positions in alphabetical order, changing the
name of the optional attr_pickcolor attribute seems to fix the labels
on these cards
This commit is contained in:
Thomas Holder
2014-02-28 03:48:19 +00:00
parent ea75c1713a
commit 9472c15a51
3 changed files with 46 additions and 20 deletions

View File

@@ -1,8 +1,11 @@
attribute vec4 attr_worldpos;
attribute vec3 attr_screenoffset;
attribute vec2 attr_texcoords;
attribute vec3 attr_screenworldoffset;
attribute vec4 attr_pickcolor;
attribute vec4 attr_t_pickcolor; // changed name for ATI, optional attribute
// cannot be first/0 index, ATI sets index
// alphabetically
varying vec2 textureLookup ;
varying vec3 normalizedViewCoordinate;
varying vec4 pickcolor ;
@@ -34,5 +37,5 @@ void main()
} else {
fog = 1.1; // >= 1.0
}
pickcolor = attr_pickcolor;
pickcolor = attr_t_pickcolor;
}