new solver - point generation

This commit is contained in:
David Allemang
2022-10-09 23:50:36 -04:00
parent f740fb26c6
commit eee87cc9c4
21 changed files with 216 additions and 471 deletions

View File

@@ -0,0 +1,12 @@
#version 440
layout(location=1) uniform float time;
layout(location=2) uniform mat4 proj;
layout(location=3) uniform mat4 rot;
layout(location=0) in vec4 pos;
void main() {
vec4 pos = rot * pos;
gl_Position = proj * vec4(pos.xyz / (1 - pos.w), 1.0);
}

View File

@@ -0,0 +1,12 @@
#version 440
layout(location=0) uniform vec4 ucol;
layout(location=0) out vec4 col;
void main() {
float d = 1.0 - gl_FragCoord.z;
d = (d - 0.5) / 0.7 + 0.5;
col = ucol;
col.xyz *= d;
}

View File

@@ -0,0 +1,15 @@
#version 440
//layout(location=1) uniform float time;
layout(location=2) uniform mat4 proj;
//layout(location=3) uniform mat4 rot;
layout(location=0) in vec4 pos;
void main() {
// mat3 rot3 = mat3(rot);
// vec3 pos3 = rot3 * pos;
vec3 pos3 = pos.xyz;
gl_Position = proj * vec4(pos3, 1.0);
}