Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 05 Nov 2005
Offline Last Active Oct 14 2016 04:37 PM

Posts I've Made

In Topic: Conversion Between std::string and std::wstring

16 September 2016 - 05:19 PM

Thanks for the explanation. I've edited the note to be a bit less wrong :).


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   3 downloads

After doing:

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

I got this:

Attached File  2.jpg   64.66KB   4 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   3 downloads

Here's the sharp picture:

Attached File  img2.jpg   79.03KB   3 downloads

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

Attached File  img3.jpg   44.76KB   5 downloads

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