comparison shaders/default.v.glsl @ 1983:a7b753e260a2 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sat, 09 May 2020 23:39:44 -0700
parents f3cca4b3f17a
children
comparison
equal deleted inserted replaced
1937:cafde1255ad3 1983:a7b753e260a2
1 1
2 attribute vec2 pos; 2 attribute vec2 pos;
3 varying mediump vec2 texcoord; 3 varying mediump vec2 texcoord;
4 uniform mediump float width, height; 4 uniform mediump float width, height;
5 uniform mediump vec2 texsize;
5 6
6 void main() 7 void main()
7 { 8 {
8 gl_Position = vec4(pos, 0.0, 1.0); 9 gl_Position = vec4(pos, 0.0, 1.0);
9 texcoord = sign(pos) * vec2(width / 1024.0, height / -1024.0) + vec2(width / 1024.0, height / 1024.0); 10 texcoord = sign(pos) * vec2(0.5 * width / texsize.x, -0.5 * height / texsize.y) + vec2(0.5 * width / texsize.x, 0.5 * height / texsize.y);
10 } 11 }