share/hedgewars/Data/Shaders/default.vs
author KoBeWi
Thu, 01 Nov 2018 08:39:22 +0100
changeset 14077 7b78c87d80a1
parent 12879 286e170f4f6b
permissions -rw-r--r--
Add missing translation in pl.lua
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12879
286e170f4f6b apparently this is GLES2 only
nemo
parents: 11795
diff changeset
     1
#ifdef GL_ES
11795
2028bd2a6c5b Set medium floating precision to shaders
frd
parents: 11317
diff changeset
     2
precision mediump float;
12879
286e170f4f6b apparently this is GLES2 only
nemo
parents: 11795
diff changeset
     3
#endif
7188
580cd247511e Removed leftover FFP code: We should now be GL2 GLSL1.30+ forward compatible.
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7138
diff changeset
     4
8334
abb48dd39e26 Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff changeset
     5
attribute vec2 vertex;
abb48dd39e26 Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff changeset
     6
attribute vec2 texcoord;
abb48dd39e26 Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff changeset
     7
attribute vec4 colors;
7188
580cd247511e Removed leftover FFP code: We should now be GL2 GLSL1.30+ forward compatible.
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7138
diff changeset
     8
8334
abb48dd39e26 Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff changeset
     9
varying vec2 tex;
7188
580cd247511e Removed leftover FFP code: We should now be GL2 GLSL1.30+ forward compatible.
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7138
diff changeset
    10
7138
f8248bcba8f1 moved generic matrix code to uMatrix.pas
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7129
diff changeset
    11
uniform mat4 mvp;
7129
0ce4f478ea6c initial GLSL1.2 test version
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents:
diff changeset
    12
0ce4f478ea6c initial GLSL1.2 test version
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents:
diff changeset
    13
void main()
0ce4f478ea6c initial GLSL1.2 test version
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents:
diff changeset
    14
{
8334
abb48dd39e26 Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff changeset
    15
    vec4 p = mvp * vec4(vertex, 0.0, 1.0);
7188
580cd247511e Removed leftover FFP code: We should now be GL2 GLSL1.30+ forward compatible.
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7138
diff changeset
    16
    gl_Position = p;
580cd247511e Removed leftover FFP code: We should now be GL2 GLSL1.30+ forward compatible.
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents: 7138
diff changeset
    17
    tex = texcoord;
7129
0ce4f478ea6c initial GLSL1.2 test version
Wolfgang Steffens <WolfgangSteff@gmail.com>
parents:
diff changeset
    18
}