mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-06 13:27:57 +00:00
Review models examples
This commit is contained in:
@@ -29,8 +29,8 @@ int main()
|
||||
|
||||
// Load skybox shader and set required locations
|
||||
// NOTE: Some locations are automatically set at shader loading
|
||||
skybox.material.shader = LoadShader("resources/shaders/skybox.vs", "resources/shaders/skybox.fs");
|
||||
SetShaderValue(skybox.material.shader, GetShaderLocation(skybox.material.shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
|
||||
skybox.materials[0].shader = LoadShader("resources/shaders/skybox.vs", "resources/shaders/skybox.fs");
|
||||
SetShaderValue(skybox.materials[0].shader, GetShaderLocation(skybox.materials[0].shader, "environmentMap"), (int[1]){ MAP_CUBEMAP }, UNIFORM_INT);
|
||||
|
||||
// Load cubemap shader and setup required shader locations
|
||||
Shader shdrCubemap = LoadShader("resources/shaders/cubemap.vs", "resources/shaders/cubemap.fs");
|
||||
@@ -41,7 +41,7 @@ int main()
|
||||
|
||||
// Generate cubemap (texture with 6 quads-cube-mapping) from panorama HDR texture
|
||||
// NOTE: New texture is generated rendering to texture, shader computes the sphre->cube coordinates mapping
|
||||
skybox.material.maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
|
||||
skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, texHDR, 512);
|
||||
|
||||
UnloadTexture(texHDR); // Texture not required anymore, cubemap already generated
|
||||
UnloadShader(shdrCubemap); // Unload cubemap generation shader, not required anymore
|
||||
|
||||
Reference in New Issue
Block a user