aboutsummaryrefslogtreecommitdiff
path: root/examples/models
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2018-12-25 15:19:25 +0100
committerraysan5 <raysan5@gmail.com>2018-12-25 15:19:25 +0100
commit7b8965eb38adcbc325533acc831e3331c3efba9c (patch)
treece24594cd5cd5f50fc7ff7144c0c001c1d9effb1 /examples/models
parent35a6e9a07476c06e239b2cf1879bdb97fdc04b09 (diff)
downloadraylib-7b8965eb38adcbc325533acc831e3331c3efba9c.tar.gz
raylib-7b8965eb38adcbc325533acc831e3331c3efba9c.zip
Support float texture data on OpenGL ES 2.0
Diffstat (limited to 'examples/models')
-rw-r--r--examples/models/models_skybox.c2
-rw-r--r--examples/models/resources/shaders/cubemap.fs4
-rw-r--r--examples/models/resources/shaders/cubemap.vs4
-rw-r--r--examples/models/resources/shaders/skybox.fs4
-rw-r--r--examples/models/resources/shaders/skybox.vs4
5 files changed, 9 insertions, 9 deletions
diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c
index 6f6002b8..a6b233e3 100644
--- a/examples/models/models_skybox.c
+++ b/examples/models/models_skybox.c
@@ -21,7 +21,7 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [models] example - skybox loading and drawing");
// Define the camera to look into our 3d world
- Camera camera = {{ 1.0f, 1.0f, 1.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
+ Camera camera = {{ 1.0f, 1.0f, 1.0f }, { 4.0f, 1.0f, 4.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f, 0 };
// Load skybox model
Mesh cube = GenMeshCube(1.0f, 1.0f, 1.0f);
diff --git a/examples/models/resources/shaders/cubemap.fs b/examples/models/resources/shaders/cubemap.fs
index 09ae62f5..e8e28536 100644
--- a/examples/models/resources/shaders/cubemap.fs
+++ b/examples/models/resources/shaders/cubemap.fs
@@ -9,7 +9,7 @@
#version 330
// Input vertex attributes (from vertex shader)
-in vec3 fragPos;
+in vec3 fragPosition;
// Input uniform values
uniform sampler2D equirectangularMap;
@@ -28,7 +28,7 @@ vec2 SampleSphericalMap(vec3 v)
void main()
{
// Normalize local position
- vec2 uv = SampleSphericalMap(normalize(fragPos));
+ vec2 uv = SampleSphericalMap(normalize(fragPosition));
// Fetch color from texture map
vec3 color = texture(equirectangularMap, uv).rgb;
diff --git a/examples/models/resources/shaders/cubemap.vs b/examples/models/resources/shaders/cubemap.vs
index 6e0bf4e1..5721eaa2 100644
--- a/examples/models/resources/shaders/cubemap.vs
+++ b/examples/models/resources/shaders/cubemap.vs
@@ -16,12 +16,12 @@ uniform mat4 projection;
uniform mat4 view;
// Output vertex attributes (to fragment shader)
-out vec3 fragPos;
+out vec3 fragPosition;
void main()
{
// Calculate fragment position based on model transformations
- fragPos = vertexPosition;
+ fragPosition = vertexPosition;
// Calculate final vertex position
gl_Position = projection*view*vec4(vertexPosition, 1.0);
diff --git a/examples/models/resources/shaders/skybox.fs b/examples/models/resources/shaders/skybox.fs
index 0bd2f320..053a2517 100644
--- a/examples/models/resources/shaders/skybox.fs
+++ b/examples/models/resources/shaders/skybox.fs
@@ -9,7 +9,7 @@
#version 330
// Input vertex attributes (from vertex shader)
-in vec3 fragPos;
+in vec3 fragPosition;
// Input uniform values
uniform samplerCube environmentMap;
@@ -20,7 +20,7 @@ out vec4 finalColor;
void main()
{
// Fetch color from texture map
- vec3 color = texture(environmentMap, fragPos).rgb;
+ vec3 color = texture(environmentMap, fragPosition).rgb;
// Apply gamma correction
color = color/(color + vec3(1.0));
diff --git a/examples/models/resources/shaders/skybox.vs b/examples/models/resources/shaders/skybox.vs
index f40d615c..dcbe6c3d 100644
--- a/examples/models/resources/shaders/skybox.vs
+++ b/examples/models/resources/shaders/skybox.vs
@@ -16,12 +16,12 @@ uniform mat4 projection;
uniform mat4 view;
// Output vertex attributes (to fragment shader)
-out vec3 fragPos;
+out vec3 fragPosition;
void main()
{
// Calculate fragment position based on model transformations
- fragPos = vertexPosition;
+ fragPosition = vertexPosition;
// Remove translation from the view matrix
mat4 rotView = mat4(mat3(view));