PDA

View Full Version : Fragment Reproduction



glfreak
04-30-2004, 10:14 PM
Hi,

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?

Thanks.

-NiCo-
05-01-2004, 05:31 AM
Take a lok at the GL_ARB_point_sprite extension. You can find it at http://oss.sgi.com/projects/ogl-sample/registry/ARB/point_sprite.txt
This might be what you're looking for

glfreak
05-01-2004, 08:59 PM
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?

glfreak
05-01-2004, 09:40 PM
The problem is not specific to point sprites.
I mean is there any way to output multiple fragments using fragment programs?

Chris Lux
05-01-2004, 10:15 PM
no ist is not possible, due to the stream processor architecture of the programmable processors (one element in, one element out).

HTH

glfreak
05-01-2004, 11:09 PM
Then fragment shaders are almost useless.
At least there should be some way.

Mazy
05-02-2004, 12:02 AM
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.

glfreak
05-02-2004, 02:00 AM
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.

Tom Nuydens
05-03-2004, 06:58 AM
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

V-man
05-03-2004, 11:01 AM
>>>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.