Jump to content
  • Advertisement
Sign in to follow this  
Medo Mex

DX11 Dark Area Darker and Bright Area Brighter

This topic is 822 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

Hello Guys,

 

When I edit the texture in photo editing software to make the bright areas brighter and the dark areas darker, I get much better results with HDR, so I thought about doing it in pixel shader instead.

 

How do I write a pixel shader that makes the dark areas darker and bright areas brighter?

 

I'm using DX11 / C++ and rendering the scene in HDR.

Share this post


Link to post
Share on other sites
Advertisement
output = max(input * scalar + offset, 0)
Having a scalar > 1 will make brighter pixels brighter, having an offset less than 0 will make dark pixels darker, you may lose color information with the dark pixels.

This approach will duplicate the brightness/contrast function of most image programs. Did you use any other color adjustment functions when adjusting manually?

Share this post


Link to post
Share on other sites

@HappyCoder: It seems that I'm losing details and the scene appears to be burned out.

 

How do I get greater color range in the image without losing the details so I can take advantage of HDR?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!