Archive for the ‘HLSL’ Category

Normal Map Compression

Posted on October 7th, 2009 in Colony Defense, GameDev, HLSL | 1 Comment »

So I haven’t posted in a few days. There is a good reason, I assure you. Among about fifty other things, I’ve been laser focused on getting my planets looking good. The biggest problem I’ve come up with is how to compress the normal maps and have them still look good. For those who care, here is what I’m doing now.
Use a DTX5 compression / format for the surface format of the texture. I know, I know, this leaves artifacts galore. Now, change your normal mapping shaders to re-normalize the texture lookup values. I went from “your moms so ugly…” to “Wow.. she’s hot” in one line of shader code. Also, my file sizes went from 16 megs with NO mip maps to 5.4 megs WITH mip maps.

I think I’m happy.

Dan

HLSL Shader Tutorials

Posted on May 5th, 2009 in GameDev, HLSL | No Comments »

If your at all interested in modern graphics programing, then there is no escaping the fact that you will need to have a solid foundation into the hows and whys of shaders. For me, it was one of the toughest aspects because at the time, I just couldn’t find the resources that stepped me through them. I came across a great site that has a bunch of tutorials (albeit hard to find) that I thought I would link to. This should make it a LOT easier for those of you who are interested to jump into shader programing. These were all created by Petri Wilhelmsen and his main site is located here. Enjoy!

  • Tutorial 1, Ambient light
  • Tutorial 2, Diffuse light
  • Tutorial 3, Specular light
  • Tutorial 4, Normal mapping
  • Tutorial 5, Deform shader
  • Tutorial 6, Shader demo
  • Tutorial 7, Toon shading
  • Tutorial 8, Gloss map
  • Tutorial 9, Post process wiggle
  • Tutorial 10, Post process Negative
  • Tutorial 11, Post process Grayscale
  • Tutorial 12, Post process Noise
  • Tutorial 13, Alpha mapping
  • Tutorial 14, Transmittance
  • Tutorial 15, Dynamic environment mapping
  • Tutorial 16, Refraction
  • There, no more excuses.