I load DDS images (DXT5) with transparent alpha into OpenGL. Because the alpha is not pre-multiplied and can not be pre-multiplied based on DXT5 specs I get thin black halo around the visible part of the texture because I do some blending operations on GPU.My question is: what can be the best workaround for it.My OpenGL renderer updates scene textures on each frame loading those from IO so if I decompress the DDS then pre-muliply , then compress back I get huge overhead.Another option I thought would be to add another render pass and do the pre-multiply in fragment shader and render to texture,then use it for the main pass.This one adds overhead to the whole pipeline because I already have a descent number of passes.What are additional options here?
1
votes
"My OpenGL renderer updates scene textures on each frame loading those from IO" You're loading and compressing textures every frame? Why?
– Nicol Bolas
Can't explain here as it is commercial stuff but that is special purpose renderer.It is supposed to work that way :)
– Michael IV
That is ,btw,the reason I use DDS here - to speed up upload time.Ah sorry , I am not compressing the textures in real time.I load ready DDSs
– Michael IV
2 Answers
0
votes