Unity Rendering Principle (15) Unity's Light Attenuation and Opaque Object Shadows
Let’s move on to the last part of Unity lighting, the decay
Let’s move on to the last part of Unity lighting, the decay
When I was working this week, I saw the use of physical materials in the project, and I realized that I had never used it, and I didn’t know the relationship between him and other physical components such as rigid body, so I read the official doc again., for some practice and summary.
A world with only one parallel light is nice, but we really just need to deal with more complex light types and a larger number of light sources in Unity Shader.
In the previous lighting model, we only had one light source, and it was parallel light. But in the actual development process, we often need to deal with a larger number of more complex types of light sources, and importantly, we need to get shadows. Now we’re going to learn how to deal with these more complex lights.
Recently, when writing the packaging pipeline, I encountered several pits, so I will summarize it a little.
After introducing a new plugin into the project this week, local debugging is normal, but some files will be lost when a large package comes out. After checking for a long time, I found that it is because the file is not directly referenced, and it is through’ScriptableObject. CreateInstance (typeName) 'This form was dynamically created, so it was finally packed and removed by the code clipping process.
The solution is also relatively simple, add a link.xml in the Assets directory, and then declare that the assembly cannot be trimmed.
But looking back, we still need to take a look at the logic of this code clipping and why link.xml can avoid code clipping.
Transparency is a scene often used in games. To achieve transparency in real-time rendering, you usually control its transparency channel when rendering the model. When transparent blending is enabled, when an object is rendered to the screen, each element has another property, transparency, in addition to its color value and depth value. When transparency is 1, it means that the pixel is completely opaque, and when it is 0, it means that the pixel will not be displayed at all.
In Unity, we usually use two methods to achieve transparency effect: the first is to use transparency test (Alpha Test), this method can not actually get the true translucent effect; the other is transparency blending (Alpha Blending).
Today, I finally got through the knowledge of higher mathematics, but because the whole process is long and there are many knowledge points, they are all fragmented and not systematic, so I thought I would take this opportunity to generally sort out all the knowledge points once.
The reason why this article suddenly started, because this week’s work, the use of singleton mode to achieve a function, in the code review, was pointed out as far as possible not to use singleton mode, gave me a few articles to see, harvest some content, so systematically summarize.
Continuing with the previous blog, let’s discuss basic textures. This time we will discuss gradual change textures and mask textures