Hi,
I am trying to generate and merge normal map in runtime. I stuck upon adding rgb pixels of normal map.
Since opengl stores texture values in unsigned int format. I need to add texels signed. glBlendFunc(GL_ONE, GL_ONE). Doesnot help
Exact combining is required is ((R1-127)+(R2-127))+127 How can I acomplish this. (Using blendequations)
Thanks
Show differencesHistory of post edits
#1anindie
Posted 23 April 2012 - 01:23 AM
Hi,
I am trying to generate and merge normal map in runtime. I stuck upon adding rgb pixels of normal map.
Since opengl stores texture values in unsigned int format. I need to add texels signed. glBlendFunc(GL_ONE, GL_ONE).
Exact compining is required is ((R1-127)+(R2-127))+127 How can I acomplish this.
Thanks
I am trying to generate and merge normal map in runtime. I stuck upon adding rgb pixels of normal map.
Since opengl stores texture values in unsigned int format. I need to add texels signed. glBlendFunc(GL_ONE, GL_ONE).
Exact compining is required is ((R1-127)+(R2-127))+127 How can I acomplish this.
Thanks