Just a small variant on the last one. This one also contains parameters for adjusting the contrast, blur, and saturation of the reflection. Unfortunately this bumps it to SM 3.0, so i decided to do it separately. They make the shader properties from before much more useful though.By adjusting the contrast, you get a lot more range to play with in all the other attributes from earlier, and you can get much more realistic reflections. While you can do a cheap blur with a texCubeBias, its pretty lossy and has a problem of tearing at edges. Instead i modify the reflection vector to filter the cubemap. This only costs 1 extra sample, but you could remove the extra sample if you are fill limited. Finally, I added a saturation control. I think that this might make light reflective materials easier to work with.

phongnormalreflective2.cgfx
File Size: 3 kb
File Type: cgfx

Download File


phongnormalreflective2.shader
File Size: 3 kb
File Type: shader

Download File


Leave a Reply

Your email address will not be published. Required fields are marked *