From c48de2d1afdeefa99c5ad7760ffe8873993c841c Mon Sep 17 00:00:00 2001 From: gtrxAC <59177874+gtrxAC@users.noreply.github.com> Date: Tue, 22 Nov 2022 19:16:44 +0200 Subject: Rename lighting_instanced shader (glsl100) to lighting_instancing (#2805) * JSON parser: Use array for function params (#2255) * Parser: follow C convention of type before name * Update file names in build scripts * Rename lighting_instanced shader to instancing --- .../shaders/glsl100/lighting_instanced.vs | 36 ---------------------- .../shaders/glsl100/lighting_instancing.vs | 36 ++++++++++++++++++++++ 2 files changed, 36 insertions(+), 36 deletions(-) delete mode 100644 examples/shaders/resources/shaders/glsl100/lighting_instanced.vs create mode 100644 examples/shaders/resources/shaders/glsl100/lighting_instancing.vs diff --git a/examples/shaders/resources/shaders/glsl100/lighting_instanced.vs b/examples/shaders/resources/shaders/glsl100/lighting_instanced.vs deleted file mode 100644 index eb47bb91..00000000 --- a/examples/shaders/resources/shaders/glsl100/lighting_instanced.vs +++ /dev/null @@ -1,36 +0,0 @@ -#version 100 - -// Input vertex attributes -attribute vec3 vertexPosition; -attribute vec2 vertexTexCoord; -attribute vec3 vertexNormal; -attribute vec4 vertexColor; - -attribute mat4 instanceTransform; - -// Input uniform values -uniform mat4 mvp; -uniform mat4 matNormal; - -// Output vertex attributes (to fragment shader) -varying vec3 fragPosition; -varying vec2 fragTexCoord; -varying vec4 fragColor; -varying vec3 fragNormal; - -// NOTE: Add here your custom variables - -void main() -{ - // Compute MVP for current instance - mat4 mvpi = mvp*instanceTransform; - - // Send vertex attributes to fragment shader - fragPosition = vec3(mvpi*vec4(vertexPosition, 1.0)); - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); - - // Calculate final vertex position - gl_Position = mvpi*vec4(vertexPosition, 1.0); -} diff --git a/examples/shaders/resources/shaders/glsl100/lighting_instancing.vs b/examples/shaders/resources/shaders/glsl100/lighting_instancing.vs new file mode 100644 index 00000000..eb47bb91 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/lighting_instancing.vs @@ -0,0 +1,36 @@ +#version 100 + +// Input vertex attributes +attribute vec3 vertexPosition; +attribute vec2 vertexTexCoord; +attribute vec3 vertexNormal; +attribute vec4 vertexColor; + +attribute mat4 instanceTransform; + +// Input uniform values +uniform mat4 mvp; +uniform mat4 matNormal; + +// Output vertex attributes (to fragment shader) +varying vec3 fragPosition; +varying vec2 fragTexCoord; +varying vec4 fragColor; +varying vec3 fragNormal; + +// NOTE: Add here your custom variables + +void main() +{ + // Compute MVP for current instance + mat4 mvpi = mvp*instanceTransform; + + // Send vertex attributes to fragment shader + fragPosition = vec3(mvpi*vec4(vertexPosition, 1.0)); + fragTexCoord = vertexTexCoord; + fragColor = vertexColor; + fragNormal = normalize(vec3(matNormal*vec4(vertexNormal, 1.0))); + + // Calculate final vertex position + gl_Position = mvpi*vec4(vertexPosition, 1.0); +} -- cgit v1.2.3