Revision ca4521e3
Added by Leszek Koltunski almost 6 years ago
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
28 | 28 |
out vec3 v_Normal; // |
29 | 29 |
out vec2 v_TexCoordinate; // |
30 | 30 |
|
31 |
#ifdef OIT |
|
32 |
out vec2 v_Pixel; // 2D pixel coords in window space |
|
33 |
uniform uvec2 u_Size; // size of the output surface, in pixels. |
|
34 |
#endif |
|
35 |
|
|
36 | 31 |
uniform vec3 u_objD; // half of object width x half of object height X half the depth; |
37 | 32 |
// point (0,0,0) is the center of the object |
38 | 33 |
|
... | ... | |
161 | 156 |
#endif |
162 | 157 |
|
163 | 158 |
v_Position = v; |
164 |
|
|
165 |
#ifdef OIT |
|
166 |
v_Pixel = (a_Position.xy + 0.5) * vec2(u_Size); |
|
167 |
#endif |
|
168 |
|
|
169 | 159 |
v_endPosition = v + (0.3*u_objD.x)*n; |
170 | 160 |
v_TexCoordinate = a_TexCoordinate; |
171 | 161 |
v_Normal = normalize(vec3(u_MVMatrix*vec4(n,0.0))); |
Also available in: Unified diff
Simplify Main OIT shader.