(Programming Guide) KeyFrame Animation, Path Animation, Constraints
[platform/core/uifw/dali-toolkit.git] / docs / content / shared-javascript-and-cpp-documentation / texture-compression.md
index a9910d5..a89212e 100644 (file)
@@ -1,18 +1,20 @@
-/**
- *
+<!--
+/**-->
 
 # Texture Compression {#texturecompression}
 
 
 Using compressing the textures will:
 
-- Speed up rendering in time the GPU == less power used due to less texture data being transferred.
+- Reduce memory bandwidth in rendering due to less texture data being transferred per frame.
+  - Reduces power consumption.
+  - Speeds up rendering.
 - Reduce texture memory usage.
-- Speed up load times. Smaller files mean quicker load times.
-  
+- Speed up load times. There is no CPU decoding step in loading: the file data can be copied directly to GPU memory.
+
 DALi supports the KTX file format.
-  
-You just load the compressed texture like you would any other image.
+
+You load the compressed texture just like you would any other image.
 
 ~~~{.cpp}
 // C++
@@ -23,27 +25,27 @@ ResourceImage image = ResourceImage::New("my_compressed_file.ktx");
 var image = new dali.ResourceImage( { url:"my_compressed_file.ktx"});
 
 ~~~
-  
+
 ### ARMS texture compression tool
 
 http://malideveloper.arm.com/develop-for-mali/tools/asset-creation/mali-gpu-texture-compression-tool/
-  
+
 Here is an example of using the ARM compression tool.
-  
+
 ![ ](../assets/img/texture-atlas/compression-options.jpg)
 ![ ](compression-options.jpg)
-  
+
 ![ ](../assets/img/texture-atlas/compression-example.jpg)
 ![ ](compression-example.jpg)
 
-  
+
 As shown above the ETC-1 compression format does not support alpha.
-  
-As a work around the tool will export the alpha as a seperate compressed image.
+
+As a work around the tool will export the alpha as a separate compressed image.
 
 In order to combine both the images you need to use a custom shader.
 Here is an example shader:
-  
+
 ~~~{.cpp}
 // C++ Code
   const char* const COMPRESSED_RGB_PLUS_SEPARATE_ALPHA_FRAGMENT_SOURCE =
@@ -73,7 +75,7 @@ Here is an example shader:
 
   imageActor.SetBlendMode(BlendingMode::ON);
 ~~~
-  
+
 ~~~{.js}
 // JavaScript code
 var fragSource = "  \
@@ -83,20 +85,20 @@ void main()                                                   \
     v4Color.a =  texture2D(sEffect, vTexCoord ).r;             \
    gl_FragColor = v4Color;                                     \
 }";
-  
+
 var shaderEffect = new dali.ShaderEffect( "", fragSource);
-  
+
 var atlasImageRGB = new dali.ResourceImage( { url:"ATLAS_RGB_FILENAME.KTX"} );
-  
+
 var atlasImageAlpha = new dali.ResourceImage( { url:"ATLAS_ALPHA_FILENAME.KTX"} );
-  
+
 shaderEffect.setEffectImage( atlasImageAlpha );
-  
+
 // to create Image Actor
 ImageActor  imageActor = ImageActor::New( mAtlasImageRGB, GetImagePosition( info) );
-  
+
 imageActor.setShaderEffect( shaderEffect );
-  
+
 imageActor.setBlendMode( dali.BLENDING_ON );
 ~~~
 
@@ -104,5 +106,3 @@ imageActor.setBlendMode( dali.BLENDING_ON );
 
 
 */
-
-