Is it possible to remove a triangle from visualization using vertex shaders?

In a pixel shader, you can drop a pixel, but I would suggest that even a fast-fail shader called for each pixel takes nontrivial time? Is there a way that the vertex shader can drop the whole triangle ... I'm sure VS cannot access the primitive, but are there any tricks that can help us get the same result?

The discussion of SM 3.0 is here - for the sake of completeness, the discussion of new versions is welcome.

+3
source share
1 answer

A geometric shader can do this trivially, as you probably know, but there is no such thing in SM3.

, , . ... .

w , . w , , .

gl_ClipDistance ( , , ). "" . , .

, , , ... , (, , - , # 5 - ).

+1

Source: https://habr.com/ru/post/1794677/


All Articles