DX11 GPU fluid

I’m porting the dx9 gpu fluid demo to dx11 , but i still have a problem with the pressure pass , i didn’t manage to port the iteration and blending mode in the .tfx shader, if somebody can help with that … here is the DX11 port almost working …

FluidSolverGPUDX11.7z (10.5 kB)


i’d love to help, but i don’t get how that pressure pass works in dx9 version (texture feed back without framedelay??)

anyways, blending in tfx should be like blending a fullscreen quad in a renderer with clearing disabled

as for iteration count parameter - it supposed to be working in .fx shaders, iirc kinda similar to spreading? (i never actually used it:) )

would be cool to have iteration feature for tfx tho, where it repeats the same effect with output fed to input of the next iteration

btw here is a port of some webgl fluid thingy i played with a while ago (some parameters are messed up, but it worked for me)

FluidDX11.zip (6.5 kB)

hi unc,
thanks. really interesting. while ago i was looking for texture-based fluid approach.
if it isn’t much ado for you could you share with us your DX9 version?

tnx for sharing unc

thanks unc , i also don’t understand how the pressure pass work in dx9 version
the dx11 version got an “iterastion” pin instead of “Technique pass” pin on the effect node, i’m not sure how to use it
also not sure how to port " alphablendenable = false;" to dx11 shader

will post it here if i find it (may still be somewhere on my old hdd)

yeah that pressure pass looks like kind of a hack, i don’t think it is possible right now to do the same with dx11 (but may be possible later if vux implements that:) )
and all dx11 shaders have blending disabled by default, so you don’t need that “alphablendenable = false;” part

Ok i think i managed to have the pressure pass working , but there is still something wrong , the curlly things is working , but dynamic is strange…

FluidSolverGPUDX11.7z (11.4 kB)

that’s because tfx are inheriting texture format/size of the input texture, and in this patch the input was coming from framedelay node (which seems to default to R8G8B8A8_Uint,512x512)
i’ve set the texture format manually to R16_Float in the last pass in Pressure.tfx, looks better now
(altho it still defaults texture size to 512x512, so it is better to avoid putting framedelayed texture to the main input pin of tfx)

FluidSolverGPUDX11_1.zip (41.0 kB)

that’s it thanks

u can change res manually, check use input resolution pin in inspektor

thatìs quite fast and useful, dank je well :)

hi unc, did you check if you still have dx9 with tIN?

@DiMiX: sorry, looks like it was lost on my old dead hdd…

@unc: pity. maybe you can point me what’s wrong with my attempt?

FluidS_tIN_DX9.zip (38.5 kB)