Author Topic: _currentRender and others  (Read 693 times)

0 Members and 1 Guest are viewing this topic.

bitterman

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: +8/-5
  • Doom Newbie
    • View Profile
_currentRender and others
« on: May 26, 2015, 09:02:26 AM »
Hi all!


 _currentRender is projection on a rectangular plane, which is equal to the size of the current screen resolution. In fact, since it can be used like texture.

I see also _scratch (Doom3) and _ss buffers (sikkpin mod). Can you explain this?

And I'm looking for a way to render to a texture via ARB. It's possible?

Thanks.


update:

Quote
// scratchImageis used for screen wipes/doublevision etc

scratchImage = ImageFromFunction("_scratch", R_RGBA8Image);

Doublevision?

g_doubleVision [0,1] - If set to 1, shows a blurry "double vision" effect when taking damage. Setting this to 0 removes this effect and can improve performance when taking damage.

UPDATE:

As I see doubleVision is a Code (not material shader).

I was looking for how to realize _prevRender (or _accum) via material shader for the effect of M-blur but I see that it is implemented in the Doom3BFG otherwise (see motionBlur.pixel).

Also, I have not found simple ways to use _scratch. How it work:

Quote
When you issue a "map" command, the following process happens:

    Mute Sound System
    Run Wipe
        Capture screen to "_scratch"

But it is not clear how to use a _scratch buffer for any purpose other than this.

And this is no access to _accum via shader.
« Last Edit: June 09, 2015, 11:04:35 PM by bitterman »

revelator

  • Newbie
  • *
  • Posts: 16
  • Karma: +3/-0
  • Doom Newbie
    • View Profile
Re: _currentRender and others
« Reply #1 on: February 11, 2016, 01:33:59 AM »
In old idtech engines scratch was mostly used for small image sequences, not sure how it applies these days.

Eg. Arrays of pixels which is a simpler form of storing but has performance problems on large images.

an example of a scratch image

# This is an example bitmap of the letter "K"
# The 6 and 10 are the width and height of the image.
6 10
0 0 0 0 0 0
0 0 0 0 0 0
1 0 0 0 1 0
1 0 0 1 0 0
1 0 1 0 0 0
1 1 0 0 0 0
1 0 1 0 0 0
1 0 0 1 0 0
0 0 0 0 0 0
0 0 0 0 0 0
« Last Edit: February 11, 2016, 01:38:49 AM by revelator »