How can I use shaders in Unity to write a scientific computing program?

How can I use shaders in Unity to write a scientific computing program?

I want to write a GPU shallow water code on Unity3D. For sure, performance matters a lot. I've done this before using DirectX and C++. But for a couple of reasons I want to redo it in Unity3D. 
I have some hands on experiences with Unity3D, but I have no idea how I can write GPGPU codes, like what I did in DirectX.
In DirectX I am using textures as my data structure for the properties of water cells (height, x-velocity, y-velocity, etc.) and HLSL shaders as my parallel computational functions (kernels).
Furthermore, I prefer my code to be [near] cross-platform. Is it possible to do something similar in Unity3D using OpenGL?
I am an engineer, and not a game developer, so please keep it simple ...

Solutions/Answers:

Answer 1:

In Unity you can do with shaders pretty much everything you could do with DirectX or other Framework/APIs as long as you use the shader for stuff like surface materials or post processing. Vertex and surface shaders are written in HLSL/Cg but are wrapped in ShaderLab code. I don’t know how much that impairs your cross-plattform requirement, but since Unity supports a broad spectrum of target platforms, it should suffice.

Here is some more information on shaders in Unity:
http://docs.unity3d.com/Manual/ShadersOverview.html

You store the shaders you write in .shader files. They are recognized by Unity as shader assets and can be chosen in Unity material assetes. Unity shows them automatically in a drop down menu at the very top of each material insptector (see http://docs.unity3d.com/Manual/Materials.html).

Keep in mind that this drop down menu is not structured the same way your .shader files are structured on your file system. They are structured by the path/name you assigned at the beginning of the shader lab code. So if your shader starts with:

Shader "foo/bar" {
[...]
}

your shader will appear accordingly under foo –> bar in the material’s shader selection menu. The name of the .shader file is not taken into account.

References