Particle Shader

Hi everybody,
i just posted a first version of the 2d particle shader:

http://vvvv.org/tiki-download_file.php?fileId=2034

I’m reordering the patch of the 3d particle shader; as soon as possible i’ll post it.
the biggest problem of this 3d version is alpha blending using textures with alpha. the only way to use the shader now is in Add mode or in blend mode with textures without alpha.

searching online i found interesting posts about this problem. the only way to have blend on particles is to sort them:

http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter46.html

anyone has suggestions how to implement this kind of sort in a working shader?

any other ideas to improve this particle shaders?
you are wellcome to collaborate in this open project!

bye
Natan

try the snippet ive posted long time ago
called working alpha channel in 3d on the snippets page
no sorting but the result is good on ati cards at least

Thanks viktor2!
it seems to work, and performance are not so bed :)
i’ll test this snippet in the 3d particle shader and if gives good results i’ll post it.
bye

HI there

in my setups it seems the shader only work on nvidia GPU’s is that right?

Sune

sorry,I don’t Know, i’ve only nVidia GPU system…
but i didn’t use strange functions…
maybe your ATI is some year old and doesn’t support Shader Model 3.0?..

No, my ATI card does suppport shader model 3, it is an ATI mobility Radeon HD 4670.

on my nvidia system it loads without a hitch

this is the output of the tty renderer when loading the help file:

00:12:14 - : Texture (Width: 1, Height: 1, Format: X8R8G8B8, Mip Map Count: 1) loaded in 0.000 seconds.
00:12:14 - : [ custom settings ]( custom settings ) loaded in 0.006 seconds.
00:12:14 - : [ custom settings ]( custom settings ) loaded in 0.004 seconds.
00:12:14 - : a resource loaded in 0.000 seconds.
00:12:14 * : patch C:_vvvv\vvvv_40beta22\modules\vvvv group\Transform\Camera (Transform Softimage).v4p has been marked as changed because of convertions (from http://vvvv.org/versions/vvvv40beta21.3.dtd to 40beta22). you will be asked for OVERWRITING your patch with the updated version…
00:12:14 * : TMPatchAction.GetKeyChild: illeagal link.
00:12:14 * : patch C:_vvvv\vvvv_40beta22\modules\vvvv group\EX9\AxisAndGrid (DX9).v4p has been marked as changed because of convertions (from http://vvvv.org/versions/vvvv40beta20.1.dtd to 40beta22). you will be asked for OVERWRITING your patch with the updated version…
00:12:14 * : TMPatchAction.GetKeyChild: illeagal link.
00:12:14 * : patch C:_vvvv\vvvv_40beta22\modules\vvvv group\EX9\Arrow (EX9).v4p has been marked as changed because of convertions (from http://vvvv.org/versions/vvvv40alpha19.1.dtd to 40beta22). you will be asked for OVERWRITING your patch with the updated version…
00:12:14 * : TMPatchAction.GetKeyChild: illeagal link.
00:12:14 * : patch C:_vvvv\vvvv_40beta22\modules\vvvv group\EX9\Grid (EX9 Test).v4p has been marked as changed because of convertions (from http://vvvv.org/versions/vvvv40beta20.1.dtd to 40beta22). you will be asked for OVERWRITING your patch with the updated version…
00:12:14 * : TMPatchAction.GetKeyChild: illeagal link.
00:12:14 * : couldn’t find/create node C:_vvvv\vvvv_40beta22\plugins\VNodes.dll|VVVV.Nodes.OmpSubstractNode (ID: 36) in patch C:\documents\My Dropbox_vvvv_patches\shaders\PS 2d emitter 0.1\PS 2d emitter help.v4p. deleting action.
00:12:14 * : patch C:_vvvv\vvvv_40beta22\modules\vvvv group\Debug\PerfMeter (Debug).v4p has been marked as changed because of convertions (from http://vvvv.org/versions/vvvv40alpha19.1.dtd to 40beta22). you will be asked for OVERWRITING your patch with the updated version…
00:12:14 * : TMPatchAction.GetKeyChild: illeagal link.
00:12:14 - : [ custom settings ]( custom settings ) loaded in 0.009 seconds.
00:12:14 * : couldn’t connect pins of unknown nodes.
00:12:14 * : couldn’t connect pins of unknown nodes.
00:12:15 - : Texture (Width: 128, Height: 128, Format: A32B32G32R32F, Mip Map Count: 1) loaded in 0.000 seconds.
00:12:15 - : Texture (Width: 128, Height: 128, Format: A32B32G32R32F, Mip Map Count: 1) loaded in 0.000 seconds.
00:12:15 - : Texture (Width: 128, Height: 128, Format: A8, Mip Map Count: 1) loaded in 0.000 seconds.
00:12:15 - : Texture (Width: 128, Height: 128, Format: A16B16G16R16F, Mip Map Count: 1) loaded in 0.000 seconds.
00:12:15 - : Grid (EX9.Geometry).Mesh (0) loaded in 0.000 seconds.
00:12:15 - : C:_vvvv\vvvv_40beta22\modules\vvvv group\EX9\arrowZ.x loaded in 0.003 seconds.
00:12:15 - : [ custom settings ]( custom settings ) loaded in 0.000 seconds.
00:12:15 - : Texture C:\documents\My Dropbox_vvvv_patches\shaders\PS 2d emitter 0.1\halo dot.bmp (Width: 64, Height: 64, Format: P8) loaded in 0.000 seconds.
00:12:15 - : [ custom settings ]( custom settings ) loaded in 0.000 seconds.
00:12:15 - : Texture (Width: 32, Height: 32, Format: R5G6B5, Mip Map Count: 1) loaded in 0.000 seconds.

yes unfortunately most of the ps 3 shaders posted here work only on nvidia

I just realized there was a missing node in the patch. fixed:

http://vvvv.org/tiki-download_file.php?fileId=2045

Hey dottore

Still no success on my ATI machine :(

it is cool anyway, I also work on nvidia machines

Sune