Can I use the costomized rasterization algorithm by GLSL?

Hi.

I’m not good at English well, so please understand me. :slight_smile:

I am beginer, study OpenGL for studying graphics performances.
OpenGL Architecture has the Vertex Processor and Fragment Processor. So, we can program in the two cases.
Then, I would like to use the customized rasterization algorithm. But, I don’t know how to do it.

Just assume that have some rasterization algorithms.

You can, but only by co-opting a fragment shader for that purpose. Basically, you draw a screen-space polygon over the area where the rasterized primitive will appear, then use discard and other fragment shader mechanisms to “rasterize” your actual primitive.

But in general, it’ll probably be faster to just render a triangular mesh that approximates your surface.

Thanks a lot, Reinheart!
You give me the answer:)

Just out of curiosity, why would you want to use your own rasterization algorithm? Do you have high-performance needs or simply want something rendered on the screen? Before perverting fragment shaders in that fashion, wouldn’t a CPU implementation do as well?

I wonder why you would want your own rasterization . I do think it would be cool to do ray tracing with ‘real’ ambient occlusion algorithms on the fragment shaders, by defining your inworld objects using mathematical surfaces etc… I wonder what kind of permormance you could get… with a limited amount of objects maybe even real time?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.