From 7b8965eb38adcbc325533acc831e3331c3efba9c Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 25 Dec 2018 15:19:25 +0100 Subject: Support float texture data on OpenGL ES 2.0 --- examples/models/resources/shaders/cubemap.fs | 4 ++-- examples/models/resources/shaders/cubemap.vs | 4 ++-- examples/models/resources/shaders/skybox.fs | 4 ++-- examples/models/resources/shaders/skybox.vs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/models/resources') 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)); -- cgit v1.2.3