Digital tutors-introduction to Scripting Shaders in Unity learning notes

Source: Internet
Author: User

1, overview

2, Understanding Shader

Definition:code that define what's the material can do in the environment

Classification:

Surface shader--Easy to write, influenced by lighting and other factors

Vertex and Fragment Shader (Pixels)--very flexible, large code size, good written to improve rendering efficiency and reduce overhead

Fixed Function shader--fix pipeline Shader, to older hardware (in fact, it will be converted into a programmable Shader to execute)

3, Shader Language in Unity 3D

Shaderlab: By

Cg (C for graphics): Nvidia developed, easy to learn and very powerful

GLSL (OpenGL shading Language): Shader for mobile platforms that can be automatically converted into CG shader

4, Structure of basic Shader

Shader:defines the connection between Shader and Unity3d

Properties: Define some variable attributes

Subshader: The body of the code, can be multiple subshader, and each subshader can have multiple channels pass

Digital tutors-introduction to Scripting Shaders in Unity learning notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.