December 25, 2009 • No Comments
Its me again. Long time no post, i know…
This time i got my hands dirty with famous cryteks SSAO effect. I’m pretty happy with the results. Also this demo is written in D3D 10 so make sure that you have win vista or 7 to run this.
Demo exe + shader code (1.43 Mb)
March 21, 2009 • No Comments
This is my first try at point light shadows(Omnidirectional shadows). Although there are some artifacts in the shadow map, I’m happy with the results.
Next thing to do is adding soft shadows(VSM Maybe).
• No Comments

Finally after reading pages about how gaussian blur works, i have done my own implementation. Hooray!
Here are the steps I’ve taken:
- Render the whole scene to texture
- Down sample (4x) that texture
- Blur horizontally
- Blur vertically
- Up sample the texture (4x)
- Draw the texture on the screen
References:
Directx SDK
Gamasutra
http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm
January 31, 2009 • 1 Comment
Alright! It’s not that old but the original concept ( Bump Mapping ) is.
Some time ago i created demo in OpenGL ( GLSL) to learn the concept. and more recently i converted it to Direct3D 9 ( HLSL ). I decided to post some pics of the demo here.
The Normal Mapping ( Dot3 Bump Mapping ) concept is relatively simple: Instead of using hardware interpolated vertex normals for shading equation ( N Dot L , for example ), We use texture that contains normal vectors ( thus called normal map ), and map it to our surface. This way we have unique normal per pixel , and it greatly enhance the shading without adding any polygons to our objects.
The downside is when we look at our surface in oblique angles it appears to be flat , this is where Parallax Mapping comes into play. It simply shift the surface texture along the view vector ( in tangent space ) according to gray scale height map that represent the height of each pixel. So the ‘higher’ point shift away from the camera and theĀ ‘lower’ point shift toward the camera, thus creating parallax effect.
Note that the parallax method I’ve used here does not take into account the self occlusion of the surface.