scummvm/engines/playground3d/shaders/playground3d_cube.vertex
Le Philousophe c9b4949746 AMIGAOS: Improve shader compatibility
OGLES2 doesn't support uniform booleans so we use macros to make it use
integers in this case. For other platforms, this change should be a
noop.
OGLES2 doesn't like float suffix for constants, remove it as well.
2022-04-17 12:34:38 +02:00

27 lines
478 B
Text

in vec3 position;
in vec3 color;
in vec3 normal;
in vec2 texcoord;
uniform mat4 mvpMatrix;
uniform mat4 projMatrix;
uniform mat4 modelMatrix;
uniform mat4 rotateMatrix;
uniform UBOOL textured;
uniform vec3 modelPos;
out vec2 Texcoord;
out vec3 Color;
void main() {
Texcoord = texcoord;
vec4 pos = rotateMatrix * vec4(position, 1.0);
gl_Position = mvpMatrix * (pos + vec4(modelPos, 1.0));
if (UBOOL_TEST(textured)) {
Color = vec3(1.0);
} else {
Color = color;
}
}