mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
Use bitwise operations to extract data from gl_vertexID.
This seems to fix problems for some people, probably fixing some rare hardware bug here.
This commit is contained in:
parent
e8f62d5660
commit
d3ad1b4d01
@ -121,8 +121,8 @@ int convertNormal(int normal, mat3 permutationMatrix, vec3 mirrorVector) {
|
||||
}
|
||||
|
||||
void main() {
|
||||
int faceID = gl_VertexID/4;
|
||||
int vertexID = gl_VertexID%4;
|
||||
int faceID = gl_VertexID >> 2;
|
||||
int vertexID = gl_VertexID & 3;
|
||||
int encodedPositionAndNormalsAndPermutation = faceData[faceID].encodedPositionAndNormalsAndPermutation;
|
||||
int blockAndModel = faceData[faceID].blockAndModel;
|
||||
int fullLight = faceData[faceID].light[vertexID];
|
||||
|
Loading…
x
Reference in New Issue
Block a user