view shaders/default.f.glsl @ 1366:c74a2f31ae5f

Fix regression in horizontal interrupt timing that was breaking the "water" palette swap in the Sonic series and other games
author Michael Pavone <pavone@retrodev.com>
date Mon, 22 May 2017 21:11:13 -0700
parents b1147418254a
children f9fbd0d16df2
line wrap: on
line source

#version 110

uniform sampler2D textures[2];

varying vec2 texcoord;

void main()
{
	gl_FragColor = mix(
		texture2D(textures[0], texcoord),
		texture2D(textures[1], vec2(texcoord.x, texcoord.y - 1.0/1024.0)),
		sin((texcoord.y * 1024.0 - 0.75) * 3.14159265359) / 2.0 + 0.5
	);
}