This project is read-only.

Direct HLSL for particle simulation logic

Aug 8, 2012 at 3:27 AM

In case anyone is interested, I locally added support to directly use HLSL code in the particle simulation logic so that I can avoid the need to write xml syntax'ed simulation logic.

Obviously doing this meant that I dropped support to simulate the particles on the CPU which is an OK limitation on my end.

This allowed me to utilize all of the facilities in HLSL without any of the need to keep exposing extra HLSL commands, or extra temp variables etc.

An example from one of our a particle files:

        <hlsl code="
              float3 gravDir = normalize(position);
              velocity -= gravDir * 1.75;
              velocity *= 0.98;
              "/>

Cheers