"My book" Unity Shader Book-folder (2015.12.21 update)

Source: Internet
Author: User
Tags farm games unity 5


Write in front



Thanks for all the friends who came in to see. That's right. I'm going to write a book about unity shader right now.

The purpose of the book is as follows:

    1. Summarize my experience with unity Shader and give others a reference. I was very clear about the difficulty of learning shader, and I saw a lot of people ask questions in the group.

      I think that learning shader is still a regular thing to follow, but the problem is the Chinese information is difficult to find, and we do not want to see English ... What are the advantages of this to me? Forced me to comb the knowledge, to grasp the details of the problem more clearly.

    2. A second reason you know.

Questions about the positioning of the book:

    1. For unity Shader just started to learn, but to:

      1. Have a certain programming experience. Otherwise I said: Write a function xxx in the script. You ask me, what is the script? I:.......
      2. I hope you remember the basic mathematics of junior High school. At least you can count the numbers clearly. I'm clear that a lot of people have already given the matrix these slightly more complicated math to the college teachers, so I'll introduce them in a separate chapter.
      3. I hope you have a certain degree of patience. Why do you always think that do not understand, learn not to shader, can reflect on oneself is not too impatient, want to see today tomorrow will. Give it up. It is impossible.

      One of my goals in writing this book is to help people who have just started learning to put the foundation on hold, and no foundation, no matter what the superstructure, is unreliable.

    2. I'm not writing a special effects encyclopedia, so you're supposed to see all kinds of cool, super-awesome effects, and I'm sorry, it's almost not in this book. This has a lot to do with a book, and I can be sure that a person who has just started learning has no way to become a "shader God." I hope that all the people who have read this book can really be clear about what shader is, not saying, "Oh." Shader, that's what you get in unity right create->shader. "

      On the issue of special effects, assuming that in the future I have full experience and qualifications, may actually write a book, hahaha


      Writing a book is a very not easy thing, I hope I can do it well.





2015.12.21 update: About when to publish


Many friends leave a message or e-mail asked me when to publish, I am more anxious than you ... Just the editor says it's still changing and typesetting, and the approximate publication time will be next January (hopefully not postponed). Thank you for helping me with my name. I gave some names to the editors to see them. and discuss with friends. Finally, it is tentatively " Unity Shader Essentials." Is that nasty? Don't hit me ... The following have a lot of friends from the name of the very many Meng, using the next program of the identity of the yuan, but it, it is different from each other, perhaps some people do not like Cheng writing books ... So I finally picked out the more serious name, uh.

The cover of the book I also find the Almighty designer orchid friend Design ~

It's not published, so hit the watermark.

Of course, the editor is only allowed, but it should be changed. I don't know what people think about the cover. I think it's cute. Ha ha.




Overall structure



I have divided this book into five chapters:

    • Basic: This is a very important chapter, mainly for people who have just started learning to popularize the main theoretical knowledge, as well as the necessary mathematical basis.

      I am clear that very many people do not understand some of the material on the Internet. I try to speak in plain English.

    • Shader0 Basics: Start with the simplest shader and explain the basic lighting models, textures, and transparency effects in shader.

      At the same time. Also will introduce some shader debug technique, shader common error information.

    • Shader Intermediate: This is the advanced chapter, will explain more complex lighting, high-level texture, and how to use shader to achieve a series of advanced content such as animation;

    • Shader Advanced: It covers some of the advanced uses of shader, such as using buffers, implementing screen effects, non-photorealistic rendering, and more. At the same time, some optimization techniques will be introduced.

    • Extension: Will cover some of the mechanisms behind Unity Surface shader. It also provides a brief analysis of some of the new features in the Unity 5.0+ version number. At last. I hope to introduce you to the experience and resources of learning shader.

Now the folder has been initially finalized. Record the folder here, but I will keep updating it.



If you have any comments or suggestions on the folder and content of the book, you can leave a comment below. Suppose you don't have a CSDN account. You can also tell me by email: lelefeng1992 # gmail DOT com.

I will make certain changes to the folder and the content according to your opinion.





Folder (complete)



* Preface
* What does the book say?
* What you need to know before you read this book
* Who is suitable to read this book
* Who is not fit to read this book?
* Convention
* Reader Feedback
* Source code of the book

The 1th part of the basic article

  • 1th Chapter Welcome to the world of shader

    • 1.1 Program Ape's three great romance: why learn Shader
    • 1.2 This is not a program ape a man's fight
    • 1.3 The world is so big
  • 2nd Chapter Rendering Line

    • 2.1 Reviews
      • 2.1.1 What is an assembly line
      • 2.1.2 What is a rendering pipeline
    • 2.2 CPU and GPU communication
      • 2.2.1 Loading data into video memory
      • 2.2.2 Setting Rendering status
      • 2.2.3 Calling Draw Call
    • 2.3 GPU Pipelining
      • 2.3.1 Overview
      • 2.3.2 Vertex Shader
      • 2.3.3 Cropping
      • 2.3.4 Screen Mapping
      • 2.3.5 Triangle Settings
      • 2.3.6 Triangle Traversal
      • 2.3.7 Chip Shader
      • 2.3.8 per-slice operation
      • 2.3.9 Summary
    • 2.4 Some easy and confusing places
      • 2.4.1 What is Opengl/directx
      • 2.4.2 What is HLSL, GLSL, CG
      • 2.4.3 What is draw call
      • 2.4.4 what is a fixed rendering pipeline (Fixed-function Pipeline)
    • 2.5 So. Are you clear about the shader?
    • Extended Reading
  • 3rd Unity Shader Foundation

      • 3.1 Unity Shader Overview
        • 3.1.1 Pair of good brothers: material (Material) and Unity Shader
        • 3.1.2 The material in unity
        • 3.1.3 Unity in the shader
      • 3.2 Unity Shader Foundation: Shaderlab
        • 3.2.1 What is Shaderlab
      • 3.3 Unity Shader's structure
        • 3.3.1 gave our Shader a name: Shader.
        • 3.3.2 Material and Unity Shader Bridge: Properties
        • 3.3.3 Heavyweight member: Subshader
        • 3.3.4 left a way: Fallback
        • 3.3.5 Shaderlab Do you have any other semantics?
      • 3.4 Unity Shader Form
        • 3.4.1 Unity's darling: Surface Shader
        • 3.4.2 's Smartest kid: Vertex/fragment Shader
        • 3.4.3 abandoned corner: Fixed Function Shader
        • 3.4.4 So, what kind of unity shader form to choose
      • 3.5 Book using the Unity shader form
      • 3.6 FAQ
        • 3.6.1 Unity Shader! = Real Shader
        • 3.6.2 the relationship between Unity shader and CG/HLSL
        • 3.6.3 can I use GLSL to write?
      • Extended Reading
  • 4th. The mathematical basis required for learning shader

    • 4.1 Background: Farm games
    • 4.2 Cartesian coordinate system
      • 4.2.12-d Cartesian coordinate system
      • 4.2.23-d Cartesian coordinate system
      • 4.2.3 left-hand coordinate system and right-hand coordinate
      • 4.2.4 Unity uses the coordinate system
      • 4.2.5 Exercises
    • 4.3 Points and vectors
      • 4.3. Differences between 1 points and vectors
      • 4.3.2 Vector Operations
        • 4.3.2.1 vector and scalar multiplication/division
        • Addition and subtraction of 4.3.2.2 vectors
        • The modulus of 4.3.2.3 vector
        • 4.3.2.4 Unit vector
        • dot Product of 4.3.2.5 vectors
        • Cross product of 4.3.2.6 vectors
      • 4.3.3 Exercises
    • 4.4 Matrix
      • Definition of the 4.4.1 matrix
      • 4.4.2 and vectors linked together
      • 4.4.3 Matrix Operations
        • Multiplication of 4.4.3.1 matrices and scalars
        • Multiplication of 4.4.3.2 matrices and matrices
      • 4.4.4 Special matrices
        • 4.4.4.1 block Matrix
        • 4.4.4.2 Unit Matrix
        • 4.4.4.3 Transpose Matrix
        • 4.4.4.4 Inverse matrix
        • 4.4.4.5 orthogonal matrix
      • 4.4.5 row matrix or column matrix
      • 4.4.6 Exercises
    • 4.5 Geometric meanings of matrices: transformations
      • 4.5.1 Homogeneous coordinates
      • 4.5.2 Decomposition Base transformation matrix
      • 4.5.3 translation Matrix
      • 4.5.4 Scaling Matrix
      • 4.5.5 rotation matrix
      • 4.5.6 Combination Transformation
      • 4.5.7 Exercises
    • 4.6 Coordinate space
      • 4.6.1 Why use so many different coordinate spaces
      • Transformation of 4.6.2 coordinate space
      • The coordinate space transformation process of 4.6.3 vertex
        • 4.6.3.1 case
      • 4.6.4 model Space
        • 4.6.4.1 case
      • 4.6.5 World Space
        • 4.6.5.1 case
      • 4.6.6 observation Space
        • 4.6.6.1 case
      • 4.6.7 clipping Space
        • 4.6.7.1 Perspective projection
        • 4.6.7.2 orthogonal projection
        • 4.6.7.3 case
      • 4.6.8 Screen Space
        • 4.6.8.1 case
      • 4.6.9 Summary
    • 4.7 Normal Transformations
    • 4.8 Built-in variables in Unity shader (Math article)
    • 4.9 FAQ
      • 4.9.1 using a 3 x 3 or 4 x 4 transformation matrix
      • Vector and matrix types in 4.9.2 CG
      • 4.9.3 screen coordinates in unity: Computescreenpos/vpos/wpos
    • Answers to the exercises
    • Extended Reading

Part 2nd 0 Basic article

  • The 5th chapter begins unity Shader Learning Journey

      • 5.1 The software and environment used in the book
      • 5.2 One of the simplest vertex/fragment Shader
        • 5.2.1 vertex/fragment Shader Basic Structure
        • 5.2.2 where the model data comes from
        • 5.2.3 How to communicate between vertex shader and slice shader
        • 5.2.4 How to use attributes
      • 5.3 Powerful Helping hand: Uni The built-in files and variables provided by Ty
        • 5.3.1 Included files
        • 5.3.2 built-in variables
      • 5.4 Unity provides CG/HLSL semantics
        • 5.4.1 What is semantics
        • 5.4.2 Unity-supported semantics
        • 5.4.3 How to define complex variable types
      • 5.5 Program Ape troubles: Deeeeebug
        • 5.5.1 using false color images
        • 5.5.2 using artifact: Visual Studio
      • 5.6 Caution: Differences in render platform
        • 5.6.1 coordinate differences for rendered textures
        • 5.6.2 shader Syntax differences
        • 5.6.3 Shader Semantic differences
        • 5.6. 4 other platform Differences
      • 5.7 shader neat Way
        • 5.7.1 float, half or fixed
        • 5.7.2 canonical Syntax
        • li>5.7.3 Avoid unnecessary calculations
        • 5.7.4 caution with branching and looping statements
        • 5.7.5 do not divide by 0
      • extended Read
  • 6th basic Lighting in Unity

    • 6.1 How we see the World
      • 6.1.1 light source
      • 6.1.2 absorption and scattering
      • 6.1.3 coloring
      • 6.1.4 BRDF illumination model
    • 6.2 standard illumination Model
      • 6.2.1 Ambient light
      • 6.2 .2 Self-illumination
      • 6.2.3 Diffuse reflection
      • 6.2.4 Specular reflection
      • 6.2.5 pixel-by-node or per-vertex
      • 6.2.6 Summary
    • 6.3 ambient light and spontaneous light
    • 6.4 Diffuse Light model
      • 6.4.1 Practice: Per-vertex illumination
      • 6.4.2 Practice: per pixel illumination
      • 6.4.3 Improvement tips: Semi-lambert model
      • 6.5 Specular light model
        • 6.5.1 Practice: Per-vertex illumination
        • 6.5.2 Practice: per pixel illumination
        • 6.5.3 Blinn-phong modulo Type
      • 6.6 Summon the Dragon: Use unity built-in functions
        • 6.6.1 using built-in functions to rewrite unity Shader
  • 7th basic Texture

    • 7.1 Single-sheet texture
      • 7.1.1 Practice
      • 7.1.2 explanation
      • 7.1.3 Texture Properties
    • 7.2 Bump map
      • 7.2.1 Height texture
      • 7.2.2 Normal texture
      • 7.2.3 Practice
      • 7 .2.4 Interpreting the normal texture type in
      • 7.2.5 Unity
    • 7.3 Gradient Texture
      • 7.3.1 Practice
      • 7.3. 2 explanation
    • 7.4 Matte texture
      • 7.4.1 Practice
      • 7.4.2 explanation
      • 7.4.3 Other matte Textures
  • 8th Chapter Transparency Effect

    • 8.1 Why rendering order is important
    • 8.2 Unity Shader Render Order
    • 8.3 Transparency Test
      • 8.3.1 Practice
      • 8.3.2 Explanation
    • 8.4 Transparency Blending
      • 8.4.1 Practice
      • 8.4.2 Explanation
    • 8.5 Turning on the translucent effect of deep writes
      • 8.5.1 Practice
      • 8.5.2 explanation
    • 8.6 Shaderlab's Hybrid command
      • 8.6.1 Mixed equations and parameters
      • 8.6.2 Blending Operations
      • 8.6.3 Common types of blends

The 3rd part of the intermediate chapter

  • 9th. More complex illumination

    • 9.1 Unity's Render Path
      • 9.1.1 Forward Render Path
        • 9.1.1.1 the principle of forward rendering paths
        • 9.1.1.2 Forward rendering in unity
        • 9.1.1.3 built-in illumination variables and functions
      • 9.1.2 Vertex Illumination Render path
        • 9.1.2.1 vertex illumination rendering in unity
        • 9.1.2.1 accessible built-in variables and functions
      • 9.1.3 Deferred render Path
        • 9.1.3.1 the principle of deferred rendering
        • 9.1.3.2 Deferred rendering in unity
        • 9.1.2.3 accessible built-in variables and functions
      • 9.1.4 which render path to choose
    • 9.2 Unity's Light source type
      • What is the effect of 9.2.1 light source type?
        • 9.2.1.1 Parallel Light
        • 9.2.1.2 Point Light source
        • 9.2.1.3 Spotlight
      • 9.2.2 working with different light types in forward rendering
        • 9.2.2.1 Practice
        • 9.2.2.2 explanation
        • 9.2.2.3 Experiment: Call of Base Pass and additional pass
    • 9.3 Unity's Light attenuation
      • 9.3.1 Texture for light attenuation
      • 9.3.2 calculating attenuation using mathematical formulas
    • 9.4 Unity's Shadow
      • How the 9.4.1 shadows are realized
      • 9.4.2 the shadow of an opaque object
        • 9.4.2.1 Objects to cast shadows
        • 9.4.2.2 Let objects receive shadows
      • 9.4.3 using the Frame debugger to view the shadow drawing process
      • 9.4.4 Unified management of light attenuation and shading
      • 9.4.5 using transparency to test the shadow of an object
  • 10th Advanced Textures

    • 10.1 Cube Texture
      • 10.1.1 Sky Box
      • 10.1.2 Creating a cube texture for environment mapping
      • 10.1.3 Reflex
      • 10.1.4 Refraction
      • 10.1.5 Fresnel reflex
    • 10.2 Rendering Textures
      • 10.2.1 Mirror Effect
      • 10.2.2 Glass Effect
    • 10.3 Procedural Textures
      • 10.3.1 to implement simple procedural textures in unity
      • 10.3.2 Unity's program material
  • 11th chapter Let the screen move.

    • 11.1 Built-in variables in Unity shader (Time chapter)
    • 11.2 Texture Animations
      • 11.2.1 Sequence Frame animation
      • 11.2.2 Scrolling Background
    • 11.3 Vertex Animation
      • 11.3.1 flow of rivers
      • 11.3.2 Billboard
      • 11.3.3 Precautions

Part 4th Shader Advanced Chapter

  • 12th Chapter Screen post-processing effect

    • 12.1 Creating a major screen post-processing scripting system
    • 12.2 Adjusting brightness, saturation, and contrast
    • 12.3 Edge Detection
      • 12.3.1 What is convolution
      • 12.3.2 Common edge detection operators
      • 12.3.3 implementation
    • 12.4 Gaussian Blur
      • 12.4.1 Gaussian Filter
      • 12.4.2 implementation
    • 12.5 Bloom effect
    • 12.6 motion Blur
    • 12.7 Extended Reading
  • 13th. Using depth and normal textures

    • 13.1 Getting depth and normal textures
      • The principle behind 13.1.1
      • 13.1.2 How to get
      • 13.1.3 viewing depth and normal textures
    • 13.2 Talk about motion blur again
    • 13.3 Global Fog effect
      • 13.3.1 Rebuilding World coordinates
      • Calculation of 13.3.2 Fog
      • 13.3.3 implementation
    • 13.4 Further on edge detection
    • 13.5 Extended Reading
  • 14th Non-photorealistic rendering

    • 14.1 Cartoon-style rendering
      • 14.1.1 Rendering Contour Lines
      • 14.1.2 Adding highlights
      • 14.1.3 implementation
    • 14.2 Sketch-style rendering
    • 14.3 Extended Reading
    • 14.4 References
  • 15th. Using noise

    • 15.1 Ablation Effect
    • 15.2 Water wave effect
    • 15.3 Further talk about the global fog effect
    • 15.4 Extended Reading
    • 15.5 References
  • 16th. Rendering optimization technology in unity

    • 16.1 features of the mobile platform
    • 16.2 factors that affect performance
    • 16.3 Rendering analysis tools in unity
      • 16.3.1 Understanding the rendering statistics form for unity 5
      • 16.3.2 the rendering area of the Performance Analyzer
      • 16.3.3 again on Frame debugger
      • 16.3.4 Other performance analysis tools
    • 16.4 Reducing the number of draw call
      • 16.4.1 Dynamic Batch Processing
      • 16.4.2 Static Batch Processing
      • 16.4.3 Sharing Materials
      • Considerations for 16.4.4 Batch Processing
    • 16.5 reducing the number of vertices that need to be processed
      • 16.5.1 Optimizing geometry
      • LOD Technology of 16.5.2 model
      • 16.5.3 occlusion Culling technology
    • 16.6 Reducing the number of slices that need to be processed
      • 16.6.1 Controlling drawing Order
      • 16.6.2 always alert for translucent objects
      • 16.6.3 reduce real-time illumination
    • 16.7 Bandwidth Savings
      • 16.7.1 Reduce texture size
      • 16.7.2 Using resolution Scaling
    • 16.8 Reduction of computational complexity
      • LOD Technology of 16.8.1 Shader
      • 16.8.2 Optimization of code
      • 16.8.3 scaling according to hardware conditions
    • 16.9 Extended Reading

The 5th part of the extended chapter

  • 17th Surface Shader Quest

    • 17.1 Example
    • 17.2 compile directive
      • 17.2.1 surface function
      • 17.2.2 illumination function
      • 17.2.3 Other optional Parameters
    • 17.3 Two structure
      • 17.3.1 Data source: input struct
      • 17.3.2 Surface Properties: Surfaceoutput structure
    • What's behind 17.4 unity
    • 17.5 Instance Analysis
    • Disadvantages of 17.6 Surface shader
  • The 18th chapter is based on physical rendering

    • Theoretical and mathematical Foundations of 18.1 PBS
      • What is 18.1.1 light?
      • 18.1.2 BRDF
      • 18.1.3 Diffuse Reflection Item
      • 18.1.4 Specular Highlights
      • 18.1.5 the PBS implementation in Unity
    • 18.2 Unity 5 's standard Shader
      • 18.2.1 how they're implemented.
      • 18.2.2 How to use standard Shader
    • 18.3 A more complicated example
      • 18.3.1 Setting the lighting environment
      • 18.3.2 placing the reflection probe
      • 18.3.3 adjusting the material
      • 18.3.4 linear Space
    • 18.4 FAQ
      • 18.4.1 What is global illumination
      • 18.4.2 What is gamma correction
      • 18.4.3 What is HDR
      • 18.4.4 So, what kind of game is PBS suitable for?
    • 18.5 extended Reading
    • References
  • 19th. What did Unity 5 update

    • 19.1 scenes "brighter"
    • 19.2 Surface shader more Easy "error"
    • 19.3 ownership: Control of non-uniform scale grid
    • 19.4 fixed pipeline shader gradually exiting the stage
  • Is there a lot of other stuff in the 20th chapter?

    • 20.1 Let's say you want to get a deeper look at rendering
    • 20.2 The world is so big
    • References


2015.06.28 Update


These days in the part of the math, I have long expected that mathematics is the most difficult to say, especially the matrix.

I'm like a lot of people. To the Matrix this guy is simply "disgusted". See it just want to escape. Helpless, shader inside must often deal with it. So. Just face it bravely!

I am very clear. Why are we so "annoying" matrices. Let's say that vectors like this can be visually understood by visual means, then. The matrix, which is placed in a small box of things. It is very difficult to draw it out in the way of painting. And our brains are very lazy (well, I can only speak for my brain), no picture you say a xxx. I don't bother remembering!

In fact, I have always had a kind of awe-inspiring attitude towards mathematics. There are a lot of mathematicians in the world who are philosophers and psychologists at the same time, and feel that mathematics is very important to understand the world, and the life of those mathematicians is very interesting. To be admired by others. The people who can contribute their life to mathematics are great, and those who create matrices, spaces, vectors are great. How do you think of such a way to describe such a phenomenon? It's really a wonderful thing. And. You will find. How can this be said to mean it? Obviously, it doesn't matter what it is! Such coincidences really make people sigh the greatness of mathematics.

Well, no longer crooked ... Back to the real world ... In the process of writing. I will try to use a popular, humorous, graphic way to talk about this chapter, how the effect. I am also very disturbed. Will it be reflected that you don't understand? Now everything is unknown ...

An interesting thing is when it comes to the right-hand coordinate system and the handedness. I made a model of my own hand:



Ha. This yellow hand is indeed my hand. Then I processed it with Photoshop.

Looks like it's going to work? Who dares to say my hand fat I with who urgent!

These days have been drawing, reading, writing, writing formulas (God, although it is very convenient to write formulas with markdown, but one day to write so many formulas are really ...). ), computation, hope the final result is good. Come on.


2015.07.10 Update

After writing for two weeks, the draft of the mathematics chapter was basically finished. Today updated the 2nd, 3, 4 chapters of the folder, interested to be able to look at. We welcome various comments and suggestions.

Math is the most I want to write well (of course. I will write the other chapters as well.

。。

)。 Maths is difficult to learn. Part of it is due to its abstract nature. No way. Assuming that we want to extract some of the laws from our lives, we must involve a variety of mathematical symbols, which will be abstracted. I've used a lot of graphs and cases to make this process even more visually understandable. Some similar dialogues have been used to explain some common doubts.

For now, the first article of the book-Basic form. Each chapter in the basic section is called a question-and-answer question, intended to summarize some common doubts, assuming that there are other puzzles beyond what I have written above. can give me a message. I will add to this section as appropriate.

In addition, in the Math chapter I added the part of the exercises. In fact, I have hesitated. Thought maybe everybody would jump over. It's not written in vain ... The part of this exercise is to be set. On the one hand, it is really hoped that the reader can really take a written calculation with these exercises. Math you don't really have to learn forever. There is one more aspect. is to put some easy confused points through the practice of the way to put forward, let the reader to calculate a deeper understanding. It would be a little more chaotic to assume that these confusing points were written in the book. Hope to play a better effect it ...

The following will really start the unity shader part.

Come on!


2015.07.29 Update

Spend most of the holiday to take a look at information, study, write a book. More than half a month to write the basic text of the draft, do not know whether it is fast or slow? I am confident that I write very specific, for example, the 5th chapter introduces the semantics, the 6th chapter introduces the basic illumination model, the 7th chapter writes to the bump mapping time also spends the very big space to introduce the realization principle and the detail, including the height diagram, the 8th Chapter transparency effect first introduced the render queue, I thought this very important, You should let the reader know how important the rendering queue is to transparency before learning how to achieve transparency. I think today's arrangement is good enough for people who have just started to learn, and of course it may be possible to make changes to the previous content when writing the latter. For example, now I want to add a matrix operation in unity script in the 4th chapter of Mathematics, but this book is about shader. I don't know if it's a good fit, but it's an easy place to go wrong.

Every time I talk about new things, I try to explain them as illustrations. Each picture is in the OmniGraffle earnest, hope later see the person can get to my meaning. Writing too much to write a blog is incoherent.

Recent QQ group, private messages and messages often have some problems, I am here to answer a unified. answer a few questions :

    1. When will the book be published?

      Everyone also saw my update speed. Now the 8th chapter (the first chapter is not written), the preliminary set is 19 chapters. That is to say one of the three points, I now spend about one months, but the book did spend a lot of time, after writing the basic article may slow down a bit. Overall, I guess it will take about three or four months to finish writing, so the publication of the words the fastest end, or early next year.

      Some people say it's too late, believe me, I want it to be published faster than anyone else, but I'm not a shadow. Good envy Naruto.

    2. Can you add some more difficult techniques?

      Some of the children's shoes look at the previous chapters of the folder and think the content is relatively simple. How to say, this book is targeted at the beginning of the study of the people, so it will certainly be easy to difficult, but I am confident that even the simple content I wrote very specific. A lot of very small points have been written. There are so many places that are so far away from the rest of the data that they are very confusing points. Suppose that you have not learned shader well. Even if I have been able to write a little bit now, I think this book is practical.

      More importantly, I don't want to write it as an encyclopedia. One of my own do not have enough experience, write not to Daquan, and secondly I think a book of books must write not fine, write not thin. What do you say you don't understand? Three come I think write shader is a teacher to lead the door to practice rely on personal life, once you understand its work flow and basic ideas, the rest is the accumulation of experience, you read, write more natural is bad, this is not a basic book can let you do.

      Of course, I do write some complicated techniques, and this is the work of high-level articles and extensions.

      Suppose you think there are some complicated techniques that you often use that you want to see in this book, To tell me.

    3. Is it a color book or a black and white book?

      I certainly hope is a color book, a picture of the effect of the book is actually black and white that's too bad. Just the editor told me that color printing would raise a lot of costs and that sales would fall. I can understand, but I don't have a verdict yet, and I'll try to get it when I finish writing.

      But I am also very curious, you think such a hundreds of-page full-color book, how much do you think the price is more appropriate?

2015.09.04 Update


I have finished the draft of the intermediate article intermittently. The more you write the feeling content of the more laborious arrangement, some content does not know to put them into which chapter more suitable, put early some content not to worry about the reader to see not clear, put late and think content is insufficient alone Cheng Zhang. The high-level article presumably will do the same. The folder is still being adjusted ...

Writing the 9th chapter of light is the most painful chapter except mathematics. Want to speak clearly very difficult ah, no matter what, the current content I tried, I hope to have a good effect.

Because of the content and miscellaneous, so this chapter unknowingly wrote 40,000 words, is now the most words of the chapter. Even so, still some content "obsession", such as modafinil light, edge light, and so on, do not know whether to join in the future.

Saying. Write a book when found a good free texture site--http://opengameart.org/, when writing some of the texture is found here, also recommended to you here.

Of course. There are also some textures of their own painting.

I made a 2D water surface before doing the game. This time the realization of it also added to the book.

Two more general drafts are complete. Some content wants to steal a little lazy. Use the dot blog to write.

。。 September is expected to catch up on the paper, the progress will be slower. Expected to be completed in November or December, I hope you can wait patiently. I'm going to refuel.



2015.10.20 Update

Well. It hasn't been updated for a long time. Since September has been doing something else, the process of writing books has been a bit sluggish. Keep you waiting! Just fine, in the November before the high-level draft part of the finished, I hope you see the folder can be comfortable today's content.

The 12th chapter is about the screen effect, OK, I admit I didn't want to write so much, because I started to say this is not a special effects encyclopedia. It's just a writing. I think that, uh, Gaussian blur is very important, can not be deleted, well, edge detection is very important. Because it can be linked with the back. Well. So the motion blur can not be deleted (there is also a link in the back).

So I wrote a lot of writing, just hope that you read the book can have some understanding of these screen effects. Knowing the fundamentals of their implementation, which is virtually identical in nature, makes sense when it comes to more complex screen effects.

The 13th chapter is about depth and normal caching. As a matter of fact, it seems to be less used on mobile platforms. It's just that I think this is a great way to expand your horizons so that you can see how these textures are used. Some of the content, such as motion blur and global fog effects, are part of the GPU Gems article. In fact, GPU gems is not that complicated. The 14th chapter is about non-photorealistic rendering. This chapter is not the focus, mainly to expand the field of vision, I chose the most popular cartoon style and very famous sketch style to do a sample. The 15th chapter is about the application of noise in shader, the application of noise is too wide ... The 16th chapter is the optimization demanded by many people. Well, there are four or five children's shoes. I say I want to learn some optimizations. As you wish:).

This chapter of the content of my previous blog, but of course it is not intact.

The content is more specific, and for unity 5 to make some adjustments and changes, I hope to have a revelation to everyone. One of the main purposes of the advanced chapter is to broaden our horizons. Know a lot of other technologies, so there's an extended reading section behind each chapter that gives all the information I can find that I think is very good. Can be listed in this part of the information, I strongly recommend readers to read, I believe you will have a very big harvest.

OK, finally put some high-level article to achieve the effect, welcome to make comments and suggestions.

And the last extension, plan to talk about the Unity 5 PBR and similar to Shadertoy, what do you think?

Well. I have been asked when I will publish, I do not know the exact time.

Write the last article about the beginning of November, and then I'll read it all over again. Make some adjustments and changes.

It's going to take about one months, too. That's December. And there may be a lab thing to do, so the publication will probably start early tomorrow. I hope you can wait a bit longer. It's just that. I am really grateful to all of you who have been supporting me, and to tell the truth that there are some burnout periods now. Just because there is a lot of support and encouragement of the voice to give a lot of new impetus, thank you. I still hope that you will be able to contact me with whatever advice you may have about the book. Greatly appreciated:)


2015.11.09 Update

Alas, I can't believe my speed, I actually kicked out in November ... Until today. All 20 chapters of the book are finished. I have made this change to all the chapters last week. Then to the editor ~ i have done my best, hope there will be good results!

    • About when to publish

      The editor said it would take about one months. See how long it takes to format my content. I will be in the blog in real-time update (probably will open another article)!

    • About the cover and title

      Well, in fact, before the publishing house to fill in the form of a name, "Unity Shader Entry Gold", is not considered very harsh ... assuming you have a better name, be sure to tell me, assuming the last use of the words must be free books !

      Cover words. The editor said I was able to make my own comments. I would like to use some of the Shadertoy founder IQ (http://www.iquilezles.org/www/articles/raymarchingdf/raymarchingdf.htm), such as the following (Ah Ah Ah iq is my idol ...) ):


      These effects are only used by a pixel shader, which is the best way to show the shader ability of a sample ah, there are wood!

      Plan to give the editor a look at the end of the match, and then contact Idol IQ to obtain permission:)

This is probably the last time this blog has been updated. I changed the book last week, although the folder is small, but most of the content is the above.

I hope everything goes well in the back. Thanks again for the support of our small partners. About the time of publication, the title, the cover, and so on, I will follow up in the back!

"My book" Unity Shader Book-folder (2015.12.21 update)

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.