|
![](/i/fill.gif) |
Orchid XP v8 <voi### [at] dev null> wrote:
> Also, how about random number generation? Is this "easy" to do on a GPU?
Even if pixel shaders didn't have some RNG available (I don't know if
they have), a simple linear congruential generator should be rather
trivial to implement.
(OTOH that means that the LCG would have to store the seed somewhere
so that the next time the shader is called it can use it. Again, I don't
know if that's possible. There could well be parallelism problems with
that.)
> Could you do something like rendering millions of tiny semi-transparent
> polygons of roughly 1-pixel size?
Why would you want to do that? There's no need. A pixel shader determines
the color of a screen pixel, so what else do you need? AFAIK, you don't even
need any polygons in order to fill the screen with the products of a pixel
shader (or you need at most one).
(The idea of pixel shaders is that if they are attached to a polygon,
when that polygon is projected on screen, each of the pixels of this
projection is colored according to the shader. The shader has tons of
information available from that polygon and other data in order to
determine the color of the pixel.)
If what you want to do is to fill the screen with data in progressive
steps, graphics cards support that. They have stencil buffers and other
similar techniques for additive drawing.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |