Mercurial > repos > blastem
annotate shaders/crt.v.glsl @ 1971:80920c21bb52
Add an event log soft flush and call it twice per frame in between hard flushes to netplay latency when there are insufficient hardware updates to flush packets in the middle of a frame
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 08 May 2020 11:40:30 -0700 |
parents | 4942da159194 |
children | f3cca4b3f17a |
rev | line source |
---|---|
1392
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #version 110 |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 attribute vec2 pos; |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 varying vec2 texcoord; |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 varying vec2 screencoord; |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 uniform float width, height; |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 void main() |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 { |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 gl_Position = vec4(pos, 0.0, 1.0); |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 texcoord = sign(pos) * vec2(width/1024.0, height/-1024.0) + vec2(width/1024.0, height/1024.0); |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 screencoord = sign(pos); |
4942da159194
Added a "subtle" CRT shader contributed by Anael Seghezzi
Michael Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 } |