Marcel Plch
9c5b5d7471
Code imported from my seminary work. In this simplified version it rotates a triangle using OpenGL libraries. Crashes upon exit.
15 lines
269 B
Text
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;
|
|
}
|
|
|