Commit 451a91b3 authored by Jan Möbius's avatar Jan Möbius
Browse files

Merge branch 'PrincipalAxisRendering' into 'master'

Principal axis rendering

- use instancing when hardware support available
- added 3d arrow mode with instancing
- optimize vertex format of 2d line mode (non instanced branch),  see issue #71

See merge request !141
parents b57a909c a22d3a03
......@@ -13,12 +13,13 @@ uniform float pa_cone_radius;
uniform vec3 pa_scale;
uniform vec3 pa_offset;
uniform int pa_visible_tensors;
void main()
{
SG_VERTEX_BEGIN;
int pa_component = gl_InstanceID % 3;
int pa_component = gl_InstanceID % pa_visible_tensors;
vec4 pa_posOS = SG_INPUT_POSOS;
......
......@@ -16,12 +16,13 @@ uniform vec2 pa_screenSize;
uniform vec3 pa_scale;
uniform vec3 pa_offset;
uniform int pa_visible_tensors;
void main()
{
SG_VERTEX_BEGIN;
int pa_component = gl_InstanceID % 3;
int pa_component = gl_InstanceID % pa_visible_tensors;
// positions of the line end-points
vec4 pa_posOS[2];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment