**** BEGIN LOGGING AT Sun Jul 26 02:59:56 2009 Jul 26 13:20:38 hi marex Jul 26 13:37:47 bluelightning: hey :-) Jul 26 14:22:47 raster: I need help, but I'm going to try graphfaq first :) Jul 26 14:24:48 ??? Jul 26 14:26:08 well, trying to make myself a demo where I flip three framebuffers (currently solid red green and blue) on the screen Jul 26 14:26:26 and I'm trying to blend gradually between them Jul 26 14:30:31 I meant comp.graphics faq Jul 26 14:32:42 sorry, three screens (currently red, green, and blue solid fills) on the framebuffer Jul 26 16:02:52 raster: well, I'm stuck on one thing, I need to multiply a byte times alpha and get a byte Jul 26 16:03:10 oh sorry Jul 26 16:03:14 was on other tabs Jul 26 16:03:37 so basically u have 3 images Jul 26 16:03:42 that's okay, been playing with it Jul 26 16:03:44 yeah Jul 26 16:03:44 and u want to crossffade between them Jul 26 16:03:53 between two of them Jul 26 16:05:05 ok 2 Jul 26 16:05:10 well... a color is a value Jul 26 16:05:15 0 to N Jul 26 16:05:22 (common is 0 to 255 for r, g and b) Jul 26 16:05:35 u hjave 2 values to numerically interplate between to fade Jul 26 16:05:44 ie value 1 is 100, value 2 is 200 Jul 26 16:05:54 so 100, 120, 140, 160, 180, 200 Jul 26 16:05:57 (for example) Jul 26 16:05:59 it's basic math Jul 26 16:06:17 in the end gfx boils down to fairly simple math Jul 26 16:08:54 so it doesn't make sense to blend one with partial opacity then the other with opposite (1 - the first)? Jul 26 16:09:36 I just need to blit the solid color then do what you said, while iterating the stepps Jul 26 16:14:33 yup Jul 26 16:15:11 new = (b * int) + (a * (1-int)) Jul 26 16:15:29 assuming int is 0.0 - 1.0 Jul 26 16:15:35 new is new value (same for r, g and b) Jul 26 16:15:47 and int is the interpolation Jul 26 16:15:55 a and b are the 2 values Jul 26 16:16:10 the fun comes in making it really fast/efficient when u have a real pixel format Jul 26 16:16:17 (eg rgb565 or rgb24/32) Jul 26 16:16:20 and on your cpu Jul 26 16:16:24 :) Jul 26 16:17:58 int = abs(a-b)/numsteps? Jul 26 16:18:21 yeah, bgra on c2d for now **** ENDING LOGGING AT Mon Jul 27 02:59:57 2009