Performance Difference Between Geometric Shader and Vertex Shader

Currently, I present a model of about 1 million vertices. And inside the vertex shader, I do a complicated calculation for each vertex. Now I would like to increase the resolution of the model. I have two questions regarding this:

  • Is it possible to use a geometric shader to increase resolution to very large factors, for example 64 times?
  • If I introduce a geometric shader, I may need to move the calculations from the vertex shader to the geometric shader. Does the operation in verterx shader do the same thing as doing it in the geometric shader in terms of performance.
+7
source share
1 answer

Is it possible to use a geometric shader to increase the resolution to very large factors, such as 64 times.

Absolutely not. Although GS can enhance geometry and perform tessellation, this is not exactly what they are intended for. Their main goals are processing feedback data with conversion (in particular, hardware that can handle multi-threaded output) and multi-level rendering.

If I introduce a geometric shader, I may need to move my calculations from the vertex shader to the geometric shader. Regardless of whether the operation is performed in the verterx shader, as it is done in the geometric shader in terms of performance.

Do as little work in GS as possible. GS occurs after the cache after T & L, and you want to get as much as possible from this. Therefore, make sure that your real transformational work is reasonable in the vertex shader.

+6
source

All Articles