Hey guys,
I'm trying to write a filter plugin to let the associated scene item randomly fidget for a while on the whole screen, triggered by a hotkey.
The last missing piece is to retrieve the position of the obs_source object to know how far it can be shifted in the 4 directions. There exists the obs_sceneitem_get_pos function, but I haven't found a way to get the obs_sceneitem from an obs_source. Another approach would be to use a vertex shader, add the randomly generated offset to vert_out.pos.xy and take this position modulo the two coordinate boundaries, but then the texture will be stretched all over the screen. (btw. what are the coordinates for the right and top edge in GLSL?)
Thanks in advance,
Frosti
I'm trying to write a filter plugin to let the associated scene item randomly fidget for a while on the whole screen, triggered by a hotkey.
The last missing piece is to retrieve the position of the obs_source object to know how far it can be shifted in the 4 directions. There exists the obs_sceneitem_get_pos function, but I haven't found a way to get the obs_sceneitem from an obs_source. Another approach would be to use a vertex shader, add the randomly generated offset to vert_out.pos.xy and take this position modulo the two coordinate boundaries, but then the texture will be stretched all over the screen. (btw. what are the coordinates for the right and top edge in GLSL?)
Thanks in advance,
Frosti