Trying to understand DOF focusing code

share shaders here
  • Author
  • Message
Offline
User avatar
*master*
Posts: 229
Joined: 21 Feb 2013, 03:21
Location: Los Angeles, CA

Re: Trying to understand DOF focusing code

So my original questions were:

1. What is contained in the SamplerCurr and SamplerPrev textures?
The result of PS_ReadFocus
2. Is the PS_WriteFocus run for every screen pixel where the 4x4 textures are a depth sampling around that pixel?
It reads the 4x4 SamplerCurr and SamplerPrev textures and returns the 4x4 SamplerFocus value (I'm still not sure this is accurate)
3. Is FadeFactor the sub-frame delta or is it a delta of the entire transition between dynamic points of focus?
My guess is that it's between dynamic points of focus, but because these are calculated every frame, it is essentially a sub-frame smooth interpolator value between the calculated points.

If anyone has more information (Boris, hello?) it would be much appreciated. Thanks!
_________________
i7-4970K 4.8ghz, 16gb ram, Geforce Titan X 12gb vram, win7
Post Reply