Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
0
Question by OliverAnthony · May 07, 2014 at 03:28 PM · shadermaterialgraphics

"Shader has errors or is not supported by your graphics card."

I have the following shader, which shows the above line when I look at it in the inspector. It does not generate any errors/warnings if I right click the asset and do a reimport, though.

 Shader "Architect/Bezier Line" 
 {
     // Bound with the inspector.
      Properties 
      {
         _Color ("Main Color", Color) = (1.0, 1.0, 1.0,1.0)
            _Start ("Start", Vector) = (0.0, 0.0, 0.0)
            _End ("End", Vector) = (0.0, 0.0, 0.0)
     }
 
     SubShader 
     {
         Pass 
         {
             Blend SrcAlpha one
 
             CGPROGRAM
             #pragma target 5.0
             
             #pragma vertex vert
             #pragma fragment frag
             
             #include "UnityCG.cginc"
             
             // The same point data structure used by both the compute shader and the shader.
 //            struct Point
 //            {
 //                float t;
 //            };
             
             // structure linking the data between the vertex and the fragment shader
             struct FragInput
             {
                 float4 color : COLOR;
                 float4 position : SV_POSITION;
             };
             
             // The buffer holding the points shared with the compute shader.
             StructuredBuffer<float> pointBuffer;
             
             // variables from the properties.
             float4 _Color;
             float3 _Start;
             float3 _End;
             
             FragInput vert (uint id : SV_VertexID, uint inst : SV_InstanceID)
             {
                 FragInput fragInput;
                 
                 // apply color
                 fragInput.color = _Color;
                 
                 // position computation
                 float t = pointBuffer[inst];
 //                
                 float3 p0 = _Start;
                 float3 p3 = _End;
 //                
                 float dist = distance(p0, p3);
 //                
                 float3 p1 = float3(p0.x + clamp(dist, 0.0, 400), p0.y, 0);
                 float3 p2 = float3(p3.x - min(dist,200), p3.y, 0);        
                 
                 float3 final = (pow(1.0-t,3.0) * p0) + (3.0 * pow(1.0-t,2.0) * t * p1) + (3.0 * (1.0-t) * pow(t,2.0) * p2) + (pow(t,3.0) * p3);
                 
                 fragInput.position = mul (UNITY_MATRIX_MVP, float4(final, 1));
                 
                 return fragInput;
             }
             
             // this just passes through the color from the properties
             float4 frag (FragInput fragInput) : COLOR
             {
                 return fragInput.color;
             }
             
             ENDCG
         
         }
     }
 
     Fallback Off
 }

Can anyone help me out here?

Comment
Add comment · 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 tanoshimi · May 07, 2014 at 08:50 PM 0
Share

and I assume your graphics card supports DX11?

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.

Follow this Question

Answers Answers and Comments

21 People are following this question.

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

Related Questions

Creating a Material from shader string 2 Answers

Standard material shader ignoring SetFloat property "_Mode"? 1 Answer

use RenderTexture on a sphere correctly? 1 Answer

Material doesn't have a color property '_Color' 4 Answers

Set dynamic generated alpha mask on shader at runtime 0 Answers


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