mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
COMP: Clean up unused shaders
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
add_embed_library(shaders
|
||||
curve-ortho.gm.glsl
|
||||
curve-stereo.gm.glsl
|
||||
diffuse.fs.glsl
|
||||
direct-ortho.vs.glsl
|
||||
direct-stereo.vs.glsl
|
||||
solid.fs.glsl
|
||||
deferred.vs.glsl
|
||||
slice.gm.glsl
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
#version 430
|
||||
|
||||
#define SUBS 20
|
||||
|
||||
layout(lines) in;
|
||||
layout(line_strip, max_vertices = SUBS) out;
|
||||
|
||||
layout(std430, binding=1) buffer Positions {
|
||||
vec4 verts[];
|
||||
};
|
||||
|
||||
layout(std140, binding=1) uniform Matrices {
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
out gl_PerVertex {
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
in vec4 gpos[];
|
||||
|
||||
out vec4 vpos;
|
||||
|
||||
vec4 stereo(vec4 v) {
|
||||
return vec4(v.xyz, 1);
|
||||
}
|
||||
|
||||
void main() {
|
||||
for (int i = 0; i < SUBS; i++) {
|
||||
vpos = mix(gpos[0], gpos[1], i * 1.0f / (SUBS - 1));
|
||||
vpos = normalize(vpos);
|
||||
gl_Position = proj * stereo(vpos);
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
#version 430
|
||||
|
||||
#define SUBS 20
|
||||
|
||||
layout(lines) in;
|
||||
layout(line_strip, max_vertices = SUBS) out;
|
||||
|
||||
layout(std430, binding=1) buffer Positions {
|
||||
vec4 verts[];
|
||||
};
|
||||
|
||||
layout(std140, binding=1) uniform Matrices {
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
out gl_PerVertex {
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
in vec4 gpos[];
|
||||
|
||||
out vec4 vpos;
|
||||
|
||||
vec4 stereo(vec4 v) {
|
||||
return vec4(v.xyz / (1 - v.w), 1);
|
||||
}
|
||||
|
||||
void main() {
|
||||
for (int i = 0; i < SUBS; i++) {
|
||||
vpos = mix(gpos[0], gpos[1], i * 1.0f / (SUBS - 1));
|
||||
vpos = normalize(vpos);
|
||||
|
||||
gl_Position = proj * stereo(vpos);
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
@@ -9,6 +9,11 @@ layout(std140, binding=1) uniform Matrices {
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
layout(std140, binding=2) uniform ModelMatrices {
|
||||
mat4 linear;
|
||||
vec4 translation;
|
||||
};
|
||||
|
||||
layout(location=0) in ivec4 inds;
|
||||
layout(location=1) in vec4 col;
|
||||
|
||||
@@ -24,7 +29,7 @@ void main() {
|
||||
vInds = inds;
|
||||
vCol = col;
|
||||
|
||||
vec4 pos = view * verts[vInds.x];
|
||||
vec4 pos = linear * verts[vInds.x] + translation;
|
||||
gl_Position = proj * vec4(pos.xyz, 1);
|
||||
gl_PointSize = 5;
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#version 430
|
||||
|
||||
layout(location=1) in vec4 col;
|
||||
layout(location=2) in vec3 normal;
|
||||
|
||||
out vec4 color;
|
||||
|
||||
void main() {
|
||||
float bright = dot(normal, normalize(vec3(-0.6, 1, 2)));
|
||||
bright = .6 + .3 * bright;
|
||||
|
||||
color = col;
|
||||
color.xyz *= bright;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
#version 430
|
||||
|
||||
layout(std430, binding=1) buffer Positions {
|
||||
vec4 verts[];
|
||||
};
|
||||
|
||||
layout(std140, binding=1) uniform Matrices {
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
out gl_PerVertex {
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
out vec4 vpos;
|
||||
|
||||
void main() {
|
||||
vec4 pos = verts[gl_VertexID];
|
||||
vpos = view * pos;
|
||||
gl_Position = proj * vec4(vpos.xyz / (1), 1);
|
||||
gl_PointSize = 5;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
#version 430
|
||||
|
||||
layout(std430, binding=1) buffer Positions {
|
||||
vec4 verts[];
|
||||
};
|
||||
|
||||
layout(std140, binding=1) uniform Matrices {
|
||||
mat4 proj;
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
out gl_PerVertex {
|
||||
vec4 gl_Position;
|
||||
float gl_PointSize;
|
||||
};
|
||||
|
||||
out vec4 vpos;
|
||||
|
||||
void main() {
|
||||
vec4 pos = verts[gl_VertexID];
|
||||
vpos = view * pos;
|
||||
gl_Position = proj * vec4(vpos.xyz / (1 - vpos.w), 1);
|
||||
gl_PointSize = 5;
|
||||
}
|
||||
@@ -12,6 +12,11 @@ layout(std140, binding=1) uniform Matrices {
|
||||
mat4 view;
|
||||
};
|
||||
|
||||
layout(std140, binding=2) uniform ModelMatrices {
|
||||
mat4 linear;
|
||||
vec4 translation;
|
||||
};
|
||||
|
||||
in ivec4 vInds[];
|
||||
in vec4 vCol[];
|
||||
|
||||
@@ -36,7 +41,8 @@ void emit(vec4 v) {
|
||||
|
||||
void main() {
|
||||
vec4 pos4[4];
|
||||
for (int i = 0; i < 4; ++i) pos4[i] = view * verts[vInds[0][i]];
|
||||
for (int i = 0; i < 4; ++i)
|
||||
pos4[i] = view * (linear * verts[vInds[0][i]] + translation);
|
||||
|
||||
int lo[4], L = 0;
|
||||
int hi[4], H = 0;
|
||||
|
||||
Reference in New Issue
Block a user