Mercurial > repos > blastem
comparison shaders/crt.v.glsl @ 1977:f3cca4b3f17a
Allow use of NPOT textures as a config option. Useful for some mobile GPUs
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 09 May 2020 21:15:33 -0700 |
parents | 4942da159194 |
children |
comparison
equal
deleted
inserted
replaced
1976:3dd9c68472fb | 1977:f3cca4b3f17a |
---|---|
1 #version 110 | |
2 | 1 |
3 attribute vec2 pos; | 2 attribute vec2 pos; |
4 varying vec2 texcoord; | 3 varying mediump vec2 texcoord; |
5 varying vec2 screencoord; | 4 varying mediump vec2 screencoord; |
6 uniform float width, height; | 5 uniform mediump float width, height; |
6 uniform mediump vec2 texsize; | |
7 | 7 |
8 void main() | 8 void main() |
9 { | 9 { |
10 gl_Position = vec4(pos, 0.0, 1.0); | 10 gl_Position = vec4(pos, 0.0, 1.0); |
11 texcoord = sign(pos) * vec2(width/1024.0, height/-1024.0) + vec2(width/1024.0, height/1024.0); | 11 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); |
12 screencoord = sign(pos); | 12 screencoord = sign(pos); |
13 } | 13 } |