Re: [Algorithms] Common Src/DestAlphaBlend mode combinations
Brought to you by:
vexxed72
|
From: Wessam B. <wba...@in...> - 2008-12-06 00:35:59
|
> Yes, Photoshop is "backward compatible" with the way image blending was done "back in the early days...". > The last time I checked (CS2?), an option for linear space operation was available only for some operations > (image resizing?), but not for general blending, and was in some obscure place in the prefs. It’s been in Photoshop a while ago. Edit > Color Settings > (Check) Advanced Mode > (Check) Blend RGB Colors Using Gamma. It affects all transparency blends (including layer transparencies). وسام البهنسي مبرمج - إليكترونيك آرتس -- Wessam Bahnassi Microsoft DirectX MVP, Programmer - Electronic Arts Inc. -- الشبكة العربية لمطوري الألعاب Arabic Game Developer Network www.agdn-online.com From: Alen Ladavac [mailto:ale...@cr...] Sent: Thursday, December 04, 2008 10:15 AM To: Jesús de Santos García Cc: Game Development Algorithms Subject: Re: [Algorithms] Common Src/DestAlphaBlend mode combinations Yes, Photoshop is "backward compatible" with the way image blending was done "back in the early days...". The last time I checked (CS2?), an option for linear space operation was available only for some operations (image resizing?), but not for general blending, and was in some obscure place in the prefs. I'm still stunned that such a large bunch of experienced programmers working on the most popular graphics app in the world have not come to fix this for so long. Probably because 99% users consider this as "correct behaviour". Then again, other apps, like Gimp, are no better (AFAIK), so go figure... JM2C, Alen Jesús wrote: > To avoid driver issues and the card not behaving like it should I took screenshots from Photoshop and ExpressionBlend to analyze how the blending was being done. And my conclusion was that is was being done in sRGB space (in theory the wrong one). May be, my photoshop configuration was not right and playing with the profiles can change the result, or may be the technique of taking screenshots and analyzing the raw bytes is not correct. But it was a surprise to me and we decided to do the blend in sRGB space to exactly have the same result that the artist was having. I'd like to know if more people experimented with this. On Wed, Dec 3, 2008 at 17:42, Jason Hughes < <mailto:jas...@di...> jas...@di...> wrote: I'm not sure if this is the same issue you experienced or not, but when I went down the pre-multiplied alpha path and learned how to set up my textures and blend modes to take advantage of it, I ran across some unexpected roadblocks with low end hardware. Fixed function intel chips, specifically, which I am guessing are similar to earlier fixed function hardware. I could set the texture surface to be linear, but that destroyed my color fidelity in the low end (darks) which gave me banding. I could set the rendered surface to be linear, as well as setting the presentation to require linear->sRGB conversion, but that only seemed to darken the scene and reduce color fidelity. In the end, it appeared (though I didn't test numerically or exhaustively) that the GPU was automatically converting sRGB to linear when fetching from the texture and frame buffer, then converting back when storing out. The PMA looked right but only when I didn't try to be fancy about the surfaces involved. YMMV, JH Jesús de Santos García wrote: I wonder if those formulas are exactly correct... I mean, for example in the additive mode the sum operation is being done in sRGB space (not in linear as it should be in theory). We had a similar problem when interpreting XAML for our gui. We wanted the final render to look exactly as it appeared in an editor (Expression Blend) and we had do switch off the blending in linear space. On Tue, Dec 2, 2008 at 00:46, Guido Henkel < <mailto:gh...@g3...> gh...@g3...> wrote: You may want to take a look at this page <http://www.pegtop.net/delphi/articles/blendmodes/> http://www.pegtop.net/delphi/articles/blendmodes/ Guido Henkel, CEO G3 Studios - <http://www.g3studios.com> http://www.g3studios.com ---------------------------------------------------------------------------------- BLACK JACK PRO is now available also for the iPhone! Don't miss the best version yet <http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=288915774&mt=8> http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=288915774&mt=8 ---------------------------------------------------------------------------------- This response and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, you should not copy it, re-transmit it, use it, disclose its contents, but should return it to the sender immediately and delete your copy from your system. On Dec 1, 2008, at 3:24 PM, Peter Higley wrote: > Hello, > > I recently wanted to provide a list of common/useful combination of > source and destination blend modes for a DirectX graphics > application. I know that it is common to use custom pixel shaders > to do almost everything these days, but I thought a set of "classic" > hard-wired blend modes would be easy enough to add. Odd thing is, I > couldn't find a list of common combinations. There is a > multiplicative/normal mode (srcblend = srcalpha, destblend = > invsrcalpha), there is an additive mode (srcblend = srcalpha, > destblend = one). I worked out a "screen" mode (srcblend = one, > destblend = invsrccolor) which is similar to PhotoShop's screen mode. > > I know that there are other useful combinations. What have you used? > > Peter > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > <http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________> http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > GDAlgorithms-list mailing list > <mailto:GDA...@li...> GDA...@li... > <https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > <http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world <http://moblin-contest.org/redirect.php?banner_id=100&url=/> http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ GDAlgorithms-list mailing list <mailto:GDA...@li...> GDA...@li... <https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: <http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list _____ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the wo <http://moblin-contest.org/redirect.php?banner_id=100&url=/> http://moblin-contest.org/redirect.php?banner_id=100&url=/ _____ _______________________________________________ GDAlgorithms-list mailing lis <mailto:GDA...@li...> GDA...@li... <https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives <http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world <http://moblin-contest.org/redirect.php?banner_id=100&url=/> http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ GDAlgorithms-list mailing list <mailto:GDA...@li...> GDA...@li... <https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: <http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list -- Alen |