Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BigDataViewer_Core_Extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BioinformaticDataCompression
BigDataViewer_Core_Extension
Commits
16366aae
Commit
16366aae
authored
9 years ago
by
Michael Heyde
Browse files
Options
Downloads
Patches
Plain Diff
fixed refinement bug
parent
d9ae5e46
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/bdv/jogl/VolumeRenderer/ShaderPrograms/ShaderSources/functions/volumeninterpreter/IsoSurfaceVolumeInterpreter.java
+17
-14
17 additions, 14 deletions
...tions/volumeninterpreter/IsoSurfaceVolumeInterpreter.java
with
17 additions
and
14 deletions
src/main/java/bdv/jogl/VolumeRenderer/ShaderPrograms/ShaderSources/functions/volumeninterpreter/IsoSurfaceVolumeInterpreter.java
+
17
−
14
View file @
16366aae
...
...
@@ -36,23 +36,28 @@ public class IsoSurfaceVolumeInterpreter extends AbstractVolumeInterpreter {
" return xNew;"
,
"}"
,
""
,
"vec4[2] refineIntersection(float fNear, float fFar, vec3 xNear, vec3 xFar, float isoValue
/*, sampler3D volume, vec3 texOffset, vec3 texfactor*/
){"
,
"vec4[2] refineIntersection(float fNear, float fFar, vec3 xNear, vec3 xFar, float isoValue){"
,
" vec4[2] refined;"
,
"
float formerDistance = "
+
Float
.
MAX_VALUE
+
";//min(distance(isoValue,fNear),distance(
isoValue
,fFar)
);"
,
"
bool nearInlowerIso = (fNear <
isoValue);"
,
" for(int i =0; i < refSteps; i++){"
,
" vec3 xNew = bisection(fNear,fFar,xNear,xFar,isoValue);
"
,
" vec3 xNew = bisection(fNear,fFar,xNear,xFar,isoValue);"
,
" float fNew = getValue(xNew);"
,
" float currentDistance = distance(isoValue,fNew);"
,
" if(currentDistance > formerDistance){"
,
" break;"
,
" }"
,
" formerDistance = currentDistance;"
,
" if(fNew > isoValue ){"
,
" xNear = xNew;"
,
" fNear = fNew;"
,
" if(nearInlowerIso){"
,
" xFar = xNew;"
,
" fFar = fNew;"
,
" }else{"
,
" xNear = xNew;"
,
" fNear = fNew;"
,
" }"
,
" }else{"
,
" xFar = xNew;"
,
" fFar = fNew;"
,
" if(nearInlowerIso){"
,
" xNear = xNew;"
,
" fNear = fNew;"
,
" }else{"
,
" xFar = xNew;"
,
" fFar = fNew;"
,
" }"
,
" }"
,
" }"
,
" refined[0].xyz = xNear;"
,
...
...
@@ -89,8 +94,6 @@ public class IsoSurfaceVolumeInterpreter extends AbstractVolumeInterpreter {
" vec4 xFar = vec4("
+
sgvRayPositions
+
".xyz,1.0);"
,
""
,
" vec4 refined[2]= refineIntersection(vm1,v,xNear.xyz,xFar.xyz,"
+
sgvNormIsoValue
+
");"
,
//" refined[0] = vec4(c_in.rgb,vm1);",
//" refined[1] = vec4(c.rgb,v);",
""
,
" if(refined[0].a < 0.0){"
,
" color.a=-1.0;"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment