Artistic Experiments
  • Home
  • Reel
  • Shaders
    • Stylized Shaders
    • Lighting Techniques
    • Shader Effects
    • Cubemaps
    • Pixel Lit Shaders (Basic)
    • Vertex Lit Shaders (Basic)
    • Unlit Shaders (Basic)
  • Tools
  • WIP
  • Contact

CG Shaders - Cubemap Reflection 2

1/14/2014

0 Comments

 
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.
Picture

Maya CGFX File:

phongnormalreflective2.cgfx
File Size: 10 kb
File Type: cgfx
Download File

Unity SHADER File:

phongnormalreflective2.shader
File Size: 12 kb
File Type: shader
Download File

0 Comments



Leave a Reply.

    CG Shaders

    Shaders I've built as i teach myself CG. Feel free to download and use for whatever. If you like them you can buy me a beer or something.

    Archives

    December 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.