PDA

View Full Version : custom blending question luminosity?



doodlemunch
12-09-2005, 01:05 PM
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!!

doodlemunch
12-09-2005, 02:23 PM
i cundt find the maths for this anywhere dos anyone know about em?

dorbie
12-10-2005, 12:30 AM
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.