Jump to content

  • Log In with Google      Sign In   
  • Create Account


multiple render targets with different blending op


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 lomateron   Members   -  Reputation: 281

Like
0Likes
Like

Posted 26 December 2013 - 03:06 AM

I want to render to 2 render targets at the same time

the first RenderTarget will have this blending op:      ValueAlredyInPixel*NewValue + NewValue

the second RenderTarget will have this blending op: ValueAlredyInPixel + NewValue

The documentation in how to create a blend state is telling me that i can't do this kind of different blendings OP on different render targets, can I?

 

Now when rendering to the second render target I will always set NewValue to 1

So you will think that I could just use the blending OP used in the first render target because:

(ValueAlredyInPixel*1.0f+ 1.0f) = (ValueAlredyInPixel + 1.0f)

but the problem is that the format of the second render target is 8 UNORM per pixel, so to render NewValue=1(in 8 bit UNORM format)=0.00392f(in 32 bit FLOAT format)...so I will have to render:

(ValueAlredyInPixel*0.00392f+ *0.00392f) .....................  0.00392f = 1/255 

 

Will this 0.00392f value be tranformed to 1 before the blending operation takes place?

 

So will ValueAlredyInPixel*NewValue + NewValue work in the second render target?


Edited by lomateron, 26 December 2013 - 06:40 AM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS