Skip to content

Commit 7cfb3f4

Browse files
wpchopsarahforcier
authored andcommitted
adding more charts
1 parent ffc2aec commit 7cfb3f4

8 files changed

Lines changed: 10 additions & 10 deletions

File tree

512 Bytes
Binary file not shown.
2.37 KB
Binary file not shown.
16 KB
Binary file not shown.
0 Bytes
Binary file not shown.

img/chart2.png

11.3 KB
Loading

img/table.png

6.74 KB
Loading

src/Blades.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <array>
55
#include "Model.h"
66

7-
constexpr static unsigned int NUM_BLADES = 1 << 13;
7+
constexpr static unsigned int NUM_BLADES = 1 << 19;
88
constexpr static float MIN_HEIGHT = 1.3f;
99
constexpr static float MAX_HEIGHT = 2.5f;
1010
constexpr static float MIN_WIDTH = 0.1f;

src/shaders/compute.comp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ void main() {
133133
// Orientation Culling
134134
mat4 inverseView = inverse(camera.view);
135135
vec4 dirc = inverseView * vec4(0.0,0.0,1.0,0.0);
136-
float oCull = abs(dot(dirc.xyz, atw.xyz));
136+
float oCull = abs(dot( normalize(vec3(dirc.x, 0.0, dirc.z)), atw.xyz));
137137
if (oCull < 0.85) {
138138
culled = true;
139-
}
140-
139+
}
140+
141141
// View Frustrum Culling
142142
vec3 m = .25 * v0.xyz + .5 * v1.xyz + .25 * v2.xyz;
143143
vec4 v0NDC = (camera.proj * camera.view * vec4(v0, 1.0));
@@ -147,14 +147,14 @@ void main() {
147147
mNDC/= mNDC.w;
148148
v2NDC/= v2NDC.w;
149149

150-
if (!inBounds(v0NDC.x, 1) && !inBounds(v0NDC.y, 1) && !inBounds(v0NDC.z, 1) &&
151-
!inBounds(v2NDC.x, 1) && !inBounds(v2NDC.y, 1) && !inBounds(v2NDC.z, 1) &&
152-
!inBounds(mNDC.x, 1) && !inBounds(mNDC.y, 1) && !inBounds(mNDC.z, 1) ) {
150+
if ( (!inBounds(v0NDC.x, 1) || !inBounds(v0NDC.y, 1) || !inBounds(v0NDC.z, 1) ) &&
151+
(!inBounds(v2NDC.x, 1) || !inBounds(v2NDC.y, 1) || !inBounds(v2NDC.z, 1) ) &&
152+
( !inBounds(mNDC.x, 1) || !inBounds(mNDC.y, 1) || !inBounds(mNDC.z, 1) ) ) {
153153
culled = true;
154-
}
155-
154+
}
155+
156156
// Distance test
157-
float distance = 20;
157+
float distance = 10;
158158
float bucket = 5;
159159
float dist = - (camera.view * vec4(v0, 1.0)).z;
160160

0 commit comments

Comments
 (0)