Forum

Doom3 shadow optimization

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Re: Doom3 shadow optimization

Postby revelator » Tue Jul 22, 2014 2:03 am

100% actually :) its the patch i tried to port for win32. the openmp part needs some Work though, pthreads vs win32 threads etc.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby nbohr1more » Tue Jul 22, 2014 1:10 pm

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).
nbohr1more
 
Posts: 54
Joined: Fri Dec 09, 2011 7:04 am

Re: Doom3 shadow optimization

Postby revelator » Tue Jul 22, 2014 1:58 pm

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.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby revelator » Tue Jul 22, 2014 5:25 pm

http://llvm.org/builds/

these hook into msvc2010 through 2013 so you can use clang with msvc.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby revelator » Tue Jul 22, 2014 11:04 pm

Ok something funny to try out.

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

http://sourceforge.net/projects/cbadvanced/files/Clang/OpenGL-Wrapper/qeffects-gl.7z/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.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby nbohr1more » Wed Jul 23, 2014 6:08 pm

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
nbohr1more
 
Posts: 54
Joined: Fri Dec 09, 2011 7:04 am

Re: Doom3 shadow optimization

Postby revelator » Wed Jul 23, 2014 8:08 pm

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 :)
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby revelator » Thu Jul 24, 2014 12:35 am

btw here are the latest builds of clang for msvc.

http://sourceforge.net/projects/cbadvanced/files/Clang/LLVM-3.5.0svn-win32.exe/download
http://sourceforge.net/projects/cbadvanced/files/Clang/LLVM-3.5.0svn-win64.exe/download

they work with msvc 2010 2012 and 2013.

use the 32 bit one the 64 bit package seems to have some trouble.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby revelator » Thu Jul 24, 2014 5:19 am

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.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Re: Doom3 shadow optimization

Postby revelator » Sun Aug 17, 2014 11:26 am

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.
Productivity is a state of mind.
User avatar
revelator
 
Posts: 2497
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Previous

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest