PDA

View Full Version : Point primitives & clipping



Groovounet
07-19-2011, 12:52 PM
Hi guys,

A little question that raised my interest by I can't find proper details on this topic in the specification:

How point primitive should be clipped?
- Relatively to the vertex position? (AMD)
- Relatively to the vertex position and the point size (NVIDIA)

AMD behaviours made sense regarding others primitives but eventually leads to rendering artefacts, popping because of the clipping and effectively vanishing many uses of point rendering.

Any idea?

Thanks!

Alfonse Reinheart
07-19-2011, 01:46 PM
The spec says that points are clipped based on their position.

Groovounet
07-19-2011, 02:25 PM
Do you have a quote for that? Where did you find that? Was it something for all primitives or precisely to point primitives?

McLeary
07-20-2011, 09:11 AM
AFAIK, points primitives aren't big enoght so they cannot be represented by it's position.

Alfonse is referencing the OpenGL specification

http://www.opengl.org/registry/doc/glspec41.core.20100725.pdf

aqnuep
07-21-2011, 12:48 AM
Yes, in fact AMD's behavior is correct in this case, points should be clipped based on their position:


If the primitive under consideration is a point, then clipping passes it unchanged if it lies within the clip volume; otherwise, it is discarded.

OpenGL spec chapter 2.20 Primitive Clipping

Groovounet
07-21-2011, 04:01 AM
Yes, in fact AMD's behavior is correct in this case, points should be clipped based on their position:


If the primitive under consideration is a point, then clipping passes it unchanged if it lies within the clip volume; otherwise, it is discarded.

OpenGL spec chapter 2.20 Primitive Clipping

Good catch!

But not nice! :p This is a point of divergence with OpenGL ES 2.0. I really don't see the point (ahah :D) for this choice.

Alfonse Reinheart
07-21-2011, 05:51 AM
This is a point of divergence with OpenGL ES 2.0.

It is neither the first nor the last. And this was OpenGL's behavior before ES 1.0. The divergence is theirs.