Implementing soft particles

I’ve been trying to implement soft particles in ioquake3 but i’m not sure where to make my changes, exactly. In fact, most of the time i take to do some changes in the engine is finding myself around it. Could any good soul point me to the right direction here? :slight_smile:

I’ve been using these tutorials:

Wish I could be of some real help, but I was recently going over another fella’s MOD, and remembered noticing fog functions near where he had made modifications.
The changes he made were right under a fog function in the engine in
renderergl1\tr_main.c +/- 1001

See if a sprite is inside a fog volume

then when I looked real quick this stood out to me…
renderergl1\tr_image.c +/- 1128

Returns a 0.0 to 1.0 fog density value
This is called for each texel of the fog texture on startup
and for each vertex of transparent shaders in fog dynamically

That’s about all I can do. Most of my changes to the engine don’t compile, or crash after compiling. I have the same troubles as you do, trying to find a needle in a haystack… but I used a nice program called textpad to search for fog in ioq3 source code. Good luck, sounds like a great project, and would be interested to hear if you succeed.

1 Like

I have a basic implementation of this in my bgfx-based renderer here. See the bottom left screenshot.

1 Like

Any special reason why you used premake instead of mantaining the existing makefile?

Because hand editing makefiles is tedious. Also, I mostly use VS, and setting up VS projects is also tedious. It makes more sense to use Premake or CMake nowadays.

I used GCC in Cygwin, it compiled fine and seemed to work well. Nice.