0
我有一些麻烦试图用平截头体视角包裹我的天空机智天空盒。创建一个带有平截头体视角和GLKit的天空盒
GLKMatrix4 projectionMatrix = GLKMatrix4MakeFrustum(-50, 50, -50, 50, 0.1, 100);
GLKMatrix4 baseModelViewMatrix = GLKMatrix4MakeTranslation(0.0f, -0.8f, 0.0);
baseModelViewMatrix = GLKMatrix4Scale(baseModelViewMatrix, 0.5f, 0.5f, 0.5f);
self.effect.transform.projectionMatrix = projectionMatrix;
self.effect.transform.modelviewMatrix = GLKMatrix4Multiply(camera, baseModelViewMatrix);
GLKMatrix4 camera = GLKMatrix4MakeLookAt(
self.cameraEye.x,
self.cameraEye.y,
self.cameraEye.z,
0.0,
0.0,
0.0,
0, 1, 0);
self.effect.transform.modelviewMatrix = GLKMatrix4Multiply(camera, baseModelViewMatrix);
self.skyBoxEffect.center = self.cameraEye;
self.skyBoxEffect.transform.projectionMatrix = self.effect.transform.projectionMatrix;
self.skyBoxEffect.transform.modelviewMatrix = self.effect.transform.modelviewMatrix;
,我在场景渲染的物体看起来相当不错与感觉或深度,但是天空盒根本不起作用不错,图像可能失真,因为视锥角度。这里有什么窍门吗?我怎样才能用一个平截头体的角度来制作GLKit的天空盒?谢谢!