Tiling of the textures isn't working

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.

  • Jonathan Gonzalez(jgonzalez) replied

    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.


  • Ross Barefoot(thirddimension) replied

    Thanks for the help Jonathan.