blob: 1bdc6eaf4889da179b04423b0c7de3215a7b91a6 (
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
27
28
29
30
31
|
/**
* Renders volume objects with no surfaces.
*
* The vertex shader outputs geometry at nearest depth.
**/
#pragma BLENDER_REQUIRE(common_view_lib.glsl)
#pragma BLENDER_REQUIRE(common_math_lib.glsl)
void main(void)
{
/* TODO(fclem) Make the quad cover only the bounding box. */
// int v = gl_VertexID % 4;
// float x = -1.0 + float((v & 1) << 2);
// float y = -1.0 + float((v & 2) << 1);
// gl_Position = vec4(x, y, 1.0, 1.0);
// vec3 aabb_min,;
// uvcoordsvar = vec4((gl_Position.xy + 1.0) * 0.5, 0.0, 0.0);
// interp.P_start = point_ndc_to_world(pos);
// interp.P_end = point_ndc_to_world(pos);
interp.P_start = point_object_to_world(pos);
interp.P_end = interp.P_start;
gl_Position = point_world_to_ndc(interp.P_start);
}
|