custom blending question luminosity?

hi! i have 3 images im blending but i wanted to use my own blendin’ method i want to blend one of the imgs as luminosity as that is what it holds!! i want to know what math is behind this?? how you add luminosity info to an existent image?? thx!!

i cundt find the maths for this anywhere dos anyone know about em?

This requires transforming the RGB image to YUV or equivalent. That color space transformation is not something youcan do simply. A fragment program could perform such an operation but is you’e just using the vanilla pipeline then you are out of luck.

So RGB->YUV and then perform a Y substitution or blend based on some alpha then back to RGB for the framebuffer write. Do it in software if you can’t do it in a shader.