4 ms·
Basically all newer hardware has the ability to convert from sRGB to linear RGB during texture sampling, and back again during ROP. See these OpenGL extensions:
by ssp 16y ago
Basically all newer hardware has the ability to convert from sRGB to linear RGB during texture sampling, and back again during ROP. See these OpenGL extensions:
http://www.opengl.org/registry/specs/EXT/texture_sRGB.txt http://www.opengl.org/registry/specs/EXT/texture_sRGB.txt
http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.tx...
- jckarter 16y agoIs the sRGB-to-linear transformation actually done in the GPU's texturing hardware? nVidia's PTX ISA at least doesn't expose any sRGB-specific sampling opcodes.
- ssp 16y agoThe conversion should take place before filtering, so it has to be in the texturing hardware. There is no need for sRGB specific sampling opcodes because sRGB is considered a property of the texture, not of the way you sample it.
- jckarter 16y agoYeah, but PTX doesn't give texture or sampler values an sRGB mode either. Are you sure the driver doesn't just convert the texture when glTex(Sub)Image* is called?
- deleted 16y ago[deleted]
- ssp 16y agoI would be very surprised. I do know that both Intel and ATI chips support it in texture hardware. See this, for example: http://www.x.org/docs/AMD/R5xx_Acceleration_v1.5.pdf http://www.x.org/docs/AMD/R5xx_Acceleration_v1.5.pdf Bit 21 of TXFORMAT0: GAMMA 21 none Optionally remove gamma from texture before passing to shader. Only apply to 8bit or less components. POSSIBLE VALUES: 00 - Disable gamma removal 01 - Enable gamma removal There is also support for re-applying gamma before storing to a color buffer.