@vitessce/spatial-accelerated 3.8.9 → 3.8.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  * - Brick-based caching system for large datasets
7
7
  * - Multi-channel rendering with independent color/opacity
8
8
  * - Adaptive sampling based on distance and resolution
9
- * - Support for different rendering styles (MIP, MinIP, standard)
9
+ * - Support for different rendering styles (MIP, MinIP, standard, DEBUG)
10
10
  *
11
11
  * ========================================
12
12
  * BRICK CACHE AND PAGE TABLE EXPLANATION
@@ -204,7 +204,7 @@ uniform usampler3D pageTableTex;
204
204
  // ========================================
205
205
  // RENDERING PARAMETERS/CONSTANTS
206
206
  // ========================================
207
- // Rendering style: 0=MIP, 1=MinIP, 2=standard volume rendering
207
+ // Rendering style: 0=MIP, 1=MinIP, 2=standard volume rendering, 3=DEBUG
208
208
  uniform int u_renderstyle;
209
209
  // Global opacity multiplier for volume rendering
210
210
  uniform float opacity;
@@ -1216,7 +1216,19 @@ void main(void) {
1216
1216
  // TODO: figure out how to hook it up with frontend
1217
1217
  int [] c_res_min = int[7](getRes(0).x, getRes(1).x, getRes(2).x, getRes(3).x, getRes(4).x, getRes(5).x, getRes(6).x);
1218
1218
  int [] c_res_max = int[7](getRes(0).y, getRes(1).y, getRes(2).y, getRes(3).y, getRes(4).y, getRes(5).y, getRes(6).y);
1219
-
1219
+ vec3 [] res_color = vec3[10](
1220
+ vec3(1.0, 0.0, 0.0),
1221
+ vec3(0.0, 0.0, 1.0),
1222
+ vec3(0.0, 1.0, 0.0),
1223
+ vec3(1.0, 0.0, 1.0),
1224
+ vec3(0.0, 1.0, 1.0),
1225
+ vec3(1.0, 1.0, 0.0),
1226
+ vec3(1.0, 0.5, 0.5),
1227
+ vec3(0.5, 0.5, 1.0),
1228
+ vec3(0.5, 1.0, 0.5),
1229
+ vec3(0.5, 0.5, 0.5)
1230
+ );
1231
+
1220
1232
  // ========================================
1221
1233
  // PER-CHANNEL STATE ARRAYS
1222
1234
  // ========================================
@@ -1745,7 +1757,13 @@ void main(void) {
1745
1757
  // Accumulate this channel's contribution.
1746
1758
  // sum up the values onto the slice values
1747
1759
  total += c_val_current[c];
1748
- rgbCombo += c_val_current[c] * c_color[c];
1760
+ if (u_renderstyle == 3) {
1761
+ rgbCombo += c_val_current[c] * res_color[targetRes];
1762
+ } else if (u_renderstyle == 4) {
1763
+ rgbCombo += c_val_current[c] * res_color[c_res_current[c]];
1764
+ } else {
1765
+ rgbCombo += c_val_current[c] * c_color[c];
1766
+ }
1749
1767
 
1750
1768
  }
1751
1769