jak-project/game/graphics/opengl_renderer/shaders/direct_basic.vert
water111 2342b6fb0f
[graphics] MERC (#1124)
* merc dma generation

* wip very early version of merc

* small fixes

* fix

* fix more merc bugs

* derp fixed min

* oops we did need something weird on max

* merc for everything

* program optimization 1

* more optimization

* windows

* windows 2

* clean up

* fix test

* BLERC
2022-02-03 22:45:41 -05:00

17 lines
553 B
GLSL

// Shader for the DirectRenderer. Inputs are RGBA + position.
#version 430 core
layout (location = 0) in vec3 position_in;
layout (location = 1) in vec4 rgba_in;
out vec4 fragment_color;
void main() {
// Note: position.y is multiplied by 32 instead of 16 to undo the half-height for interlacing stuff.
gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0);
// scissoring area adjust
gl_Position.y *= 512.0/448.0;
fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w * 2.);
}