This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/draw/engines/eevee/shaders/volumetric_vert.glsl
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00

32 lines
629 B
GLSL

out vec4 vPos;
void main()
{
/* Generate Triangle : less memory fetches from a VBO */
int v_id = gl_VertexID % 3; /* Vertex Id */
int t_id = gl_VertexID / 3; /* Triangle Id */
/* Crappy diagram
* ex 1
* | \
* | \
* 1 | \
* | \
* | \
* 0 | \
* | \
* | \
* -1 0 --------------- 2
* -1 0 1 ex
*/
vPos.x = float(v_id / 2) * 4.0 - 1.0; /* int divisor round down */
vPos.y = float(v_id % 2) * 4.0 - 1.0;
vPos.z = float(t_id);
vPos.w = 1.0;
#ifdef USE_ATTR
pass_attr(vec3(0.0));
#endif
}