diff --git a/data/shaders/mlaa_offset.vert b/data/shaders/mlaa_offset.vert index 22f24c523..111ca2a55 100644 --- a/data/shaders/mlaa_offset.vert +++ b/data/shaders/mlaa_offset.vert @@ -1,4 +1,12 @@ -uniform vec2 PIXEL_SIZE; +layout (std140) uniform MatrixesData +{ + mat4 ViewMatrix; + mat4 ProjectionMatrix; + mat4 InverseViewMatrix; + mat4 InverseProjectionMatrix; + mat4 ShadowViewProjMatrixes[4]; + vec2 screen; +}; in vec2 Position; in vec2 Texcoord; @@ -12,6 +20,6 @@ void main() { // invy.y = 1.0 - invy.y; uv = invy.st; - offset[0] = invy.xyxy + PIXEL_SIZE.xyxy * vec4(-1.0, 0.0, 0.0, 1.0); - offset[1] = invy.xyxy + PIXEL_SIZE.xyxy * vec4( 1.0, 0.0, 0.0, -1.0); + offset[0] = invy.xyxy + screen.xyxy * vec4(-1.0, 0.0, 0.0, 1.0); + offset[1] = invy.xyxy + screen.xyxy * vec4( 1.0, 0.0, 0.0, -1.0); }