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

not enough actual parameters for macro 'TRANSFORM_TEX'

Discussion in 'Shaders' started by Stephen-Lavelle, Jan 3, 2017.

  1. Stephen-Lavelle

    Stephen-Lavelle

    Joined:
    Apr 17, 2013
    Posts:
    41
    On Unity 5.5.0p3 on my MAC, selected platform osx

    Code (csharp):
    1. Shader "Custom/UV2Test" {
    2. Properties {
    3. _MainTex ("Base(RGB)", 2D) = "white" {}
    4. }
    5. SubShader {
    6. Tags { "RenderType"="Opaque" }
    7. LOD 200
    8.  
    9. CGPROGRAM
    10. #pragma surface surf Lambert
    11.  
    12. sampler2D _MainTex;
    13.  
    14. struct Input {
    15. float2 uv_MainTex : TEXCOORD0;
    16. float2 uv2 ;
    17. };
    18.  
    19. void surf (Input IN, inout SurfaceOutput o) {
    20. half4 c = tex2D (_MainTex, IN.uv_MainTex);
    21. o.Albedo = c.rgb;
    22. o.Alpha = c.a;
    23. o.Emission = float3(IN.uv2.x,IN.uv2.y,0);
    24. }
    25. ENDCG
    26. }
    27. FallBack "Diffuse"
    28. }
    29.  
    gives the following error

    Not sure what to do here to fix it up. It compiled fine on older versions of unity.