Closed rikka0w0 closed 6 years ago
Hi Keen, thanks for that, I will look into it. I'm currently updating to 1.12 which is taking a long time, I will be sure to add your changes. Cheers, TGG
Fixed it in 1.12.2, you were right! Thanks for letting me know! TGG
If you look carefully, you will find that the diamond block on the chess board is actually darker than what it is supposed to be. I use some of the code in that example, for block rendering is completely fine, but when it comes to item rendering, the model looks too dark. After read though the source code of Minecraft and Forge, I realize that the seventh int returned by vertexToInts() should not always be zero. That int represents an normal vector, but in packed form: ?? ZZ YY XX, it is used by OpenGL to calculate lighting. See calculatePackedNormal() in my code for some idea about how to calc that int value:
You just need to pass coordinate of all four vertexes to the function, be careful, don`t change the order of vertexes, otherwise the result is unpredictable!