Jump to content

  • Log In with Google      Sign In   
  • Create Account

DirectX 9 floating point texture


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
2 replies to this topic

#1 alin23   Members   -  Reputation: 102

Like
0Likes
Like

Posted 17 July 2014 - 11:30 AM

I would like to draw a textured full screen quad into the color buffer with alpha blending enabled to achieve lighting and shadowing of the color buffer. I have a FX file where I set AlphaBlendEnable = true, SrcBlend = DestColor and DestBlend = Zero to multiply the textured quad with the color buffer.

So far I have only achieved shadowing of the color buffer, but I would like to achieve lighting as well, that is for values in the texture bigger than 1.0, the values in the color buffer will be brightened.

For this I tried to use floating point textures to blend them with the color buffer, but for some reason the values in the texture get clamped to 1.0.

Do you know what texture format to use so that when blending with the color buffer I have values bigger than 1.0 in the texture?

Thank you, Alin



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8005

Like
1Likes
Like

Posted 17 July 2014 - 02:01 PM

An alternative is to use SrcBlend = DestColor and DestBlend = SrcColor and use a baseline of 0.5 - that way you don't need a FP texture (use baseline of 128 for a regular 0-255 range) and can get up to double brightness, saving a good deal of bandwidth and video RAM while you're at it.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 alin23   Members   -  Reputation: 102

Like
0Likes
Like

Posted 18 July 2014 - 12:45 AM

That's what I wanted. Great stuff, thanks.






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