summaryrefslogtreecommitdiffhomepage
path: root/examples/models/resources/shaders
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2018-12-25 15:19:25 +0100
committerraysan5 <[email protected]>2018-12-25 15:19:25 +0100
commit7b8965eb38adcbc325533acc831e3331c3efba9c (patch)
treece24594cd5cd5f50fc7ff7144c0c001c1d9effb1 /examples/models/resources/shaders
parent35a6e9a07476c06e239b2cf1879bdb97fdc04b09 (diff)
downloadraylib-7b8965eb38adcbc325533acc831e3331c3efba9c.tar.gz
raylib-7b8965eb38adcbc325533acc831e3331c3efba9c.zip
Support float texture data on OpenGL ES 2.0
Diffstat (limited to 'examples/models/resources/shaders')
-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
4 files changed, 8 insertions, 8 deletions
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));