Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fsleyes
fsleyes
Commits
9e11c7c5
Commit
9e11c7c5
authored
Oct 06, 2021
by
Paul McCarthy
🚵
Browse files
RF: Need to adjust voxValue by texZero so comparison works e.g. when neg cmap
is activate
parent
96589195
Changes
2
Hide whitespace changes
Inline
Side-by-side
fsleyes/assets/gl/gl14/glvolume_3d_frag.prog
View file @
9e11c7c5
...
...
@@ -281,9 +281,11 @@ MAD tempColour, tempVar.x, colour, finalColour;
# tempVar.x, such that it is == 0 if we should
# take the depth value from this sample, < 0
# otherwise.
SLT tempVar.x, skipTest.x, 0; # set if should skip
SLT tempVar.y, depth.w, 0; # set if already have depth
SLT tempVar.z, voxValue.x, 0.1; # set if below threshold
SLT tempVar.x, skipTest.x, 0; # set x if should skip
SLT tempVar.y, depth.w, 0; # set y if already have depth
SUB tempVar.z, voxValue.x, {{ param_negCmap }}.y; # set z if below threshold
SLT tempVar.z, voxValue.x, 0.1;
ADD tempVar.z, tempVar.z, {{ param_screenSize }}.z; # and blending by intensity
SGE tempVar.z, tempVar.z, 2;
ADD tempVar.x, tempVar.x, tempVar.y;
...
...
fsleyes/assets/gl/gl21/glvolume_3d_frag.glsl
View file @
9e11c7c5
...
...
@@ -414,7 +414,7 @@ void main(void) {
* current display range). The 0.1 threshold is
* completely arbitrary, but seems to work well.
*/
if
(
depth
==
0
&&
voxValue
>=
0
.
1
)
{
if
(
depth
==
0
&&
(
voxValue
-
texZero
)
>=
0
.
1
)
{
depth
=
(
tex2ScreenXform
*
vec4
(
texCoord
,
1
.
0
)).
z
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment