Hi all.

Have you all noticed that the time for Draw is dramatically more expensive 
for a shader based scene compared to fixed functionality?

I have the most basic shader possibility comparing to a fixed functionality 
rendering pipeline. The difference in Draw call is:

1.3 ms (fixed) compared to *3.74ms* (shader) in a scene with 300 boxes. 
7776 vertices, 3886 triangles.

RTX2080. Windows 10. OSG 3.6.4.

It feels kind of bad to start with a huge overhead already from the start.
For larger scenes the difference shrinks. Still very much noticeable.
With a stupid scene with 10000 drawables (same boxes) difference between 
"empty" shader is < 10%.
But with a diffuse/specular shader, the difference jumps up to 100% 
compared to fixed pipeline.

What is your experience in this?

*draw.vert:*
#version 440 
layout (location = 0) in vec4 osg_Vertex;
layout (location = 1) in vec3 osg_Normal;

uniform mat4 osg_ModelViewProjectionMatrix;

void main()
{ 

  gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
}

*draw.frag:*
#version 440 
layout (location = 0) out vec4 outColor;
void main (void)
{
  outColor = vec4(1,0.4,1,1);
}

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/e16d7f3b-0e11-435d-847f-30760bdbf0e2n%40googlegroups.com.

Reply via email to