1. Missing a module? More about the new installer in 5.3 here
  2. VS Code Unity debugger extension preview
  3. Unity Developer Contest here

bumps in fixed function shader

Discussion in 'Shaders' started by pitibonom, Apr 24, 2013.

  1. pitibonom

    pitibonom

    Joined:
    Aug 17, 2010
    Messages:
    149
    Hi all !

    I'm wondering wether it's possible or not to have bumpmaps in fixed function shader ?
    The doc didn't help me very much ( thouth the 'material' keyword might be one possibility ) and the
    awesomely crappy search engine in this forum got me thousands of useless posts...

    Mebe someone already wrote such a simple and fast shader ?
    I'd be please to get more info about this ;)

    thanks for your answers and help !

    regards.
     
  2. tomvds

    tomvds

    Joined:
    Oct 10, 2008
    Messages:
    1,026
    Bump mapping requires pixel shading, which is not possible in the fixed function pipeline. If you want bump-mapping, you will have to use a Cg shader.
     
  3. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Messages:
    7,327
    That's not true; you can do object space normal mapping using the undocumented Dot3 texture combiner.

    http://forum.unity3d.com/threads/14797-colored-speculars-and-bump-map

    That said, there's no reason to use a fixed function shader anymore. I write in GLSL first, so I can get a performance prediction from PVRShaderEditor, and then copy it to Cg if I need to support a blah platform.
     
  4. pitibonom

    pitibonom

    Joined:
    Aug 17, 2010
    Messages:
    149
    Hi !

    Thanks for this accurate answer Jessy !
    Yes i remember in the prehistoric times when the 3Dfx ruled the world, a guy from this company
    found a way to do realtime bump mapping. In this times those boards ( the Voodoo2 ) had nothing but fixed function
    shaders.

    the small fixed func shader:
    works in an interresting way. Now that i know the key is on the combine fixed function i gonna dig this way.

    thanks a lot and have a nice day !
     
    Last edited: Sep 20, 2013