top of page
Search

Vertex eraser

  • Peter Taschner
  • Nov 17, 2019
  • 1 min read

Updated: Jan 30, 2020

With this material function, you can skip the unwanted vertices in the mesh to be more efficient or to make cool disappearing effects. You just have to connect the output pin to the "World Position Offset" input. For example it can be used with opacity or opacity mask values. If the value is greater than 0, the shader does not offset the mesh. If it isn't greater, then the shader discards the entire vertex and any further calculations because of the "square root of -1" value. Keep in mind that the "if" conditional has an impact on performance, because the shader always calculates all the branches, so be sure to use light calculations when a conditional is in use. There are static and dynamic branching cases. In the first case, The branch can be evaluated in compile time. That won't make any impact on performance. Also, when a vertex is discarded, all the triangles will be discarded that were connected to that vertex point.


 
 
 

Comments


Post: Blog2_Post
  • LinkedIn
bottom of page