Tiling of the textures isn’t working

Forum Archive Tiling of the textures isn’t working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8356
    Ross Barefoot
    Participant

      Hello Jonathan, Everything is looking great with this shader/material, except when I try to increase the tiling of the textures nothing changes. It may be a simple fixed…but this course is my first crack at creating shaders within Unity. I’m not exactly sure on how to correct it. Thanks.

      #28590
      Jonathan Gonzalez
      Participant

        It’s something not included with this shader that probably should have been. It was left out in this case since the example used textures that would not be tiled. By default it adds the option to tile the various maps, but you need to give those options “functionality”. This was covered briefly in this lesson:

        https://cgcookie.com/lesson/adding-textures 

        Essentially for every map you need to add in a float4 with the name of the property followed by _ST

        Here is an example:

        sampler2D _MainTex;

        float4 _MainTex_ST;

        This would need to be done for each of the texture maps used. So here are some more examples:

        sampler2D _NormalTex;

        float4 _NormalTex_ST;

        sampler2D  _MetalTex;

        float4 _MetalTex_ST;


        if you have any other questions let me know.

        #28591
        Ross Barefoot
        Participant

          Thanks for the help Jonathan.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • The topic ‘Tiling of the textures isn’t working’ is closed to new replies.