How to Merge MrWiggle (DX11) and FogTutorial from Rastertek

Hello VVVVorld!
I’m here trying to merge those 2 DX11 shader:

the dx11 version of https://vvvv.org/contribution/mrwiggle
Fog from https://vvvv.org/contribution/rastertek-dx11-v4-tutorials

I’m a newbie but with the help of user Noir I came up with this. (Attached)

I think there’re some problems with the phong directional that seems to be broken. And also Fog isn’t taking account of camera etc etc.
(Onestly nothing is working correctly… ahahah)

Could someone help us?

Thanks in advance.

MrWiggle DX11 fogtest.zip (190.7 kB)

the patch and the shader were pretty much ok. except the parameters of the fog have been a bit off.

the main problem with the phong is that the fish model has very wrong normals stored in the mesh. see in the patch. so you should export the model again with correct normals.

MrWiggle DX11 fogtest 2.zip (195.0 kB)