shaders/scanlines-basic.frag
author František Kučera <franta-hg@frantovo.cz>
Fri, 12 Jan 2024 00:45:40 +0100
branchv_0
changeset 40 df1376ef9f6d
parent 28 4cbd9c0beb4c
permissions -rw-r--r--
reload document: aspect ration or page count may change

#version 330 core

uniform  sampler2D  uTexture;
uniform  float      uTextureScale;
in       vec2       vTextureXY;
out      vec4       fColor;

void main() {
	fColor = texture(uTexture, vTextureXY).rgba;

	float lineCount = textureSize(uTexture, 0).y / uTextureScale;
	fColor.xyz *= abs(sin(radians(vTextureXY.y * 180. * lineCount)));
}