mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 20:15:35 -04:00
Simplify skybox rendering a little bit
Gets rid of quite a few CPU instructions, but no change to GPU
This commit is contained in:
parent
e76aab0b55
commit
2e6d8990b8
@ -302,10 +302,10 @@ void EnvRenderer_RenderSkybox(double deltaTime) {
|
|||||||
Gfx_SetVertexFormat(VERTEX_FORMAT_P3FT2FC4B);
|
Gfx_SetVertexFormat(VERTEX_FORMAT_P3FT2FC4B);
|
||||||
|
|
||||||
/* Base skybox rotation */
|
/* Base skybox rotation */
|
||||||
m = Matrix_Identity;
|
|
||||||
rotTime = (float)(Game.Time * 2 * MATH_PI); /* So speed of 1 rotates whole skybox every second */
|
rotTime = (float)(Game.Time * 2 * MATH_PI); /* So speed of 1 rotates whole skybox every second */
|
||||||
Matrix_RotateY(&rotY, Env.SkyboxHorSpeed * rotTime); Matrix_MulBy(&m, &rotY);
|
Matrix_RotateY(&rotY, Env.SkyboxHorSpeed * rotTime);
|
||||||
Matrix_RotateX(&rotX, Env.SkyboxVerSpeed * rotTime); Matrix_MulBy(&m, &rotX);
|
Matrix_RotateX(&rotX, Env.SkyboxVerSpeed * rotTime);
|
||||||
|
Matrix_Mul(&m, &rotY, &rotX);
|
||||||
|
|
||||||
/* Rotate around camera */
|
/* Rotate around camera */
|
||||||
pos = Camera.CurrentPos;
|
pos = Camera.CurrentPos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user