Revision ad33f883
Added by Leszek Koltunski almost 8 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
25 | 25 |
varying vec3 v_Normal; // Interpolated normal for this fragment. |
26 | 26 |
varying vec2 v_TexCoordinate; // Interpolated texture coordinate per fragment. |
27 | 27 |
|
28 |
uniform int fNumEffects; // total number of fragment effects |
|
29 |
|
|
30 | 28 |
#if NUM_FRAGMENT>0 |
29 |
uniform int fNumEffects; // total number of fragment effects |
|
31 | 30 |
uniform int fType[NUM_FRAGMENT]; // their types. |
32 | 31 |
uniform vec4 fUniforms[2*NUM_FRAGMENT]; // i-th effect is 2 consecutive vec4's: [2*i], [2*i+1]. First vec4 is the Interpolated values, |
33 | 32 |
// next describes the Region, i.e. area over which the effect is active. |
34 | 33 |
|
34 |
#if defined(SATURATION) || defined(SMOOTH_SATURATION) |
|
35 | 35 |
const vec3 LUMI = vec3( 0.2125, 0.7154, 0.0721 ); |
36 |
#endif |
|
36 | 37 |
|
37 | 38 |
////////////////////////////////////////////////////////////////////////////////////////////// |
38 | 39 |
// CHROMA EFFECT |
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
38 | 38 |
varying vec3 v_Normal; // |
39 | 39 |
varying vec2 v_TexCoordinate; // |
40 | 40 |
|
41 |
uniform int vNumEffects; // total number of vertex effects |
|
42 |
|
|
43 | 41 |
#if NUM_VERTEX>0 |
42 |
uniform int vNumEffects; // total number of vertex effects |
|
44 | 43 |
uniform int vType[NUM_VERTEX]; // their types. |
45 | 44 |
uniform vec4 vUniforms[3*NUM_VERTEX];// i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2]. |
46 | 45 |
// The first vec4 is the Interpolated values, |
src/main/res/raw/test_vertex_shader.glsl | ||
---|---|---|
22 | 22 |
uniform vec2 u_objD; // object width X object height. |
23 | 23 |
// point (0,0) is the center of the object |
24 | 24 |
uniform mat4 u_MVPMatrix; // the combined model/view/projection matrix. |
25 |
|
|
26 | 25 |
attribute vec2 a_Position; // Per-vertex position information we will pass in. |
27 | 26 |
|
28 | 27 |
////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Minor