diff --git a/yt_idv/shaders/slice_sample.frag.glsl b/yt_idv/shaders/slice_sample.frag.glsl index 84bbbb1b..99d25681 100644 --- a/yt_idv/shaders/slice_sample.frag.glsl +++ b/yt_idv/shaders/slice_sample.frag.glsl @@ -62,5 +62,5 @@ void main() float map_sample = texture(bitmap_tex, tex_curr_pos).r; if (!(map_sample > 0.0)) discard; - output_color = texture(ds_tex, tex_curr_pos); + output_color = texture(ds_tex[0], tex_curr_pos); } diff --git a/yt_idv/tests/test_yt_idv.py b/yt_idv/tests/test_yt_idv.py index ae53e016..54085cce 100644 --- a/yt_idv/tests/test_yt_idv.py +++ b/yt_idv/tests/test_yt_idv.py @@ -68,7 +68,12 @@ def test_snapshots(osmesa_fake_amr, image_store): def test_slice(osmesa_fake_amr, image_store): osmesa_fake_amr.scene.components[0].render_method = "slice" - image_store(osmesa_fake_amr) + osmesa_fake_amr.scene.components[0].slice_position = (0.5, 0.5, 0.5) + for ax in [0, 1, 2]: + normal = [0.0, 0.0, 0.0] + normal[ax] = 1.0 + osmesa_fake_amr.scene.components[0].slice_normal = tuple(normal) + image_store(osmesa_fake_amr) osmesa_fake_amr.scene.components[0].slice_normal = (1.0, 1.0, 0.0) osmesa_fake_amr.scene.components[0].slice_position = (0.5, 0.25, 0.5) image_store(osmesa_fake_amr)