当前位置:网站首页>Pit of smoothstep node in shadergraph
Pit of smoothstep node in shadergraph
2022-06-30 04:57:00 【LintonL】
ShaderGraph in SmoothStep node , Introduction in the document :
If input In The value of is in the input Edge1 and Edge2 Between the values of , return 0 and 1 Between the smooth Hermite interpolation results . If input In The value of is less than the input Step1 Value , return 0; If it's greater than the input Step2 Value , return 1.
This node is similar to Lerp node , But there are two significant differences . First , When using this node , User specified range , The return value is between 0 and 1 Between . This can be seen as related to Lerp node contrary . secondly , This node uses smooth Hermite interpolation , Instead of linear interpolation . This means that the interpolation will gradually speed up from the beginning , And slow down near the end . This is for creating natural animations 、 Fade in, fade out and other transitions are very useful .
Specific reference Smoothstep node | Shader Graph | 10.5.0
then , I encountered a problem when making case contact

How does this figure pass through SmoothStep Node to get the gradient bar , After many tests, I got the result , Not necessarily right , Some big guys know the principle , We can discuss .
Pictured above ,edge1 Is the coordinates of the model itself Y value , Values for 0 to 1,edge2 by Offset value , For an externally adjustable threshold ( Control where the black belt appears ),In The value is Offset Subtract one -0.5 to 0 A value of ( Controls the width of the black band in the graph ), If you do not change the value , Then only edge1 It is changing. ,edge1 from 0 Change to 1 The process of ,edge1 The value of edge2 near ,edge1 and edge2 The distance is getting smaller and smaller , And because of In The value of is always higher than edge2 A small fixed value ( Width ), So the final output is getting closer edge1 Of , namely in It changes from white to black ( See the node explanation above , In between , Is from the closer edge1,in Values tend to 0, On the contrary, it tends to 1, And not linear ), In this case ,edge1 from 0 Change to In Value can explain . From the following figure , After the results are flipped , Obviously , The lower half is gradient , Not solid .
And then there was edge1 Greater than In The value of , That's it In Less than edge1, return 0; Here's the picture , I did the result Step operation , Less than 0.01 Of , This is the part .

Then why did it turn white again , This is what I have been thinking about before , He when edge1>edge2 When , He can't form an interval , Greater than edge2 by 1, Less than edge1 by 0, Between the two is 0-1 change , These three cases are combined , There are intersections , There will be less than edge1, More than dege2, What is the result of this situation , After my test , The conclusion is that ,In Value close to which , It is the output value of which to follow , Here's the picture .


thus , This operation is also fully explained , And the results are consistent with the actual display .
边栏推荐
- 力扣589:N 叉树的前序遍历
- svg和canvas的区别
- JPA composite primary key usage
- Unity realizes rotation and Revolution
- How does unity use mapbox to implement real maps in games?
- Connect to the database and run node JS running database shows that the database is missing
- [control] multi agent system summary. 4. control agreement.
- On mask culling of unity
- Brew install NVM command not found solution
- 【Paper】2021_ Observer-Based Controllers for Incrementally Quadratic Nonlinear Systems With Disturbanc
猜你喜欢

Unity3d Google Earth

力扣209. 长度最小的子数组

【Paper】2020_ Research on defense and evaluation strategy of heterogeneous UAV formation_ Zuojiankai

力扣977. 有序数组的平方

Unity3d realizes Google Digital Earth

Deeply understand the function calling process of C language

Pycharm database tool

Redis implements SMS login function (II) redis implements login function
![[fpga] implementation of IIC read / write EEPROM](/img/6a/36e9355058a90d98cffafcbaa1930b.png)
[fpga] implementation of IIC read / write EEPROM

One command to run rancher
随机推荐
Deeply understand the function calling process of C language
【Paper】2017_ Research on coordinated control method of underwater vehicle formation marine survey
【Paper】2019_ Distributed Cooperative Control of a High-speed Train
Preorder traversal of Li Kou 589:n fork tree
Marvel fan welfare: Singapore Madame Tussauds Wax Museum Marvel 4D experience Museum
Basic operations of Oracle data
Webots notes day 2
【Paper】2021_ Analysis of the Consensus Protocol of Heterogeneous Agents with Time-Delays
Thread safety and processing caused by multithreading
Unity3d lookat parameter description
C # Foundation
Important knowledge points in unity3d
Keywords implements and @override
Harbor API 2.0 query
Exploration of unity webgl
Unity ontriggerenter does not call
Pourquoi l'ordinateur n'a - t - il pas de réseau après l'ouverture du Hotspot win10?
Unity realizes rotation and Revolution
Draw on screen border in Commodore 64
Connect to the database and run node JS running database shows that the database is missing