LWJGL を実装ライブラリとして使用して、照明を OpenGL で動作させようとしています。私が抱えていると思う問題は、法線を適切に設定していないため、照明が特定の角度で機能しないことです。私がテストしているキューブのコードは次のとおりです。
glBegin(GL_QUADS);
glColor3f(r,g,b);
glNormal3f(position.x, position.y, position.z - radius - 0.1f);
glVertex3f(position.x + radius, position.y + radius, position.z - radius);
glVertex3f(position.x + radius, position.y - radius, position.z - radius);
glVertex3f(position.x - radius, position.y - radius, position.z - radius);
glVertex3f(position.x - radius, position.y + radius, position.z - radius);
glNormal3f(position.x, position.y, position.z + radius + 0.1f);
glVertex3f(position.x + radius, position.y + radius, position.z + radius);
glVertex3f(position.x + radius, position.y - radius, position.z + radius);
glVertex3f(position.x - radius, position.y - radius, position.z + radius);
glVertex3f(position.x - radius, position.y + radius, position.z + radius);
glNormal3f(position.x - radius - 0.1f, position.y, position.z);
glVertex3f(position.x - radius, position.y + radius, position.z + radius);
glVertex3f(position.x - radius, position.y - radius, position.z + radius);
glVertex3f(position.x - radius, position.y - radius, position.z - radius);
glVertex3f(position.x - radius, position.y + radius, position.z - radius);
glNormal3f(position.x + radius + 0.1f, position.y, position.z);
glVertex3f(position.x + radius, position.y + radius, position.z + radius);
glVertex3f(position.x + radius, position.y - radius, position.z + radius);
glVertex3f(position.x + radius, position.y - radius, position.z - radius);
glVertex3f(position.x + radius, position.y + radius, position.z - radius);
glNormal3f(position.x, position.y - radius - 0.1f, position.z);
glVertex3f(position.x + radius, position.y - radius, position.z + radius);
glVertex3f(position.x - radius, position.y - radius, position.z + radius);
glVertex3f(position.x - radius, position.y - radius, position.z - radius);
glVertex3f(position.x + radius, position.y - radius, position.z - radius);
glNormal3f(position.x, position.y + radius + 0.1f, position.z);
glVertex3f(position.x + radius, position.y + radius, position.z + radius);
glVertex3f(position.x - radius, position.y + radius, position.z + radius);
glVertex3f(position.x - radius, position.y + radius, position.z - radius);
glVertex3f(position.x + radius, position.y + radius, position.z - radius);
glEnd();