summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-09-21 13:18:53 +0200
committerraysan5 <[email protected]>2020-09-21 13:18:53 +0200
commit032b2db3983836474bef3ee45e90967617146e49 (patch)
treed60912d85bdc26a545c61ebc1ae3bf78b3467884 /examples
parent59bbba19a7415d7c40dd33aa9fb6d2a854229a40 (diff)
downloadraylib-032b2db3983836474bef3ee45e90967617146e49.tar.gz
raylib-032b2db3983836474bef3ee45e90967617146e49.zip
REVIEWED: GenTextureCubemap()
Added some tracelog messages
Diffstat (limited to 'examples')
-rw-r--r--examples/models/models_skybox.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c
index 054ea771..945c1657 100644
--- a/examples/models/models_skybox.c
+++ b/examples/models/models_skybox.c
@@ -51,8 +51,10 @@ int main(void)
Texture2D panorama = LoadTexture(panoFileName);
// 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.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024);
+ // NOTE 1: New texture is generated rendering to texture, shader calculates the sphere->cube coordinates mapping
+ // NOTE 2: It seems on some Android devices WebGL, fbo does not properly support a FLOAT-based attachment,
+ // despite texture can be successfully created.. so using UNCOMPRESSED_R8G8B8A8 instead of UNCOMPRESSED_R32G32B32A32
+ skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024, UNCOMPRESSED_R8G8B8A8);
UnloadTexture(panorama); // Texture not required anymore, cubemap already generated
@@ -84,7 +86,7 @@ int main(void)
TextCopy(panoFileName, droppedFiles[0]);
// Generate cubemap from panorama texture
- skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 512);
+ skybox.materials[0].maps[MAP_CUBEMAP].texture = GenTextureCubemap(shdrCubemap, panorama, 1024);
UnloadTexture(panorama);
}
}