Jump to content
  • Advertisement
Sign in to follow this  

XNA Blend Modes?

This topic is 4316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

-As a graphic designer, I'm very interested in XNA run-time raster/bitmap blending. I can't seem to find any visual examples of them, though. -Here's the link: http://msdn2.microsoft.com/en-us/library/microsoft.xna.framework.graphics.blend.aspx -And here's a sample of what I'm concerned with on the above linked page: BlendFactor: Constant color blending factor used by the frame-buffer blender. BothInverseSourceAlpha: Source blend factor is (1 − As, 1 − As, 1 − As, 1 − As), and destination blend factor is (As, As, As, As); the destination blend selection is overridden. This blend mode is supported only for the SourceBlend render state. BothSourceAlpha: This mode is obsolete. For DirectX 6 and later, you can achieve the same effect by setting the source and destination blend factors to SourceAlpha and InvSourceAlpha in separate calls. DestinationAlpha: The DestinationAlpha blend factor is (Ad, Ad, Ad, Ad), where Ad is the destination alpha value. DestinationColor: The DestinationColor blend factor is (Rd, Gd, Bd, Ad), where R, G, B, and A respectively stand for red, green, blue, and alpha destination values.3 InverseBlendFactor: Inverted constant color-blending factor used by the frame-buffer blender. This blend mode is supported only if SupportsBlendFactor is true in the SourceBlendCapabilities or DestinationBlendCapabilities properties. InverseDestinationAlpha: The InverseDestinationAlpha blend factor is (1 − Ad, 1 − Ad, 1 − Ad, 1 − Ad), where Ad is the alpha destination value. -These are apparently blend modes, like Photoshop has. Yet, all that jargon tells me nothing! -Anyone know where to find something more visual so I can learn what the affect these blend modes have is? I've searched high and low. Something like this would be great: http://www.photoshopgurus.com/tutorials/t010.html -But that's for Photoshop. [Edited by - Sharp17 on February 1, 2007 2:10:52 PM]

Share this post

Link to post
Share on other sites
OK, through further tests, research and all that good stuff we've found that there's only one blend mode for 2D sprites, it's called 'Additive'.
It creates the EXACT same effect that the Photoshop blendmode 'Linear Dodge' does. We're using C# and XNA.

-3D objects seem to have more options, but different; makes sense.

-But right now, I'm concerned with 2D sprites only.

-See my test app below:

>> Additive blending turned OFF:

>> Additive blending turned ON:

>> Download my the above screenshotted app with moving images blending in real-time:
Animated Additive Application
You'll should need all the XNA installers to run it. It's just an *.EXE with some *.XNB's, unzip them in the same folder, as usual.

Comments welcome.

[Edited by - Sharp17 on February 16, 2007 8:58:03 AM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!