Posts

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 texCoord to fetch texture:
1.  float4 color = tex2D( sampler,  float2( texX / texW, texY/texW );
2.  float4 color = tex2Dporj( sampler, float4( texX, texY, texZ, texW ) );

The top-two methods will have the same result. Because tex2Dproj operator supports divide w in its interface.


http://www.gamedev.net/community/forums/topic.asp?topic_id=408894
http://bbs.gameres.com/showthread.asp?threadid=104316

Cascaded Shadow Map

The d3d example in browsers - IE

Image

An OpenGL Sample as Firefox Plugin

Volume Texel

Image
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
        }

    }
}