Commit d17badf3 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Combine alpha from all three channels, as this is required for channel

suppression
parent 794987a6
......@@ -184,12 +184,17 @@ MAD voxValue, voxValue, voxValXform.x, voxValXform.y;
ABS voxValue, voxValue;
# Cumulatively combine the rgb
# channels of those three colours
# channels of those three colours.
# Opacity is not modulated by
# vector values.
MOV fragColour, 0;
MAD fragColour, voxValue.x, xColour, fragColour;
MAD fragColour, voxValue.y, yColour, fragColour;
MAD fragColour, voxValue.z, zColour, fragColour;
MOV fragColour.w, xColour.w;
ADD fragColour.w, fragColour.w, yColour.w;
ADD fragColour.w, fragColour.w, zColour.w;
MUL fragColour.w, fragColour.w, 0.333333;
# Apply the bri/con scale and offset
MAD fragColour.rgb, fragColour, colourXform.x, colourXform.y;
......
......@@ -205,15 +205,17 @@ void main(void) {
voxValue += voxValXform[3].x;
voxValue = abs(voxValue);
/*
* Combine the xyz component colours.
* Opacity should be identical across
* the three colours.
/* Combine the xyz component colours,
* modulating them by the vector values.
* Opacity is not modulated by vector
* value.
*/
vec4 voxColour = voxValue.x * xColour +
voxValue.y * yColour +
voxValue.z * zColour;
voxColour.a = xColour.a;
voxColour.a = (xColour.a +
yColour.a +
zColour.a) / 3;
/*
* Apply the colour scale/offset -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment