• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by pbeer · Dec 19, 2015 at 02:51 PM · unity 5shaderinterpolationinterpolate

Unity 5 shader error : Too many texture interpolators would be used for ForwardBase pass (11 out of max 10)

Hi,

I'm trying to use good old T4M shader in Unity 5 and it seems there is an extra interpolator in action. Is there a way to still use it without setting it to shader target 4.0?

 Shader "T4MShaders/ShaderModel2/Diffuse/T4M 4 Textures" {
 Properties {
     _Splat0 ("Layer 1", 2D) = "w$$anonymous$$te" {}
     _Splat1 ("Layer 2", 2D) = "w$$anonymous$$te" {}
     _Splat2 ("Layer 3", 2D) = "w$$anonymous$$te" {}
     _Splat3 ("Layer 4", 2D) = "w$$anonymous$$te" {}
     _Control ("Control (RGBA)", 2D) = "w$$anonymous$$te" {}
     _MainTex ("Never Used", 2D) = "w$$anonymous$$te" {}
 }
                 
 SubShader {
     Tags {
    "SplatCount" = "4"
    "RenderType" = "Opaque"
     }
 CGPROGRAM
 #pragma surface surf Lambert 
 #pragma exclude_renderers xbox360 ps3
 #pragma target 3.0
 
 struct Input{
     float2 uv_Control : TEXCOORD0;
     float2 uv_Splat0 : TEXCOORD1;
     float2 uv_Splat1 : TEXCOORD2;
     float2 uv_Splat2 : TEXCOORD3;
     float2 uv_Splat3 : TEXCOORD4;
 };
  
 sampler2D _Control;
 sampler2D _Splat0,_Splat1,_Splat2,_Splat3;
  
 void surf (Input IN, inout SurfaceOutput o) {
 
     fixed4 splat_control = tex2D (_Control, IN.uv_Control).rgba;
         
     fixed3 lay1 = tex2D (_Splat0, IN.uv_Splat0);    
     fixed3 lay1_2 = tex2D (_Splat0, IN.uv_Splat0 * -0.015);
     
     fixed3 lay2 = tex2D (_Splat1, IN.uv_Splat1);
     fixed3 lay2_2 = tex2D (_Splat1, IN.uv_Splat1 * -0.015);
     
     fixed3 lay3 = tex2D (_Splat2, IN.uv_Splat2);
     fixed3 lay3_2 = tex2D (_Splat2, IN.uv_Splat2 * -0.015);
     
     fixed3 lay4 = tex2D (_Splat3, IN.uv_Splat3);
     fixed3 lay4_2 = tex2D (_Splat3, IN.uv_Splat3 * -0.015);
     
     o.Alpha = 0.0;
     o.Albedo.rgb = (((lay1 * splat_control.r / 2) + (lay1_2 * splat_control.r / 2)) + 
                     
                     ((lay2 * splat_control.g / 2) + (lay2_2 * splat_control.g / 2)) + 
                     
                     ((lay3 * splat_control.b / 2) + (lay3_2 * splat_control.b / 2)) + 
                     
                     ((lay4 * splat_control.a / 2) + (lay4_2 * splat_control.a / 2)));
 }
 ENDCG 
 }
 // Fallback to Diffuse
 Fallback "Diffuse"
 }
 
Comment
Matt-Bitner

People who like this

1 Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Straafe · Feb 09, 2016 at 11:32 AM 0
Share

I'd love to know this as well

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I get toy story type graphics in a unity game? 1 Answer

Unity 5 bug standard cutout shader and light mapping 2 Answers

How to change color of material from shader graf per script,How to change color of material from shader graf 1 Answer

Player starts moving in one direction nonstop after colliding with any other object 1 Answer

Mirror Leap motion hands 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges