-
Notifications
You must be signed in to change notification settings - Fork 0
/
SlidingBars.vert.txt
35 lines (30 loc) · 1.01 KB
/
SlidingBars.vert.txt
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
27
28
29
30
31
32
33
34
35
/* SlidingBars.vert.txt */
/* Attributes passed from Screen(): See the ProceduralShadingAPI.m file for infos: */
attribute vec4 auxParameters0;
attribute vec4 auxParameters1;
attribute vec4 modulateColor;
varying float BarColor;
varying float BackColor;
varying vec4 Grey;
varying float Width;
varying float Length;
varying float Orientation;
varying float centerX;
varying float centerY;
void main()
{
/* Apply standard geometric transformations to patch: */
gl_Position = ftransform();
/* gl_TexCoord[0] = gl_MultiTexCoord0; */
gl_TexCoord[0] = (gl_TextureMatrix[0] * gl_MultiTexCoord0) + vec4(-0.5, 0.5, 0.0, 0.0);
/* Pass first and second color to fragment shader: */
Grey = modulateColor;
BarColor = auxParameters0[0];
BackColor = auxParameters0[1];
/* Pass variables to the fragment shader for control of grating: */
Width = auxParameters0[2];
Length = auxParameters0[3];
centerX = auxParameters1[0];
centerY = auxParameters1[1];
Orientation = auxParameters1[2];
}