aboutsummaryrefslogtreecommitdiff
path: root/raylib/examples/models/resources
diff options
context:
space:
mode:
Diffstat (limited to 'raylib/examples/models/resources')
-rw-r--r--raylib/examples/models/resources/LICENSE.md22
-rw-r--r--raylib/examples/models/resources/billboard.pngbin0 -> 22374 bytes
-rw-r--r--raylib/examples/models/resources/cubicmap.pngbin0 -> 164 bytes
-rw-r--r--raylib/examples/models/resources/cubicmap_atlas.pngbin0 -> 37160 bytes
-rw-r--r--raylib/examples/models/resources/dresden_square_1k.hdrbin0 -> 1524733 bytes
-rw-r--r--raylib/examples/models/resources/dresden_square_2k.hdrbin0 -> 6019615 bytes
-rw-r--r--raylib/examples/models/resources/heightmap.pngbin0 -> 10883 bytes
-rw-r--r--raylib/examples/models/resources/models/gltf/LICENSE2
-rw-r--r--raylib/examples/models/resources/models/gltf/raylib_logo_3d.glbbin0 -> 266724 bytes
-rw-r--r--raylib/examples/models/resources/models/gltf/robot.blendbin0 -> 2107372 bytes
-rw-r--r--raylib/examples/models/resources/models/gltf/robot.glbbin0 -> 1602604 bytes
-rw-r--r--raylib/examples/models/resources/models/iqm/guy.blendbin0 -> 665304 bytes
-rw-r--r--raylib/examples/models/resources/models/iqm/guy.iqmbin0 -> 39408 bytes
-rw-r--r--raylib/examples/models/resources/models/iqm/guyanim.iqmbin0 -> 18244 bytes
-rw-r--r--raylib/examples/models/resources/models/iqm/guytex.pngbin0 -> 301935 bytes
-rw-r--r--raylib/examples/models/resources/models/m3d/cesium_man.m3dbin0 -> 73844 bytes
-rw-r--r--raylib/examples/models/resources/models/m3d/seagull.m3dbin0 -> 10263 bytes
-rw-r--r--raylib/examples/models/resources/models/m3d/suzanne.m3dbin0 -> 11645 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/bridge_diffuse.pngbin0 -> 318466 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/castle_diffuse.pngbin0 -> 444213 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/cube_diffuse.pngbin0 -> 23330 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/house_diffuse.pngbin0 -> 392528 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/market_diffuse.pngbin0 -> 389458 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/plane_diffuse.pngbin0 -> 823493 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/turret_diffuse.pngbin0 -> 380120 bytes
-rw-r--r--raylib/examples/models/resources/models/obj/well_diffuse.pngbin0 -> 342387 bytes
-rw-r--r--raylib/examples/models/resources/models/vox/LICENSE9
-rw-r--r--raylib/examples/models/resources/models/vox/chr_knight.voxbin0 -> 31031 bytes
-rw-r--r--raylib/examples/models/resources/models/vox/chr_sword.voxbin0 -> 30775 bytes
-rw-r--r--raylib/examples/models/resources/models/vox/monu9.voxbin0 -> 160767 bytes
-rw-r--r--raylib/examples/models/resources/shaders/glsl100/cubemap.fs29
-rw-r--r--raylib/examples/models/resources/shaders/glsl100/cubemap.vs20
-rw-r--r--raylib/examples/models/resources/shaders/glsl100/skybox.fs31
-rw-r--r--raylib/examples/models/resources/shaders/glsl100/skybox.vs24
-rw-r--r--raylib/examples/models/resources/shaders/glsl330/cubemap.fs30
-rw-r--r--raylib/examples/models/resources/shaders/glsl330/cubemap.vs20
-rw-r--r--raylib/examples/models/resources/shaders/glsl330/skybox.fs30
-rw-r--r--raylib/examples/models/resources/shaders/glsl330/skybox.vs24
-rw-r--r--raylib/examples/models/resources/skybox.pngbin0 -> 10992 bytes
39 files changed, 241 insertions, 0 deletions
diff --git a/raylib/examples/models/resources/LICENSE.md b/raylib/examples/models/resources/LICENSE.md
new file mode 100644
index 0000000..d7f85c0
--- /dev/null
+++ b/raylib/examples/models/resources/LICENSE.md
@@ -0,0 +1,22 @@
+| resource | author | licence | notes |
+| :------------------- | :---------: | :------ | :---- |
+| models/obj/castle.obj,<br>models/obj/castle_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/bridge.obj,<br>models/obj/bridge_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/house.obj,<br>models/obj/house_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/market.obj,<br>models/obj/market_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/turret.obj,<br>models/obj/turret_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/well.obj,<br>models/obj/well_diffuse.png | [Alberto Cano](https://www.artstation.com/albertocano) | [CC-BY-NC](https://creativecommons.org/licenses/by-nc/4.0/legalcode) | - |
+| models/obj/cube.obj,<br>models/obj/cube_diffuse.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| models/obj/plane.obj,<br>models/obj/plane_diffuse.png | [GiaHanLam](https://sketchfab.com/GiaHanLam) | [CC-BY](https://creativecommons.org/licenses/by/4.0/) | Used by: [`models_yaw_pitch_roll.c`](https://github.com/raysan5/raylib/blob/master/examples/models/models_yaw_pitch_roll.c)
+| models/iqm/guy.iqm,<br>models/iqm/guyanim.iqm,<br>models/iqm/guytex.png,<br>models/iqm/guy.blend | [@culacant](https://github.com/culacant) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| models/gltf/robot.glb,<br>models/gltf/robot.blend | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| models/vox/chr_knight.vox | ❔ | ❔ | - |
+| models/vox/chr_sword.vox | ❔ | ❔ | - |
+| models/vox/monu9.vox | ❔ | ❔ | - |
+| billboard.png | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| cubicmap.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| cubicmap_atlas.png | [@emegeme](https://github.com/emegeme) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| heightmap.png | [@raysan5](https://github.com/raysan5) | [CC0](https://creativecommons.org/publicdomain/zero/1.0/) | - |
+| dresden_square_1k.hdr | [HDRIHaven](https://hdrihaven.com/hdri/?h=dresden_square) | [CC0](https://hdrihaven.com/p/license.php) | - |
+| dresden_square_2k.hdr | [HDRIHaven](https://hdrihaven.com/hdri/?h=dresden_square) | [CC0](https://hdrihaven.com/p/license.php) | - |
+| skybox.png | ❔ | ❔ | - | \ No newline at end of file
diff --git a/raylib/examples/models/resources/billboard.png b/raylib/examples/models/resources/billboard.png
new file mode 100644
index 0000000..8c99118
--- /dev/null
+++ b/raylib/examples/models/resources/billboard.png
Binary files differ
diff --git a/raylib/examples/models/resources/cubicmap.png b/raylib/examples/models/resources/cubicmap.png
new file mode 100644
index 0000000..392dbf2
--- /dev/null
+++ b/raylib/examples/models/resources/cubicmap.png
Binary files differ
diff --git a/raylib/examples/models/resources/cubicmap_atlas.png b/raylib/examples/models/resources/cubicmap_atlas.png
new file mode 100644
index 0000000..9fc404a
--- /dev/null
+++ b/raylib/examples/models/resources/cubicmap_atlas.png
Binary files differ
diff --git a/raylib/examples/models/resources/dresden_square_1k.hdr b/raylib/examples/models/resources/dresden_square_1k.hdr
new file mode 100644
index 0000000..b6d0e77
--- /dev/null
+++ b/raylib/examples/models/resources/dresden_square_1k.hdr
Binary files differ
diff --git a/raylib/examples/models/resources/dresden_square_2k.hdr b/raylib/examples/models/resources/dresden_square_2k.hdr
new file mode 100644
index 0000000..60b4a4c
--- /dev/null
+++ b/raylib/examples/models/resources/dresden_square_2k.hdr
Binary files differ
diff --git a/raylib/examples/models/resources/heightmap.png b/raylib/examples/models/resources/heightmap.png
new file mode 100644
index 0000000..474db87
--- /dev/null
+++ b/raylib/examples/models/resources/heightmap.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/gltf/LICENSE b/raylib/examples/models/resources/models/gltf/LICENSE
new file mode 100644
index 0000000..3c9a38d
--- /dev/null
+++ b/raylib/examples/models/resources/models/gltf/LICENSE
@@ -0,0 +1,2 @@
+robot.glb model by @Quaternius (https://www.patreon.com/quaternius)
+Licensed under CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication (https://creativecommons.org/publicdomain/zero/1.0/) \ No newline at end of file
diff --git a/raylib/examples/models/resources/models/gltf/raylib_logo_3d.glb b/raylib/examples/models/resources/models/gltf/raylib_logo_3d.glb
new file mode 100644
index 0000000..4fc56ad
--- /dev/null
+++ b/raylib/examples/models/resources/models/gltf/raylib_logo_3d.glb
Binary files differ
diff --git a/raylib/examples/models/resources/models/gltf/robot.blend b/raylib/examples/models/resources/models/gltf/robot.blend
new file mode 100644
index 0000000..efe43c5
--- /dev/null
+++ b/raylib/examples/models/resources/models/gltf/robot.blend
Binary files differ
diff --git a/raylib/examples/models/resources/models/gltf/robot.glb b/raylib/examples/models/resources/models/gltf/robot.glb
new file mode 100644
index 0000000..549011e
--- /dev/null
+++ b/raylib/examples/models/resources/models/gltf/robot.glb
Binary files differ
diff --git a/raylib/examples/models/resources/models/iqm/guy.blend b/raylib/examples/models/resources/models/iqm/guy.blend
new file mode 100644
index 0000000..3880467
--- /dev/null
+++ b/raylib/examples/models/resources/models/iqm/guy.blend
Binary files differ
diff --git a/raylib/examples/models/resources/models/iqm/guy.iqm b/raylib/examples/models/resources/models/iqm/guy.iqm
new file mode 100644
index 0000000..36bed5e
--- /dev/null
+++ b/raylib/examples/models/resources/models/iqm/guy.iqm
Binary files differ
diff --git a/raylib/examples/models/resources/models/iqm/guyanim.iqm b/raylib/examples/models/resources/models/iqm/guyanim.iqm
new file mode 100644
index 0000000..824a68a
--- /dev/null
+++ b/raylib/examples/models/resources/models/iqm/guyanim.iqm
Binary files differ
diff --git a/raylib/examples/models/resources/models/iqm/guytex.png b/raylib/examples/models/resources/models/iqm/guytex.png
new file mode 100644
index 0000000..05a58ee
--- /dev/null
+++ b/raylib/examples/models/resources/models/iqm/guytex.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/m3d/cesium_man.m3d b/raylib/examples/models/resources/models/m3d/cesium_man.m3d
new file mode 100644
index 0000000..ddf9f50
--- /dev/null
+++ b/raylib/examples/models/resources/models/m3d/cesium_man.m3d
Binary files differ
diff --git a/raylib/examples/models/resources/models/m3d/seagull.m3d b/raylib/examples/models/resources/models/m3d/seagull.m3d
new file mode 100644
index 0000000..8236820
--- /dev/null
+++ b/raylib/examples/models/resources/models/m3d/seagull.m3d
Binary files differ
diff --git a/raylib/examples/models/resources/models/m3d/suzanne.m3d b/raylib/examples/models/resources/models/m3d/suzanne.m3d
new file mode 100644
index 0000000..9bc64d7
--- /dev/null
+++ b/raylib/examples/models/resources/models/m3d/suzanne.m3d
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/bridge_diffuse.png b/raylib/examples/models/resources/models/obj/bridge_diffuse.png
new file mode 100644
index 0000000..45a86b5
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/bridge_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/castle_diffuse.png b/raylib/examples/models/resources/models/obj/castle_diffuse.png
new file mode 100644
index 0000000..c7085a3
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/castle_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/cube_diffuse.png b/raylib/examples/models/resources/models/obj/cube_diffuse.png
new file mode 100644
index 0000000..6becd47
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/cube_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/house_diffuse.png b/raylib/examples/models/resources/models/obj/house_diffuse.png
new file mode 100644
index 0000000..b36a58a
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/house_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/market_diffuse.png b/raylib/examples/models/resources/models/obj/market_diffuse.png
new file mode 100644
index 0000000..3ad3046
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/market_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/plane_diffuse.png b/raylib/examples/models/resources/models/obj/plane_diffuse.png
new file mode 100644
index 0000000..07371c0
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/plane_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/turret_diffuse.png b/raylib/examples/models/resources/models/obj/turret_diffuse.png
new file mode 100644
index 0000000..33628e3
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/turret_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/obj/well_diffuse.png b/raylib/examples/models/resources/models/obj/well_diffuse.png
new file mode 100644
index 0000000..f8f6686
--- /dev/null
+++ b/raylib/examples/models/resources/models/obj/well_diffuse.png
Binary files differ
diff --git a/raylib/examples/models/resources/models/vox/LICENSE b/raylib/examples/models/resources/models/vox/LICENSE
new file mode 100644
index 0000000..afb6608
--- /dev/null
+++ b/raylib/examples/models/resources/models/vox/LICENSE
@@ -0,0 +1,9 @@
+The following models are provided by the official github repo of voxel-model format by MagikaVoxel developer @ephtracy
+
+GitHub official repo: https://github.com/ephtracy/voxel-model
+
+ - chr_knight.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/character/chr_knight.vox
+ - chr_sword.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/character/chr_sword.vox
+ - monu9.vox - https://github.com/ephtracy/voxel-model/blob/master/vox/monument/monu9.vox
+
+Worth mentioning there is no license specified for the models yet: https://github.com/ephtracy/voxel-model/issues/22
diff --git a/raylib/examples/models/resources/models/vox/chr_knight.vox b/raylib/examples/models/resources/models/vox/chr_knight.vox
new file mode 100644
index 0000000..c921bf5
--- /dev/null
+++ b/raylib/examples/models/resources/models/vox/chr_knight.vox
Binary files differ
diff --git a/raylib/examples/models/resources/models/vox/chr_sword.vox b/raylib/examples/models/resources/models/vox/chr_sword.vox
new file mode 100644
index 0000000..05fc482
--- /dev/null
+++ b/raylib/examples/models/resources/models/vox/chr_sword.vox
Binary files differ
diff --git a/raylib/examples/models/resources/models/vox/monu9.vox b/raylib/examples/models/resources/models/vox/monu9.vox
new file mode 100644
index 0000000..fd77111
--- /dev/null
+++ b/raylib/examples/models/resources/models/vox/monu9.vox
Binary files differ
diff --git a/raylib/examples/models/resources/shaders/glsl100/cubemap.fs b/raylib/examples/models/resources/shaders/glsl100/cubemap.fs
new file mode 100644
index 0000000..7d1bde0
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl100/cubemap.fs
@@ -0,0 +1,29 @@
+#version 100
+
+precision mediump float;
+
+// Input vertex attributes (from vertex shader)
+varying vec3 fragPosition;
+
+// Input uniform values
+uniform sampler2D equirectangularMap;
+
+vec2 SampleSphericalMap(vec3 v)
+{
+ vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
+ uv *= vec2(0.1591, 0.3183);
+ uv += 0.5;
+ return uv;
+}
+
+void main()
+{
+ // Normalize local position
+ vec2 uv = SampleSphericalMap(normalize(fragPosition));
+
+ // Fetch color from texture map
+ vec3 color = texture2D(equirectangularMap, uv).rgb;
+
+ // Calculate final fragment color
+ gl_FragColor = vec4(color, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl100/cubemap.vs b/raylib/examples/models/resources/shaders/glsl100/cubemap.vs
new file mode 100644
index 0000000..6f486fb
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl100/cubemap.vs
@@ -0,0 +1,20 @@
+#version 100
+
+// Input vertex attributes
+attribute vec3 vertexPosition;
+
+// Input uniform values
+uniform mat4 matProjection;
+uniform mat4 matView;
+
+// Output vertex attributes (to fragment shader)
+varying vec3 fragPosition;
+
+void main()
+{
+ // Calculate fragment position based on model transformations
+ fragPosition = vertexPosition;
+
+ // Calculate final vertex position
+ gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl100/skybox.fs b/raylib/examples/models/resources/shaders/glsl100/skybox.fs
new file mode 100644
index 0000000..0ea6876
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl100/skybox.fs
@@ -0,0 +1,31 @@
+#version 100
+
+precision mediump float;
+
+// Input vertex attributes (from vertex shader)
+varying vec3 fragPosition;
+
+// Input uniform values
+uniform samplerCube environmentMap;
+uniform bool vflipped;
+uniform bool doGamma;
+
+void main()
+{
+ // Fetch color from texture map
+ vec4 texelColor = vec4(0.0);
+
+ if (vflipped) texelColor = textureCube(environmentMap, vec3(fragPosition.x, -fragPosition.y, fragPosition.z));
+ else texelColor = textureCube(environmentMap, fragPosition);
+
+ vec3 color = vec3(texelColor.x, texelColor.y, texelColor.z);
+
+ if (doGamma) // Apply gamma correction
+ {
+ color = color/(color + vec3(1.0));
+ color = pow(color, vec3(1.0/2.2));
+ }
+
+ // Calculate final fragment color
+ gl_FragColor = vec4(color, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl100/skybox.vs b/raylib/examples/models/resources/shaders/glsl100/skybox.vs
new file mode 100644
index 0000000..e440ace
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl100/skybox.vs
@@ -0,0 +1,24 @@
+#version 100
+
+// Input vertex attributes
+attribute vec3 vertexPosition;
+
+// Input uniform values
+uniform mat4 matProjection;
+uniform mat4 matView;
+
+// Output vertex attributes (to fragment shader)
+varying vec3 fragPosition;
+
+void main()
+{
+ // Calculate fragment position based on model transformations
+ fragPosition = vertexPosition;
+
+ // Remove translation from the view matrix
+ mat4 rotView = mat4(mat3(matView));
+ vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0);
+
+ // Calculate final vertex position
+ gl_Position = clipPos;
+}
diff --git a/raylib/examples/models/resources/shaders/glsl330/cubemap.fs b/raylib/examples/models/resources/shaders/glsl330/cubemap.fs
new file mode 100644
index 0000000..f59003f
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl330/cubemap.fs
@@ -0,0 +1,30 @@
+#version 330
+
+// Input vertex attributes (from vertex shader)
+in vec3 fragPosition;
+
+// Input uniform values
+uniform sampler2D equirectangularMap;
+
+// Output fragment color
+out vec4 finalColor;
+
+vec2 SampleSphericalMap(vec3 v)
+{
+ vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
+ uv *= vec2(0.1591, 0.3183);
+ uv += 0.5;
+ return uv;
+}
+
+void main()
+{
+ // Normalize local position
+ vec2 uv = SampleSphericalMap(normalize(fragPosition));
+
+ // Fetch color from texture map
+ vec3 color = texture(equirectangularMap, uv).rgb;
+
+ // Calculate final fragment color
+ finalColor = vec4(color, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl330/cubemap.vs b/raylib/examples/models/resources/shaders/glsl330/cubemap.vs
new file mode 100644
index 0000000..d71f808
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl330/cubemap.vs
@@ -0,0 +1,20 @@
+#version 330
+
+// Input vertex attributes
+in vec3 vertexPosition;
+
+// Input uniform values
+uniform mat4 matProjection;
+uniform mat4 matView;
+
+// Output vertex attributes (to fragment shader)
+out vec3 fragPosition;
+
+void main()
+{
+ // Calculate fragment position based on model transformations
+ fragPosition = vertexPosition;
+
+ // Calculate final vertex position
+ gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl330/skybox.fs b/raylib/examples/models/resources/shaders/glsl330/skybox.fs
new file mode 100644
index 0000000..d71fef0
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl330/skybox.fs
@@ -0,0 +1,30 @@
+#version 330
+
+// Input vertex attributes (from vertex shader)
+in vec3 fragPosition;
+
+// Input uniform values
+uniform samplerCube environmentMap;
+uniform bool vflipped;
+uniform bool doGamma;
+
+// Output fragment color
+out vec4 finalColor;
+
+void main()
+{
+ // Fetch color from texture map
+ vec3 color = vec3(0.0);
+
+ if (vflipped) color = texture(environmentMap, vec3(fragPosition.x, -fragPosition.y, fragPosition.z)).rgb;
+ else color = texture(environmentMap, fragPosition).rgb;
+
+ if (doGamma)// Apply gamma correction
+ {
+ color = color/(color + vec3(1.0));
+ color = pow(color, vec3(1.0/2.2));
+ }
+
+ // Calculate final fragment color
+ finalColor = vec4(color, 1.0);
+}
diff --git a/raylib/examples/models/resources/shaders/glsl330/skybox.vs b/raylib/examples/models/resources/shaders/glsl330/skybox.vs
new file mode 100644
index 0000000..f41d469
--- /dev/null
+++ b/raylib/examples/models/resources/shaders/glsl330/skybox.vs
@@ -0,0 +1,24 @@
+#version 330
+
+// Input vertex attributes
+in vec3 vertexPosition;
+
+// Input uniform values
+uniform mat4 matProjection;
+uniform mat4 matView;
+
+// Output vertex attributes (to fragment shader)
+out vec3 fragPosition;
+
+void main()
+{
+ // Calculate fragment position based on model transformations
+ fragPosition = vertexPosition;
+
+ // Remove translation from the view matrix
+ mat4 rotView = mat4(mat3(matView));
+ vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0);
+
+ // Calculate final vertex position
+ gl_Position = clipPos;
+}
diff --git a/raylib/examples/models/resources/skybox.png b/raylib/examples/models/resources/skybox.png
new file mode 100644
index 0000000..36a79b2
--- /dev/null
+++ b/raylib/examples/models/resources/skybox.png
Binary files differ