From 790cbb4d0fbaffc71bf5439de40bb3e44b6658db Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 28 Jun 2021 12:15:08 +0200 Subject: Reviewed uniform names --- examples/web/models/resources/shaders/glsl100/cubemap.vs | 6 +++--- examples/web/models/resources/shaders/glsl100/skybox.vs | 10 +++++----- examples/web/models/resources/shaders/glsl330/cubemap.vs | 6 +++--- examples/web/models/resources/shaders/glsl330/skybox.vs | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'examples') diff --git a/examples/web/models/resources/shaders/glsl100/cubemap.vs b/examples/web/models/resources/shaders/glsl100/cubemap.vs index fd8d17e..6f486fb 100644 --- a/examples/web/models/resources/shaders/glsl100/cubemap.vs +++ b/examples/web/models/resources/shaders/glsl100/cubemap.vs @@ -4,8 +4,8 @@ attribute vec3 vertexPosition; // Input uniform values -uniform mat4 projection; -uniform mat4 view; +uniform mat4 matProjection; +uniform mat4 matView; // Output vertex attributes (to fragment shader) varying vec3 fragPosition; @@ -16,5 +16,5 @@ void main() fragPosition = vertexPosition; // Calculate final vertex position - gl_Position = projection*view*vec4(vertexPosition, 1.0); + gl_Position = matProjection*matView*vec4(vertexPosition, 1.0); } diff --git a/examples/web/models/resources/shaders/glsl100/skybox.vs b/examples/web/models/resources/shaders/glsl100/skybox.vs index 0d00d54..e440ace 100644 --- a/examples/web/models/resources/shaders/glsl100/skybox.vs +++ b/examples/web/models/resources/shaders/glsl100/skybox.vs @@ -4,8 +4,8 @@ attribute vec3 vertexPosition; // Input uniform values -uniform mat4 projection; -uniform mat4 view; +uniform mat4 matProjection; +uniform mat4 matView; // Output vertex attributes (to fragment shader) varying vec3 fragPosition; @@ -16,9 +16,9 @@ void main() fragPosition = vertexPosition; // Remove translation from the view matrix - mat4 rotView = mat4(mat3(view)); - vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0); + mat4 rotView = mat4(mat3(matView)); + vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0); // Calculate final vertex position - gl_Position = clipPos.xyzw; + gl_Position = clipPos; } diff --git a/examples/web/models/resources/shaders/glsl330/cubemap.vs b/examples/web/models/resources/shaders/glsl330/cubemap.vs index 5721eaa..8c1cde4 100644 --- a/examples/web/models/resources/shaders/glsl330/cubemap.vs +++ b/examples/web/models/resources/shaders/glsl330/cubemap.vs @@ -12,8 +12,8 @@ in vec3 vertexPosition; // Input uniform values -uniform mat4 projection; -uniform mat4 view; +uniform mat4 matProjection; +uniform mat4 matView; // Output vertex attributes (to fragment shader) out vec3 fragPosition; @@ -24,5 +24,5 @@ void main() fragPosition = vertexPosition; // Calculate final vertex position - gl_Position = projection*view*vec4(vertexPosition, 1.0); + gl_Position = matProjection*matView*vec4(vertexPosition, 1.0); } diff --git a/examples/web/models/resources/shaders/glsl330/skybox.vs b/examples/web/models/resources/shaders/glsl330/skybox.vs index 4fe9a2c..3260d66 100644 --- a/examples/web/models/resources/shaders/glsl330/skybox.vs +++ b/examples/web/models/resources/shaders/glsl330/skybox.vs @@ -12,8 +12,8 @@ in vec3 vertexPosition; // Input uniform values -uniform mat4 projection; -uniform mat4 view; +uniform mat4 matProjection; +uniform mat4 matView; // Output vertex attributes (to fragment shader) out vec3 fragPosition; @@ -24,9 +24,9 @@ void main() fragPosition = vertexPosition; // Remove translation from the view matrix - mat4 rotView = mat4(mat3(view)); - vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0); + mat4 rotView = mat4(mat3(matView)); + vec4 clipPos = matProjection*rotView*vec4(vertexPosition, 1.0); // Calculate final vertex position - gl_Position = clipPos.xyzw; + gl_Position = clipPos; } -- cgit v1.2.3