blob: 5addf41c917d5e40b7255bfb2e6fac55c30f2101 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#version 120
#define saturate(x) clamp(x,0.0,1.0)
#define lerp mix
varying vec2 texCoord0;
varying vec2 texCoord1;
varying vec2 texCoord2;
varying vec2 texCoord3;
#line 9
uniform vec2 halfPixel;
void main(){
gl_Position = gl_Vertex;
vec2 texCoord = gl_Vertex.xy * 0.5 + 0.5;
texCoord0 = texCoord + halfPixel * vec2( 1, 1);
texCoord1 = texCoord + halfPixel * vec2(-1, 1);
texCoord2 = texCoord + halfPixel * vec2(-1, -1);
texCoord3 = texCoord + halfPixel * vec2( 1, -1);
}
|