Mercurial > repos > blastem
annotate shaders/default.v.glsl @ 1402:458df351af06
Allow height to be specified in the config file and properly calculate from the aspect setting if it is not specified
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 15 Jun 2017 19:24:16 -0700 |
parents | b1147418254a |
children | fa9ae059e4d3 |
rev | line source |
---|---|
488
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #version 110 |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 attribute vec2 pos; |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 varying vec2 texcoord; |
1184
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
505
diff
changeset
|
5 uniform float width, height; |
488
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 void main() |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 { |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 gl_Position = vec4(pos, 0.0, 1.0); |
1184
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
505
diff
changeset
|
10 texcoord = sign(pos) * vec2(width/1024.0, height/-1024.0) + vec2(width/1024.0, height/1024.0); |
488
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 } |