i’ve got a problem there. I actually working on my bachelor thesis: Displacement Mapping with Tessellation
I’m almost done with it but what is left is a triangle/vertix count.
The normal jme statistics are only giving me the triangle count of my base object, for example my quad, if i increase my tessellation level now the triangle count doesnt increase.
The number of triangles is obviously increasing. I guess i have to get the number out of the shader (control or evaluation), but i have no idea how to do it.
If you need some code to get an idea, just tell me, i can show you some as soon as i am at home.
Are you using a tessellation shader or something? Like… a modified JME?
JME reports the triangles that it dispatched. If you are creating the triangles on the CPU and it is not reporting them then something is wrong with how you are updating the mesh.
If you have modified JME to support tessellation shaders then you will have to see if there is some way to further modify it to get the rendered triangle count from the GPU (I know nothing about tessellation shaders).
I also haven’t delved into tesselation shaders, but I know they are all the rage these days. I became more interested in them watching a few pixar documentaries which they can create extra detail in only places that need it.
It’s called OpenSubDiv, and was used a lot in Monsters University (awesome film btw). There might be some helpful code somewhere in there.
<cite>@wezrule said:</cite>
I also haven't delved into tesselation shaders, but I know they are all the rage these days.
I remember them for few years back when people were crazy about them and then I thought they died for most purposes and now geometry shaders are the ‘hot’ topic. Has something changed in past few years or am I confused?
@abies said:
I remember them for few years back when people were crazy about them and then I thought they died for most purposes and now geometry shaders are the 'hot' topic. Has something changed in past few years or am I confused?
I think that's the other way around.
Some say tesselation shaders made the geometry shader useless.
@Chief don’t you know how you tesselate your triangles? I think you control how many triangles are generated through the inner and outer level in the control shader. Depending on those params you can know how many triangles are generated for esch original triangle.
But you’ll have to compute that yourself on the cpu side and display it on screen. there is no way to get this information back from the GPU.
I’m not an expert in tesselation though, so I might be mistaken.
Anyway I’m pretty interested in your work. It’d be wonderful to have some feedback when you’re done.
Primitive queries are the collective name for the GL_PRIMITIVES_GENERATED and GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN query object types. These are used for detecting how many primitives were generated during one or more rendering operations. This is primarily used for Transform Feedback, particularly in cases where the number of items to be generated by a geometry and/or Tessellation Shader depends on the data provided
@Chief don’t you know how you tesselate your triangles? I think you control how many triangles are generated through the inner and outer level in the control shader. Depending on those params you can know how many triangles are generated for esch original triangle.
But you’ll have to compute that yourself on the cpu side and display it on screen. there is no way to get this information back from the GPU.
That will be the point where I will start to investigate in the next days, but I have to make a pre-presentation for my professor and his department. After I have done this I will try to implement the counter.