Updated headers with last changes
This commit is contained in:
parent
2b5bdc0324
commit
e32f2e751b
2 changed files with 38 additions and 34 deletions
|
|
@ -94,7 +94,7 @@ int main()
|
|||
|
||||
// Send to material PBR shader camera view position
|
||||
float cameraPos[3] = { camera.position.x, camera.position.y, camera.position.z };
|
||||
SetShaderValue(model.material.shader, model.material.shader.locs[LOC_MATRIX_VIEW], cameraPos, 3);
|
||||
SetShaderValue(model.material.shader, model.material.shader.locs[LOC_VECTOR_VIEW], cameraPos, 3);
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Draw
|
||||
|
|
|
|||
|
|
@ -34,13 +34,13 @@ int main()
|
|||
SetShaderValuei(skybox.material.shader, GetShaderLocation(skybox.material.shader, "environmentMap"), (int[1]){ TEXMAP_CUBEMAP }, 1);
|
||||
|
||||
// Get skybox shader locations
|
||||
int skyProjectionLoc = GetShaderLocation(skybox.material.shader, "projection");
|
||||
skybox.material.shader.locs[LOC_MATRIX_PROJECTION] = GetShaderLocation(skybox.material.shader, "projection");
|
||||
skybox.material.shader.locs[LOC_MATRIX_VIEW] = GetShaderLocation(skybox.material.shader, "view");
|
||||
|
||||
|
||||
// Then before rendering, configure the viewport to the actual screen dimensions
|
||||
Matrix proj = MatrixPerspective(60.0, (double)GetScreenWidth()/(double)GetScreenHeight(), 0.01, 1000.0);
|
||||
MatrixTranspose(&proj);
|
||||
SetShaderValueMatrix(skybox.material.shader, skyProjectionLoc, proj);
|
||||
SetShaderValueMatrix(skybox.material.shader, skybox.material.shader.locs[LOC_MATRIX_PROJECTION], proj);
|
||||
|
||||
SetCameraMode(camera, CAMERA_ORBITAL); // Set an orbital camera mode
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue