Mercurial > repos > blastem
annotate shaders/default.v.glsl @ 501:e1355aa80f4d
Use OpenGL by default. Add OpenGL switch to help text
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 29 Oct 2013 19:11:45 -0700 |
parents | 251fe7a75a14 |
children | b7b7a1cab44a |
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; |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 void main() |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 { |
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 gl_Position = vec4(pos, 0.0, 1.0); |
500
251fe7a75a14
Preserve aspect ratio unless config file says otherwise
Mike Pavone <pavone@retrodev.com>
parents:
497
diff
changeset
|
9 texcoord = sign(pos) * vec2(320.0/1024.0, 240.0/-512.0) + vec2(320.0/1024.0, 240.0/512.0); |
488
32f053ad9b02
Basic OpenGL rendering is working
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 } |