Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

Custom Skybox ignoring matrices

$
0
0

@Paolo_Ferri wrote:

Greeting everyone, allow me to explain my simple problem.

I'm trying to set up a skybox class, but I'm doing it slightly differently.

I just want to have 6 quads on which I'm displaying textures (bear with me, I'm just experimenting).

Coming from OpenGL, I thought I could do this through some matrix manipulation, creating my quads (using vertex buffers) and then do something like this in the effect.

Matrix noTranslation = MainCamera.Instance.ViewMatrix;
noTranslation.M14 = 0;
noTranslation.M24 = 0;
noTranslation.M34 = 0;
basicEffect.World = Matrix.Identity;
basicEffect.View = noTranslation;
basicEffect.Projection = MainCamera.Instance.projectionMatrix ;

This should remove any translation from the quads.

To my surprise, the quads translate normally in world space.

It appears that the basic effect doesn't like being cheated on the matrices...

Any idea why this is happenening?

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles