Showing posts from November, 2010

tex2D vs. tex2Dproj

texCoord(  texX, texY, texZ , texW ) means texture coordinate after transforming from the texture matrix [ position goes through world, view, projection, and texture ] . We can use this texCoord to fetch pixels from a texture, sampler : 1.  float4 color = tex2D( sampler,  float2( texX / texW, texY/texW ); 2.  float4 color = tex2Dporj( sampler, float4( texX, texY, texZ, texW ) ); The above two methods will have the same result because tex2Dproj operator supports divide w in its interface.

Cascaded Shadow Map hardware shadow map

The d3d example in browsers - IE

Image cross platform  If your firefox 3.5 crash on initialize d3d app, this problem is d3d create device type, you should try to add D3DCREATE_FPU_PRESERVE this flag. ( ) Result in firefox, google chrome, and IE:

An OpenGL Sample as Firefox Plugin

An OpenGL Sample as Firefox Plugin Building Firefox Plugins using Visual Studio

Volume Texel

In OGRE Engine, you should have a 3D texture and was implemnted in fixed function. material Examples/VTDarkStuff {     technique     {         pass         {             diffuse 0.0 0.0 0.0             ambient 0.1 0.1 0.15             cull_hardware none             lighting on         }            } }