Page 4 of 4

Re: Doom3 shadow optimization

Posted: Tue Jul 22, 2014 2:03 am
by revelator
100% actually :) its the patch i tried to port for win32. the openmp part needs some Work though, pthreads vs win32 threads etc.

Re: Doom3 shadow optimization

Posted: Tue Jul 22, 2014 1:10 pm
by nbohr1more
Cool. :)

I thought that might be the case but wanted to make sure since it would be a shame to leave a 15% boost (according to vector fabrics) on the table.

As an aside, taaaki over at the TDM forums has shown interest in porting the script interpreter to a JIT using LLVM... eventually.

Other Doom 3 projects may not benefit too much from that but TDM has attracted a number of script fanatics who love making all sorts
of gameplay customizations to their missions. ( Examples: AI that are neutral until they see suspect activity by the player, a "Tension Meter",
poltergeists, poisoning the food of an assassination target, magic spells that open new passages, etc).

Re: Doom3 shadow optimization

Posted: Tue Jul 22, 2014 1:58 pm
by revelator
Nice :)

LLVM + clang could also be a nice compiler for Doom3. It allready Works mostly as a replacement for msvc's cl allthough it does bitch on some of its switches.

Re: Doom3 shadow optimization

Posted: Tue Jul 22, 2014 5:25 pm
by revelator
http://llvm.org/builds/

these hook into msvc2010 through 2013 so you can use clang with msvc.

Re: Doom3 shadow optimization

Posted: Tue Jul 22, 2014 11:04 pm
by revelator
Ok something funny to try out.

Heres a build of a certain OpenGL wrapper done with clang on msvc 2012.

http://sourceforge.net/projects/cbadvan ... z/download

This wrapper was made for older games like quake / heretic / daikatana / quake2 etc. It also Works fine with Doom3 however :)

What you get is SSAO / Bloom / HDR / and a few other nifty Things like tesselation. No need to write a new shader, just drop the two files in the same folder your game executable is in and away we go.

The effects can be controlled with the ini file for the OpenGL32.dll in this archive.

Try it out on heretic II :) it makes this old game look quite nice.

Re: Doom3 shadow optimization

Posted: Wed Jul 23, 2014 6:08 pm
by nbohr1more
Yeah, the last time I tried googling ENB or SweetFX for OpenGL I think I came across this one.

When I tried SSAO, the screen was filled with artifacts and the result did not look like SSAO.

I'll try this one again.

It's such a shame that skybox and alpha vegetation have artifacts with Sikkmod because they aren't excluded from
the z-buffer image that is captured for the shader :(

I haven't checked to see whether this is fixed in his breadcrumbs game yet:

https://github.com/RobertBeckebans/Sikk ... crumps-src

Re: Doom3 shadow optimization

Posted: Wed Jul 23, 2014 8:08 pm
by revelator
Indeed though i guess a better way is to make these effects part of the material scripts so that the effect will only be enabled on objects they are defined for.
Would also make the POM shader viable :)

Re: Doom3 shadow optimization

Posted: Thu Jul 24, 2014 12:35 am
by revelator
btw here are the latest builds of clang for msvc.

http://sourceforge.net/projects/cbadvan ... e/download
http://sourceforge.net/projects/cbadvan ... e/download

they work with msvc 2010 2012 and 2013.

use the 32 bit one the 64 bit package seems to have some trouble.

Re: Doom3 shadow optimization

Posted: Thu Jul 24, 2014 5:19 am
by revelator
just tried compiling Doom3 with clang and it gets quite far but not far enough :(

clang bitches rather violently about some of the ATL code, and on the packed pragma used in the sound manager.
i suspect the packed pragma just needs to be changed to to the GNU style one but the ATL code for the internal editors seems to be a tall order fix.

Re: Doom3 shadow optimization

Posted: Sun Aug 17, 2014 11:26 am
by revelator
ouf just a warning :? avoid the keyword __forceinline unless you are absolutely sure that the function you use it on can be inlined. instead use _inline if not sure.
forceinline caused some massive slowdowns and added a rather hefty overhead to the exe sizes also. after switching to inline it runs much smoother and the size went down also.

as for ssao it might be possible checking against shader flags so that the problematic stuff gets left out.