Masterxilo Posted January 28, 2010 Share Posted January 28, 2010 In ps, there are different color/paint/image blend modes such as "Normal", "Multiply" and "Color". How does the "Color" blend mode work (programming-wise...). How would I recreate that blending in a shader? Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Josh Posted January 28, 2010 Share Posted January 28, 2010 Blending is a fixed-function operation, and cannot be written with a shader. The blend modes are listed in the material editor. I don't know what a color blend would be, or if it is supported on the hardware. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Masterxilo Posted January 28, 2010 Author Share Posted January 28, 2010 I'm sure it's just some color formula, just can't figure it out. I'm not talking about the hardware blend modes (blend add, alpha, multiply etc.), just about a way of combining colors. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Josh Posted January 30, 2010 Share Posted January 30, 2010 Multiply is the most common blend I use. It may not seem intuitive, but multiplying two colors results in a darker color...because the colors are considered to be in the range from 0 to 1. Mod2x blending is multiplying, and then multiplying the result by 2. This allows one color to darken or brighten another. Additive blending is self-explanatory. I don't really use anything else. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Masterxilo Posted January 31, 2010 Author Share Posted January 31, 2010 I found what I was looking for: http://www.nathanm.com/photoshop-blending-math/ Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
TylerH Posted February 13, 2010 Share Posted February 13, 2010 I found that a while back, we have been utilizing that code, in a GLSL shader, for loads of things. The updated Saturation, Contrast, Brightness shader I posted a while back utilized that guy's code. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.