Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Nov 2005
Offline Last Active Apr 27 2016 03:37 PM

Posts I've Made


02 April 2016 - 11:29 AM

Yes, of course :). Max is the most efficient solution here.


22 March 2016 - 05:59 PM

Hm, I think I've just solved the puzzle, to some extent. The value that are displayed differently, depending on the version, are NaNs, so apparently if's and max treat them differently, hence the difference in result.

In Topic: DoF - near field bleeding

23 February 2016 - 06:40 PM

Hm, I think the key here was:

near.a = saturate(near.a); // you can multiply by some value to avoid the "soft focus" effect at low CoC values

My first image that I managed to get was this:

Attached File  1.jpg   72.56KB   2 downloads

After doing:

near.a = saturate(2.0 * near.a)

I got this:

Attached File  2.jpg   64.66KB   2 downloads

But to be honest I still kind of prefer my old approach even though it's less correct :P. I actually have some small ideas on how to improve my first demo so I hope to have another demo with both solutions and be able to switch between one and the other.

In Topic: DoF - near field bleeding

19 February 2016 - 05:28 PM

Sorry for bothering you again but I decided to try Sousa's original approach and have difficulties once more. Which is strange because I'm pretty sure that when I was experimenting back when we were posting here I thought I had this working.

Nevertheless, I simply have problems with applying the near field over my sharp image. Here is a picture of my near field render target:

Attached File  img1.jpg   28.61KB   2 downloads

Here's the sharp picture:

Attached File  img2.jpg   79.03KB   2 downloads

And finally the sharp picture mul'ed by (1-cocNear):

Attached File  img3.jpg   44.76KB   3 downloads

I suppose I should somehow blend the first picture onto the third picture but no matter I do I get very poor results.

In Topic: [Visual C++] *.obj creation folder

18 February 2016 - 08:42 AM

Good hint with the %(RelativeDir). Although your solution creates all the files in wrong directory for me.

My folders structure is this:

build -> vc2013 -> here lie project and solution files as well as Debug and Release folders
src -> here are all sources

So when I use your solution my relative src files have paths:


And as such my src objs are generated next to vc2013 folder, that is, two folders up from the $(IntDir) (which is correct because %(RelativeDir) has two "..").


To solve this problem and have my objs in nice tree structure (just like src files are) but *inside* $(IntDir) (that is, either Debug or Release) I did this:


The dummy folders don't exist and they don't have to because the part ..\..\ that is part of %(RelativeDir) will cancel them.