-
Hi all, I was looking at the Shader tutorial with Bonsai from the old google group: https://groups.google.com/g/bonsai-users/c/97lvnMhAoPM/m/GqHJ7mlzBAAJ . I tried to run the code example provided but it seems to be an older version and I got an error when attempting to update it. I wonder how merge the shader-created sinusoidal grating to normal Bonsai or Bonvision processes? As a side note, I need to create simulus from custom shaders because I want to crop one part of the grating to display other things (like a pop-out). When I overlay a small grating aperture onto another big one, the small one in the front would show its bounding box (a square). Does anyone have any idea of solving this issue with Bonvision? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
To draw sin gratings you can use the DrawGratings node. There are several posts in the repo that you might want to look at. |
Beta Was this translation helpful? Give feedback.
-
Hi Bruno, Thanks for the reply. I've though of using DrawGrating node but in previous version of Bonvision, overlaying a stimulus onto another would appear a black square bounding box. It seems like you've fixed this problem already. But I think it would be great to cover how shaders can be loaded in Bonsai in this thread. Bonsai has been updated very much since the "Shader tutorial" has appeared in the google group, especially the DrawMesh node. Could you briefly mention how to load shader files in "UpdateFrame" and use it in "DrawMesh"? Thank you! |
Beta Was this translation helpful? Give feedback.
Hi Bruno,
Thanks for the reply. I've though of using DrawGrating node but in previous version of Bonvision, overlaying a stimulus onto another would appear a black square bounding box. It seems like you've fixed this problem already. But I think it would be great to cover how shaders can be loaded in Bonsai in this thread. Bonsai has been updated very much since the "Shader tutorial" has appeared in the google group, especially the DrawMesh node. Could you briefly mention how to load shader files in "UpdateFrame" and use it in "DrawMesh"? Thank you!