feature: refactor movie shader mask to use a better circular mask design#8
Merged
Conversation
…od. Here's what I did: - Modified `movieStimulus.m` to use a direct texture shader for its `circularMask` property, aligning its approach with `imageStimulus`. - Removed the previous technique of drawing a second texture (`masktex`) on top of the movie. - Added a `sigma` property for controlling mask edge smoothness. - Introduced a `makeMaskShader` method to load and configure `circularMask.frag`. - Updated `setup`, `loadMovie`, `draw`, and `reset` methods to integrate the new shader-based masking and remove the old procedural disc mask. - The `circularMask.frag` shader is now used directly in the drawing pipeline for movies when `circularMask` is enabled.
iandol
added a commit
that referenced
this pull request
May 30, 2025
* tweak * add sync test option to UI * tweak * iRec GUI work * [wip] testing blur shaders * [wip] * tweak * [wip] multi-image and video selection tweaks * [mm, conversionFactor] = pupilConversion(value, cal, calSizel diameter tweaks) * [wip] image handling refactor * improve movie and image stimuli to use folders of items, selectable using selection variable * tweak movie recording * fix * WIP * improve screen recording * add polar checkerboard stimulus * tweak polar checkerboard * lots of polar checkerboard changes * [wip] add a 2D rigid body simulator via animationManager * [wip] animation mamager * [wip] animation manager * compress png * [wip] animation manager * [wip] animation manager and touch manager updates * tweak * tweak * small fixes to barStimulus * allow fixation time to accumulate when strict is false * update to latest Titta for Tobii * fix bug in spot stimulus when changing contrast in multiple trials * small tweaks to behavioural reverse correlation task and stimulus * improve movie recording * Small refactor of trial start / end for eyetrackers We use trackerTrialStart() and trackerTrialEnd() functions to wrap the message sending, makes state machine function lists a bit simpler * refactor some eyetracker code * tweak * tweak * more updates for new Titta functionality * [wip] ongoing tobii improvements * fix imageStimulus not clearing the image matrix, other refactoring * anim manager assets * tmp * anim msanager tweak * add dotlineStimulus * Add drawPupilCoreMarker to draw the pupil core calibration marker * small fixes * Update LabJack T strobes from 2^8 to 2^11 values Before, sendStrobe would use EIO0:7 for 0-255 values and 256+ would send TTLs on CIO. We can use FIO for TTLs so we just expand to use EIO0:7 and CIO0:3 we reserve CIO4 for a read bit if needed... * add pupil core marker as a calibration marker option * add stop property to pupilCoreStimulus * tweaks * fix tobii movie calibration * allow use of pupil core marker from ui * more eyetracking updates * dotline fixes * aloow use of images for calibration marker for tobii and iRec * more eyetracker tweaks * Tobii analysis work * more tobii anal fixes * Fix logging in behavioural record caused by stateinfo file Other small fixes and some GUI tweaks * tweak * allow image file names to be added to task log if images are randomised, we can add them to the task log as a backup just in case the filenames stored in the stimulus itself are not synced * [wip] tobiiAnalysis * wip analysis improvements * [wip] * [wip] eyetracker anal * [wip] tobii analysis * [wip] * add random position shift to dotline stimuli * [wip] nirSmartManager * [wip] * add NIRSmart Control to opticka UI * more robust saving of tobii validation data * improve vars parsing in tobiiAnalysis * fix some dataConnection server bugs * more nirSmart fixes * MOC fix for nirSmart * nirSmart tweaks * add isOff to eyetracker objects to check if the eyetracker was disabled completely * add a sample fNIRS protocol * more nirSmart integration * fNIRS.m tweak * fix * [wip] move animationManager to use a full 2D physics engine dyn4j This engine is great, with a nice API and fully featured and more or less as fast as my home made physics code (but able to scale to many more bodies)... * tweak * refactor * improve protocol loading; eyetracker refactoring * small fixes * tweak * [wip] * [wip] animationManager * [wip] * [wip] * [wip] * fix timing bug if stim is not visible for barStimulus the phase reverse time is defined by the me.tick counter, but this was running even when the stimulus was not visible, thus the timing was off for the first phase reversal. Fixed. * convert comment to string array * fix dummy mode for eyelink, update uix also more gui work for ALF file saving support * doc * delete +uix and fix EDF filenaming * tweak * wip * wip * improve animationManager * tweak * docs * [wip] add training protocols for saccade tasks * [wip] animationManager changes * change nanmean to mean(...,'omitnan') * [wip] get titta advanced calibration integrated * [wip] titta stuff * tweak * fix titta crash * video size * fixes for gui changes * add circularMask to movieStimulus and better shuffle of many videos turn off audio sync if movies freeze * Use multiple videos for iRec calibration/validation * fix antisaccade task, add delayTime as parameter * tweaks * [wip] add simia joystick manager * small fixes for eyelink manager * tobiiAnalysis fixes * more tobiiAnalysis fixes * New makeReport() method to make a PDf report for the main opticka class objects * [wip] better display of state table * tweaks * start alyxManager work * tweak paths * More alyxManager work * fixes * Alyx GUI in Opticka * tweaks * more alyx work * [wip] * [wip] integrate AWS * tweak * add HED tag enumeration class * fix dummy strobe log values * refactor logging * [wip] * refactor timeLogger to log messages with a duration (start+end time) * tweak * tweak * tweak * tweak * tweak * several fixes * improve animation manager * anim tweaks * refactor animation and stimulus handling for improved clarity and efficiency * feat: enhance nirSmartManager and animationManager improved property handling and new methods for better functionality * fix arduinoManager default reward types * Update labJackT.m tweak * Update labJackT.m typo * fix: fix empty x crash * tweak * [wip] ZMQ * wip * wip * wip * feat: 🎨 add ZMQ context and socket management functions * refactor: 🚑️ Improve ZMQ command handling and documentation * wip * wip * docs: ✍️ Enhance documentation for Context and Socket classes * refactor: 🚑️ Enhance error handling and cleanup in Context and Socket classes * wip * feat: ⚡ add zeromq poll function * feat: ✨ Implement context creation and cleanup improvements in Context and zmqConnection classes * wip * tweak * feat: ✨ Enhance touch event handling and improve verbose logging in touchManager * wip * feat: ✨ Add circular mask shader for soft-edged image masking in imageStimulus * refactor: 🔥 Remove deprecated ØMQ functions and classes, switching to jzmq * refactor: Remove deprecated ØMQ functions and classes, switching to jzmq * behaviouraRecord fix * jzmq update * [wip] jzmq * refactor: Update event handling in touchManager and improve error reporting in jzmqConnection * I've refactored the `movieStimulus` circularMask to use a shader method. Here's what I did: (#8) - Modified `movieStimulus.m` to use a direct texture shader for its `circularMask` property, aligning its approach with `imageStimulus`. - Removed the previous technique of drawing a second texture (`masktex`) on top of the movie. - Added a `sigma` property for controlling mask edge smoothness. - Introduced a `makeMaskShader` method to load and configure `circularMask.frag`. - Updated `setup`, `loadMovie`, `draw`, and `reset` methods to integrate the new shader-based masking and remove the old procedural disc mask. - The `circularMask.frag` shader is now used directly in the drawing pipeline for movies when `circularMask` is enabled. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * feat: Add HTTP proxy support in jzmqConnection for sending messages * refactor: Clean up argument formatting and improve method documentation in jzmqConnection * wip * feat: Enhance sendViaProxy method to accept custom proxy URL and improve error handling * feat: 🎨 On linux we can enable/disable touch devices, if a named device is passed touchManager will try to enable it otherwise PTB cannot find it. * feat: Enhance addOptickaToPath function to add specific folders to MATLAB path and improve path management * feat: enhance checkTouchWindows to optionally use existing event, add isTouch method to touchManager * refactor: checkwin reporting * refactor: extract xinput handling into separate checkXInput method for better readability and maintainability * fix: handle potential empty dataOut in jzmqConnection open method * refactor: replace checkXInput method with static xinput method for enabling touch interfaces * refactor: enhance grid layout properties in baseStimulus for improved UI spacing * docs: changelog --------- Co-authored-by: iandol <iandol@cog5.org> Co-authored-by: iandol <iandol@seneca.org> Co-authored-by: iandol <iandol@cog10> Co-authored-by: cog <iandol@cog8> Co-authored-by: iandol <iandol@cog8.org> Co-authored-by: iandol <cog5@win> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…od. Here's what I did:
movieStimulus.mto use a direct texture shader for itscircularMaskproperty, aligning its approach withimageStimulus.masktex) on top of the movie.sigmaproperty for controlling mask edge smoothness.makeMaskShadermethod to load and configurecircularMask.frag.setup,loadMovie,draw, andresetmethods to integrate the new shader-based masking and remove the old procedural disc mask.circularMask.fragshader is now used directly in the drawing pipeline for movies whencircularMaskis enabled.