Duplicate shader window

88 views
Skip to first unread message

bruno...@neuro.fchampalimaud.org

unread,
May 9, 2021, 9:57:16 AM5/9/21
to Bonsai Users
Hi everyone,

I am looking for a way to duplicate a shader window. I want to be able to see a small online window of what i am displaying on a second monitor. Additionally, is there an easy way to grab the shader content and convert it to a IPIimage that I can use to videoWrite with?
I thought about using screenCapture to solve both probes but I wonder if there is another way that doesnt depend on the ROI the shader occupies.

Thanks,
Bruno

Gonçalo Lopes

unread,
May 16, 2021, 2:02:50 PM5/16/21
to bruno...@neuro.fchampalimaud.org, Bonsai Users
Hi Bruno,

There is a way to grab the content of the shader window using the ReadPixels node.

Be aware that this might impact your render pipeline depending on complexity, hardware, etc. Also you need to make sure all the drawing commands have been flushed to the viewport using DrawViewport. For example:

image.png

The output of ReadPixels is already an image which you can manipulate and save.

Hope this helps!

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/a5184c11-8eb4-4aea-9c7a-a043fa794620n%40googlegroups.com.

bruno...@neuro.fchampalimaud.org

unread,
May 17, 2021, 4:09:17 AM5/17/21
to Bonsai Users
Exactly what I was looking for, thanks!
Reply all
Reply to author
Forward
0 new messages