Commit a22d3a03 authored by tenter's avatar tenter
Browse files

fix axis rendering bug

parent f8748ef0
...@@ -13,12 +13,13 @@ uniform float pa_cone_radius; ...@@ -13,12 +13,13 @@ uniform float pa_cone_radius;
uniform vec3 pa_scale; uniform vec3 pa_scale;
uniform vec3 pa_offset; uniform vec3 pa_offset;
uniform int pa_visible_tensors;
void main() void main()
{ {
SG_VERTEX_BEGIN; SG_VERTEX_BEGIN;
int pa_component = gl_InstanceID % 3; int pa_component = gl_InstanceID % pa_visible_tensors;
vec4 pa_posOS = SG_INPUT_POSOS; vec4 pa_posOS = SG_INPUT_POSOS;
......
...@@ -16,12 +16,13 @@ uniform vec2 pa_screenSize; ...@@ -16,12 +16,13 @@ uniform vec2 pa_screenSize;
uniform vec3 pa_scale; uniform vec3 pa_scale;
uniform vec3 pa_offset; uniform vec3 pa_offset;
uniform int pa_visible_tensors;
void main() void main()
{ {
SG_VERTEX_BEGIN; SG_VERTEX_BEGIN;
int pa_component = gl_InstanceID % 3; int pa_component = gl_InstanceID % pa_visible_tensors;
// positions of the line end-points // positions of the line end-points
vec4 pa_posOS[2]; 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