When I was painting YouTube, I accidentally saw the implementation of a cartoon water. The original Shader was made by hand, but I used Unity ShaderGraph to reproduce it. The principle is to obtain the scene depth of the opaque queue through the Camera depth map. The difference between the depth of the opaque queue and the depth of the water surface element is used as the water depth basis to render the waves through the noise map, and realize the wave animation through UV perturbation Get the "depth" of water ……

Briefly record the implementation of two simple shaders recently encountered. The length of a single article is too short, so the two articles are combined into one article. The effect is commonly seen in XR manufacturer's protection center software (or safety zone, play area, etc.). The main feature: by default, it displays the dynamic wall effect (water ripple, breathing clouds) of Gemei. When the handle/hand/head is close to the wall, a hole will be opened on the wall, supplemented by a red warning prompt to leave the wall ……

When playing Battlefield 2042, I found a large screen simulating the display of RGB pixels: the content in the far view is a complete image, and the close view is a glowing RGB pixel. This effect is very interesting. It can be reproduced in Unity. The effect of the implementation is the screenshot moving picture (GIF). The content of this article is implemented with Unity, but some of the content is referred to the Unreal E of Youtube/Jam2go ……

The question "Shader created through the right-click menu under URP does not display any content" diverges, which extends the discussion of URP DepthPrepass. The reason for the above problem is that under the URP default pipeline, before rendering opaque objects, if there is one of the following situations, depth writing pass will be executed first: Depth Texture/N is required for RenderFeature ……

A long time ago, I used Stencil Test in a 3D sliding list. This review, I try to use it to make a double-sided through the door. The effect principle is to write a value into Stencil Buffer. In the subsequent rendering of other tiles at the same location, if template testing is enabled, the preset value will be compared with the value in Stencil Buffer (i.e. Test), based on the comparison result ……

The sharing video of Unity Japan meetup 2019 was flashed on Youtube. The sharing of ShaderGraph is very good. Follow me to learn. Foreword: ShaderGraph energy shield (I): contact surface detection and edge illumination Shader mainly includes the following contents: contact surface detection, edge illumination, UV disturbance and map blending space distortion (or ……

It is a common requirement, but the shaders found generally only consider 1:1 rectangles. These shaders can be used in square images such as head portraits, but when used as rectangular images, rounded corners will deform. Why use Shader If you use Mask, there will be an additional DrawCall. Shader transformation The found Shaders are similar to each other, so you can find one to modify at random. Only discuss repair ……

Before topology layout and flow display, I studied two algorithms, one of which is force oriented graph layout algorithm. Let me briefly talk about the idea of force oriented graph and why ComputeShader should be used. The principle shows that I use a cube to represent nodes. The following is the layout preview of the two algorithms. This article only discusses the latter. 1. Domain based layout (not discussed in this article) 2 3D force guidance layout (in layout, the optimal position has not been reached yet ……

This is an example of combining ComputeShader with Shader to realize particle fountain. Calculate the position of fountain particles through ComputeShader, and draw them through Shader. The effect principle generates a specified number of point data with random speed, ComputeShader superimposes its initial velocity and gravity acceleration, and roughly calculates its position according to the survival time ……

This is an example of how ComputeShader combines with Shader to achieve snow. We calculate the position of each snow particle in parallel through ComputeShader, and draw it through Shader. The effect principle calculates the position of each particle in parallel through ComputeShader, and shares the Buffer with Shader, Shader at corresponding position ……

One of the functions of Unity real sight to be realized in the project is the reflective red dot sight. The Shader analyzed in this paper achieves a more realistic effect by simulating the optical principle of the reflective collimator. Effect picture This picture shows the effect of viewing the red dot collimator from different angles. The principle of the red dot collimator The special feature of the reflective red dot collimator is that no matter whether the eyes and the shooting door are in a line of three, as long as the red dot is set on the target ……