From 732f89f1b857b8091042eaae5d147732bb675777 Mon Sep 17 00:00:00 2001 From: Mason Stallmo Date: Mon, 13 Nov 2017 22:40:04 -0600 Subject: [PATCH] Instance 100,000 cubes --- .idea/workspace.xml | 318 +++++++++++++++++++++++++++++++++++++------- shaders/vert.shader | 12 +- 2 files changed, 279 insertions(+), 51 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 9018399..29d5af9 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,6 @@ - @@ -307,10 +328,12 @@ - - - - + + + + + + @@ -329,10 +352,12 @@ - - - - + + + + + + @@ -351,10 +376,12 @@ - - - - + + + + + + @@ -373,10 +400,12 @@ - - - - + + + + + + @@ -387,10 +416,12 @@ - - - - + + + + + + @@ -409,10 +440,12 @@ - - - - + + + + + + @@ -431,10 +464,12 @@ - - - - + + + + + + @@ -457,22 +492,215 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - + + + + + + diff --git a/shaders/vert.shader b/shaders/vert.shader index 8a11a05..bd20154 100644 --- a/shaders/vert.shader +++ b/shaders/vert.shader @@ -17,13 +17,13 @@ mat4 buildTranslate(float x, float y, float z); void main(void) { float i = gl_InstanceID + tf; - //float a = sin(203.0 * i/4000.0) * 403.0; - //float b = cos(301.0 * i/2001.0) * 401.0; - //float c = sin(400.0 * i/3003.0) * 405.0; + float a = sin(203.0 * i/4000.0) * 403.0; + float b = cos(301.0 * i/2001.0) * 401.0; + float c = sin(400.0 * i/3003.0) * 405.0; - float a = sin(2.0 * i) * 8.0; - float b = cos(3.0 * i) * 8.0; - float c = sin(4.0 * i) * 8.0; + //float a = sin(2.0 * i) * 8.0; + //float b = cos(3.0 * i) * 8.0; + //float c = sin(4.0 * i) * 8.0; mat4 localRotX = buildRotateX(1000*i); mat4 localRotY = buildRotateY(1000*i);