Horde3D

Next-Generation Graphics Engine
It is currently 27.04.2024, 09:38

All times are UTC + 1 hour




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: sRGB framebuffers
PostPosted: 08.02.2010, 10:40 
Offline

Joined: 23.06.2008, 10:23
Posts: 21
Location: Sweden
Horde3D recently gained hardware support for the linearization of sRGB textures, which is great. But currently in order to convert it back into sRGB you have to do it with the use of shaders, which has a few problems. Firstly blending will computed incorrectly as it is performed on non-linear color space, and secondly there is a small performance hit.

A solution to this problem is to make framebuffers sRGB-aware with the use of EXT_framebuffer_sRGB.
This would fix both problems as the conversion back to sRGB is done in hardware so it's practically free in terms of performance and also if blending is enabled the texture is converted back to linear color space before blending and the result of the blend is then gamma-corrected.


Top
 Profile  
Reply with quote  
 Post subject: Re: sRGB framebuffers
PostPosted: 10.02.2010, 01:17 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
If you use an FP16 buffer to store your values in linear space, you won't have problems with incorrect blending (supposed you have SM3) and you have enough precision (even more than in sRGB space). When respecting gamma, probably you will want to use HDR as well and for that FP16 is a reasonable solution on PC. BTW, the sRGB framebuffer extension is not available everywhere and unfortunately you can't assume that the writes are for free.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 36 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group