Fragment Reproduction


How do I generate fragments based on single point.
I mean if I render one point of pixel size = 1, and want to make a point sprite effect in fragment progs, is it possible to add multiple frags around the rendered pixel?


Take a lok at the GL_ARB_point_sprite extension. You can find it at
This might be what you’re looking for

I want to only use fragment programs to output multiple fragments based on one incoming fragment.
Is this possible in OpenGL shading progs, or in Direct3D?

The problem is not specific to point sprites.
I mean is there any way to output multiple fragments using fragment programs?

no ist is not possible, due to the stream processor architecture of the programmable processors (one element in, one element out).


Then fragment shaders are almost useless.
At least there should be some way.

Useless is a pretty hard word… many people seems to think they are one of the mose usefull new things since opengl was invented.

often you can du what you want by using gathering of data instead of scattering. exacly how this can be done in your case is pretty hard to tell since you not giving any specific reason yo scatter the data.

I want to create procedural billboards based on point primitive input. Something like sparks without using point sprites.

I still don’t understand what is wrong if fp supports mutipile frags at once.

Can you tell us why you refuse to use ARB_point_sprite? The functionality you need is there, why do you insist on implementing it some other way?

– Tom

>>>I still don’t understand what is wrong if fp supports mutipile frags at once<<<

The hw doesn’t support it simply.

For now, it’s a basic pipe. 1 in, 1 out or 1 in 0 out.

With MRT, it will be 1 in, 4 or so out but I dont know how to write multiple times to the same buffer, but in different location.