CX/shaders/SimpleVertexShader.vertexshader
Marcel Plch 9c5b5d7471
Import simplified code.
Code imported from my seminary work.
In this simplified version it rotates a triangle
using OpenGL libraries.

Crashes upon exit.
2023-10-25 15:02:23 +02:00

15 lines
269 B
Text

#version 330 core
// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec4 position;
out float colorF;
void main() {
if (position.z <= 0.0)
colorF = 0;
else
colorF = 1;
gl_Position = position;
}