Skip to content

Commit

Permalink
Merge pull request #9 from JuliaPlots/sd-buffers
Browse files Browse the repository at this point in the history
make updates via observables work
  • Loading branch information
SimonDanisch authored Jul 15, 2019
2 parents 83c2d98 + 761d213 commit d4c1ab5
Show file tree
Hide file tree
Showing 22 changed files with 386 additions and 1,194 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/Manifest.toml
/docs/build/
/docs/site/
/debug/
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb"
JSCall = "7408c33d-3899-58ec-b6f6-b7e67cfb9908"
JSExpr = "97c1335a-c9c5-57fe-bc5d-ec35cebe8660"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
WebIO = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"
Expand Down
5 changes: 3 additions & 2 deletions assets/volume.frag
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ in vec3 frag_uv;
uniform sampler3D volumedata;
uniform sampler2D colormap;
uniform vec2 colorrange;
uniform vec3 eyeposition;
uniform mat4 modelMatrix, modelinv;
*/

const float max_distance = 1.3;
const int num_samples = 150;
const float step_size = max_distance / float(num_samples);

uniform vec3 cameraPosition;

float range01(float val, float from, float to)
{
return clamp((val-from) / (to - from), 0.0, 1.0);
Expand Down Expand Up @@ -102,7 +103,7 @@ vec4 contours(vec3 front, vec3 dir, float stepsize)

void main()
{
vec3 dir = normalize(frag_vert - eyeposition);
vec3 dir = normalize(frag_vert - cameraPosition);
dir = vec3(modelinv * vec4(dir, 0.0));
vec4 color = contours(frag_uv, dir, step_size);
if(color.a <= 0.0)
Expand Down
18 changes: 0 additions & 18 deletions debug/linesegments.frag

This file was deleted.

75 changes: 0 additions & 75 deletions debug/linesegments.vert

This file was deleted.

67 changes: 0 additions & 67 deletions debug/mesh.frag

This file was deleted.

58 changes: 0 additions & 58 deletions debug/mesh.vert

This file was deleted.

131 changes: 0 additions & 131 deletions debug/scatter.frag

This file was deleted.

Loading

0 comments on commit d4c1ab5

Please sign in to comment.