Skip to content

Commit

Permalink
Merge pull request #131 from chrishavlin/fix_slice_rendering
Browse files Browse the repository at this point in the history
BUG: Fix slice rendering
  • Loading branch information
chrishavlin authored Jun 27, 2024
2 parents 1ed6b51 + da6477f commit 9bc6d06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion yt_idv/shaders/slice_sample.frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
7 changes: 6 additions & 1 deletion yt_idv/tests/test_yt_idv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9bc6d06

Please sign in to comment.