Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79

Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/clients/50536745d503cc9bd290722a231d5f8f/web/includes/o3_common.php on line 79
oZone3D.Net Tutorials - Normal Map Compression S3TC DXT5 swizzling ATI 3Dc GL_ATI_texture_compression_3dc OpenGL GLSL glCompressedTexImage2D




GeeXLab
Current version: 0.45.1
>GeeXLab homepage

FurMark
Current version: 1.30.0
>FurMark homepage

GPU Caps Viewer
Current version: 1.55.0.0
>GPU Caps Viewer homepage

GPU Shark
Current version: 0.26.0.0
>GPU Shark homepage


Blogs
>JeGX's HackLab

Geeks3D's Articles
>GPU Memory Speed Demystified

>Multi-Threading Programming Resources

>GeForce and Radeon OpenCL Overview

>How to Get your Multi-core CPU Busy at 100%

>How To Make a VGA Dummy Plug

>Night Vision Post Processing Filter

PhysX FluidMark
Current version: 1.5.4
>FluidMark homepage

TessMark
Current version: 0.3.0
>TessMark homepage

ShaderToyMark
Current version: 0.3.0
>ShaderToyMark homepage
>ShaderToyMark Scores

Demoniak3D
Current Version: 1.23.0
>Demoniak3D
>Download
>Libraries and Plugins
>Demos
>Online Help - Reference Guide
>Codes Samples
 
Normal Map Compression
Renormalization
Swizzled DXT5 - ATI 3Dc

By Jerome Guinot aka 'JeGX' - jegx [at] ozone3d (dot) net

Initial draft: March 11, 2006
Update: March 16, 2006


[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

�Next Page



2 - Renormalisation

Now, let us try to ameliorate these renderings. A simple way is to renormalize the normal which one has taken from the normal-map. In fact, and principally because of texture filtering, the normal vector that one obtains is no longer obliged to have a length of 1. This could create a few problems for a vector which is supposed to have a unitary length. The normalisation therefore permits giving the normal vector a length of 1. This renormalisation is created by:

vec3 bump = normalize( texture2D(normalMap, texCoord).xyz * 2.0 - 1.0 );

Load the bump_map_uncompressed_normalized.xml file in order to see the renormalisation effect: this gives the picture in figure 5:


Fig. 5 - Uncompressed bump map with renormalisation

Compared to figure 2, the quality rendered is practically perfect. Now Let us see what will happen if one renormalizes the normal which has come from the compressed normal-map. For that, load the bump_map_compressed_normalized.xml file into Hyperion:


Fig. 6 - Compressed bump map (DXT5) with renormalisation

The specular reflections appear but the limits of the compression blocks are always visible.







[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

�Next Page





GeeXLab demos


GLSL - Mesh exploder


PhysX 3 cloth demo


Normal visualizer with GS


Compute Shaders test on Radeon


Raymarching in GLSL



Misc
>Texture DataPack #1
>Asus Silent Knight CPU Cooler
Page generated in 0.0035531520843506 seconds.