Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

question regarding custom fog for feature level < 9.3

Discussion in 'Windows' started by tswalk, Sep 4, 2013.

  1. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I have a pretty low knowledge level for shader programming, so I was a little confused about this and wanted to clarify.

    Is the right approach for feature level < 9.3 and addressing fog to create surface shader(s) for all models and inject the example Tomas provided? (of course having needed texture map defintions, 'surf' procedure, et al.)

    which, when fog is enabled in RenderSettings... the "mycolor" final pass composites final rgb value to use (based on those settings)?

    How does this impact feature level support > 9.3? Do I need to be concerned with this and have alternate level checks.. or does ShaderLab handle that for me? :) because (at this point) I have no clue how to do that yet.
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,940
    The shader which I provide will work on any feature level.

    Regarding question which fog, it totally depends on the shader, as far as I recall, that shader has linear fog implementation. That also means that fog type setting in Render Settings doesn't have any effect if you use that shader ;)
     
  3. InitoryDad

    InitoryDad

    Joined:
    Jul 3, 2012
    Posts:
    21
    Tomas, can you sent me a example. This fog question has trouble me some days. :-(
    My mail is lijianxin@me.com
     
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,940