I want a GPU feature that lets me do multiple pixel shader passes with a single vertex shader. Each pass would get blended together. The goal being composable pixel shaders.
-
Näytä tämä ketju
-
It gets difficult to do things within the pixel shader that I want to do for the user, while letting them customize some parts. Take vector graphics.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
If I want to fill a cubic bezier interior of a triangle, but let the user provide a pixel shader that determines how to fill it, the user also has to futs with the cubic curve determination in their pixel shader.
2 vastausta 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
If I could set it up where the first pass returned float4(1,1,1,a) where a is an anti-aliased determination of how “in” the curve this pixel is, then the user can provide a fragment pass that does other crazy stuff.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
You could even make it so that if an earlier fragment pass discarded the pixel, it would not run that pixels in the next pass.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
To do this today, I can only think of drawing to an offscreen FBO as a mask, then reading that mask in on a later draw.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju -
But then you’d want to batch tons of these mask calls into a single FBO. Figuring out where to put them on the target texture gets tricky, especially if your vector is in 3D and viewed at a glancing angle.
1 vastaus 0 uudelleentwiittausta 0 tykkäystäNäytä tämä ketju
Also useful for multi pass materials? Instead of redrawing the model, you’d just make another run of a new pixel stage. The benefit is that it’s not committed to the render target till all fragment passes are complete.
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.