dhewm / dhewm3

dhewm 3 main repository
https://dhewm3.org/
GNU General Public License v3.0
1.81k stars 351 forks source link

Export screen and depth buffer as an image #372

Open zoq opened 3 years ago

zoq commented 3 years ago

Hello, is there a way to export the screen and depth buffer as an image e.g. using stb?

nbohr1more commented 3 years ago

Look at "RB_ShowDepthBuffer" in tr_rendertools.cpp

and

"FILL DEPTH BUFFER" in draw_common.cpp

zoq commented 3 years ago

@nbohr1more Thanks for the info; that's exactly what I was looking for. On another note, is there any way to get the motion vectors as well?

nbohr1more commented 3 years ago

It sounds like you may be interested in high quality motion blur or TxAA ? Doom 3 does not have a temporal buffer. For the player camera you could use neo/game/player.cpp idPlayer::CalculateFirstPersonView You would have to go through game/anim and game/physics for other vector data

zoq commented 3 years ago

Correct, I was hoping to generate similar data I could get with something like https://bitbucket.org/Unity-Technologies/ml-imagesynthesis/src/master/.