view shaders/default.f.glsl @ 1742:6290c88949bd

Fixed CPI/CPD/CPIR/CPDR in new Z80 core
author Michael Pavone <pavone@retrodev.com>
date Mon, 04 Feb 2019 23:46:35 -0800
parents fa9ae059e4d3
children f3cca4b3f17a
line wrap: on
line source


uniform sampler2D textures[2];

varying mediump vec2 texcoord;

void main()
{
	mediump vec2 modifiedCoord0 = vec2(texcoord.x, (floor(texcoord.y * 512.0 + 0.25) + 0.5)/512.0);
	mediump vec2 modifiedCoord1 = vec2(texcoord.x, (floor(texcoord.y * 512.0 - 0.25) + 0.5)/512.0);
	gl_FragColor = mix(
		texture2D(textures[1], modifiedCoord1),
		texture2D(textures[0], modifiedCoord0),
		(sin(texcoord.y * 1024.0 * 3.14159265359) + 1.0) * 0.5
	);
}