Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Terrain Four Layer

Discussion in 'Shaders' started by rom, Aug 26, 2007.

  1. rom

    rom

    Joined:
    Jul 2, 2006
    Posts:
    265
  2. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Did u check the import settings to ensure it has arrived as one of the rgba formats? Other than that I dont know...
    hth
    AC
     
  3. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    As far as I know, that shader does not work on GeForce cards, because they only expose 4 OpenGL texture units (and the shader uses 5). In Unity 2.0 we're changing the way textures are bound in the shaders, so there it will work. For now you could change the shader to use 3 texture layers.
     
  4. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Here's a terrain 3 layer shader:
     

    Attached Files:

  5. rom

    rom

    Joined:
    Jul 2, 2006
    Posts:
    265
    Thanx for the replies.
    To Claify :
    I have used a shader that was posted on the wiki some time ago.

    With 5 color(texture) layers, each with a detail texture and each with a seprate mask, + a lightmap layer. (that is 16 different images)
    This works fine on my GeForce 6600 and looks good for terrain shading

    What are "OpenGL" texture units ?
    (is it different to how many layers can be used ?)

    My real question here is how do I use channels other than Alpha or a seperate hicon to mask layers

    Can a "three" layer shader be made that uses R,G, and B channels of one image as masks to reveal 3 other RGB textures, instead of having a seperate matte for each layer ?