Quantcast
Channel: Latest Questions by x4000
Viewing all articles
Browse latest Browse all 49

Is there a way to set blend modes / render state in Unity?

$
0
0

This is something I have not seen much about in the documentation here. But supposing I wanted to do various sorts of additive color blending between an object and the existing scene entities. In XNA this would be for a spritebatch, or in SlimDX this would be between Begin/End calls on a sprite object from Direct3DX. Is there anything like this in Unity?

The code in SlimmDX for additive blending would be:

   device.SetRenderState( RenderState.BlendOperation, BlendOperation.Add );
   device.SetRenderState( RenderState.SourceBlend, Blend.SourceAlpha );
   device.SetRenderState( RenderState.DestinationBlend, Blend.One );

Anything along these lines in Unity?


Viewing all articles
Browse latest Browse all 49

Trending Articles