mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 22:35:07 -04:00
bb323c2ebe
* Initial depth-cue implementation * Oops * Finish merge + fix issues with letterboxing * Fix alpha blending * Add some debug options + profiler stats * More debug options + respect xyoffset GS register * Clean up GOAL code * Disable depth-cue by default * typo * very important typo * depth-cue disable, but better
28 lines
556 B
GLSL
28 lines
556 B
GLSL
#version 430 core
|
|
|
|
layout (location = 0) in vec2 xy;
|
|
layout (location = 1) in vec2 st;
|
|
|
|
uniform vec4 u_color;
|
|
uniform float u_depth;
|
|
|
|
out flat vec4 fragment_color;
|
|
out vec2 tex_coord;
|
|
|
|
void main() {
|
|
// Calculate color
|
|
vec4 color = u_color;
|
|
color *= 2; // correct
|
|
|
|
fragment_color = color;
|
|
|
|
// Pass on texture coord
|
|
tex_coord = st;
|
|
|
|
// Calculate vertex position
|
|
vec4 position = vec4(xy.x, xy.y, u_depth, 1.0);
|
|
position.xyz = (position.xyz * 2) - 1.0; // convert from [0,1] to clip-space
|
|
|
|
gl_Position = position;
|
|
}
|