Shader Graph15-DDX, DDY (pixel derivative)

1. Unreal version

        First obtain the vertex coordinates, DDX is the derivative at the vertex in the horizontal direction, DDY is the derivative at the vertex in the vertical direction, and the derivative is the tangent direction. Cross is to calculate the cross product, that is, the plane normal vector perpendicular to DDX and DDY, and then connect it to the Normal interface through TransformVector conversion, forming the appearance of a disco light ball.

2. Unity version

        Note here that the source of Transform is changed to World and the target is changed to Tangent.

Supongo que te gusta

Origin blog.csdn.net/zhuziying99/article/details/130518972
Recomendado
Clasificación