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 1337GameDev · Apr 01, 2013 at 04:38 PM · shaderscgunity4learnresource

Learning shaders for unity4

I am curious on what resources I could use to learn shaders for unity4. I tried strumpy shader editor and loved it, but it is messed up and not consistent in unity4 with its results.

What shader language does unity use? Cg? Or some other unity specific language. Can somebody explain general concept, or concepts that are often missed/messed up. I am also curious what other people's own lessons and such they have learn to do or not do for coding shaders.

I am sorry if this is too open ended and is not necessarily a concise question. I have looked online and there is so many different topics and things on shaders.

Thanks for your help :)

Comment
Add comment · Show 4
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 whydoidoit · Apr 01, 2013 at 04:47 PM 0
Share

Read my getting started tutorial on Unity Gems - The Noobs Guide To Shaders - where I started from exactly where you are and decided to write the tutorial as I learned.

avatar image Privertex · Apr 01, 2013 at 06:41 PM 0
Share

Unity Cookie recently started a training series on shader writing featuring general concepts and the implementation of different techniques. These are citizen tutorials however and require a membership at CGCookie Beginner Series Intermediate Series

avatar image 1337GameDev · Apr 01, 2013 at 06:48 PM 0
Share

Is the unity cookie membership free and just registration? And is there comprehensive materials for the "noobs guide" videos to demonstrate and talk about concepts in detail?

avatar image whydoidoit · Apr 01, 2013 at 07:15 PM 0
Share

Unity Cookie is good - Noobs Guide is just there - go take a look, see if you get on with it.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Apr 01, 2013 at 07:41 PM

The basic concepts(*) of shaders are the same everywhere, so, like C#, you could probably learn from a non-Unity source. I learned from the "Red book" on OpenGL then later used NVidea's HLSL shader editor. Unity shader language is just more of the same -- the man pages are good enough once you know shaders in general.

(*) Uniform variables; perVertex vars; faces don't really exist; all fragment data is interpolated values; vert->rasterize->frag->post pipeline; texCoords and why you "sample" instead of reading a pixel; default frag/vert shaders.

Then Unity sort of has 3 shader languages. Figuring out those is where Unity-specific guides would help:

ShaderLab is like the old switches method. The OpenGL red book has a good explanation and examples in the "mostly obsolete" section. I assume lots of other places do the same. The shaderLab language isn't the exact same, but the idea of how you build it texture by texture+addHow is the same.

The one with the most examples is surface shaders. Those are "real" shaders, but the lighting step is left-off, and auto-added by Unity.

Then you can use "real" vertex/fragment shaders, which look mostly like Cg shaders.

Comment
Add comment · Share
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

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

13 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

Related Questions

Spherical Hamonics - ShadeSH9 and Surface Shader issue 0 Answers

Using Vertex Color increases Draw Call 0 Answers

How to get camera location in object space? 1 Answer

Shader Help? Need an Alpha Test, then a "set pixel" sort of command 1 Answer

Shader Variable Types 2 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