mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
8ba010ca97
* [WIP] initial sprite distort implementation * Clean up * More clean up + document sprite distort VU program * Format code * Address CI issues * Adjust hacks in distort fragment shader * oops * Optimize sprite distort rendering down to one draw call ~2x speed up * Format file * Clean up distort rendering and add separate profile scopes * Fix glVertexAttribPointer * Fix sprite distort getting messed up when the viewable area doesn't fit the window perfectly * Add debug option to disable sprite distort * One evil space to fail CI... * oops * Increase sprite-aux-list size when PC_BIG_MEMORY is true * Address lints
22 lines
428 B
GLSL
22 lines
428 B
GLSL
#version 430 core
|
|
|
|
out vec4 out_color;
|
|
|
|
uniform sampler2D framebuffer_tex;
|
|
|
|
in flat vec4 fragment_color;
|
|
in vec2 tex_coord;
|
|
|
|
void main() {
|
|
vec4 color = fragment_color;
|
|
|
|
// correct color
|
|
color *= 2;
|
|
|
|
// correct texture coordinates
|
|
vec2 texture_coords = vec2(tex_coord.x, (1.0f - tex_coord.y) - (1 - (448.0/512.0)) / 2);
|
|
|
|
// sample framebuffer texture
|
|
out_color = color * texture(framebuffer_tex, texture_coords);
|
|
}
|