Questions and Sanity check on textures for video filter plugin dev

dsp-stanky

New Member
For some background context, I decided to learn how to make a video filter plugin to dip my toes into graphics programming, so i'm pretty new to these concepts, and I apologize if these questions end up being dumb:

Currently, i'm trying to create a pixel art video filter as a native OBS plugin, using the concepts and design presented in this video by Acerola: https://www.youtube.com/watch?v=8wOUe32Pt-E

Where i'm experiencing some issues is trying to translate how Unity handles textures into how OBS handles textures, to be more specific:

1. Is there a Graphics.Blit equivalent for OBS? I know I can copy a texture using gs_copy_texture, but that doesn't have functionality for performing the pixel shader on the source texture, and then copying the resultant pixel data into a different/new texture.

2. If not, is there a way to mimic that functionality by calling gs_technique_begin / gs_technique_begin_pass, or are those only used for drawing?

3. Is this implementation (see code below) completely unnecessary for how OBS does things and should I instead focus on using a down-scaling algorithm in my own effect file instead?

The code i'm basing this off of is here: https://github.com/GarrettGunnell/Post-Processing/blob/main/Assets/Pixel Art/PixelArtFilter.cs, and the effect/shader file is just a default shader except it's using a point sampler with the UV clamped.

Ultimately, since this is meant as a learning exercise i'm not looking for the exact code, more just a sanity check that this is possible, and a push in the right direction if it is.
 

dsp-stanky

New Member
Texrender objects are apparently non-visible textures you can render to which sounds like it might be what i'm looking for, thanks to RoyShilkrot in the discord for pointing them out to me!
 
Top