Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 22 Sep 2006
Offline Last Active Sep 04 2012 12:03 PM

Posts I've Made

In Topic: Book on mathematics of programming

30 August 2012 - 02:01 PM

Happy to help. I highly recommend Alexandrescu's book too.

I'm beginning to wonder if there's enough interest in EoP on gdnet for some kind of informal study group...

So far I've been printing the newest set of notes from Stepanov's webpage, reading through it, trying things out in C++11 (where some features he asks for have been implemented properly) and waiting for EoP to arrive in the mailbox. A study group would indeed be a welcome addition! How would one go about setting that up?

I must say that so far I'm very impressed with Alex Stepanov's writings and to me the book seems like could well be the perfect step after just finishing Effective STL, which is another must have. I actually found out that I've already read a lot of Alexandrescu's book at work, and while it is good, Effective STL and Stepanov's notes so far have made a bigger impression on my way of dealing with structures and algorithms in C++.


In Topic: Book on mathematics of programming

28 August 2012 - 02:17 PM

Hi all

Thank you very mich for the time you put into this, and sorry for my late answer. Elements of Programming indeed looks like that might be the book I'm looking for - I'm fairly sure it is. Modern C++ Design however also looks like a very decent book - I might just take that as a bonus and have a more thorough look at it.

Again, thanks for your time; it's highly appreciated.

In Topic: Depth Buffer and deferred rendering

30 July 2010 - 07:30 AM

Thanks for the info. There's flying some rate++ towards you!

I'll try this now and hopefully everything will work out brilliantly.

Thanks a bunch!

In Topic: Depth Buffer and deferred rendering

30 July 2010 - 06:41 AM

Yeah, that was what I was thinking. However, "solved" my depth problems is not exactly right, as I still have no clue as to how I am going to utilize the texture as the depth buffer for the second pass, as I am not using MRT for that, due to the fact that I render to the window. Depth testing that I have to use for the stencil generation works with the current depthbuffer unless I am mistaken. In this case as I do not use MRT that would be the window's own depth buffer, and not my custom texture that I just rendered to in order to use the info to reconstruct position.

I might be missing something quite simple, but I'm still not getting anywhere.

In Topic: Depth Buffer and deferred rendering

30 July 2010 - 02:29 AM

Thanks for the help - either I am not getting you or you are not getting my, so I'll try again.

In my first geometry pass I do the following:
I first render to a MRT with a GL_TEXTURE_RECTANGLE as GL_DEPTH_ATTACHMENT and a few buffers as GL_COLOR_ATTACHMENTn. I just let OpenGL store its own depth in the texture, as I do not write to gl_FragDepth. That is, OpenGL stores its own hyperbolic depth just as usual, but in a texture I have attached.

In the second pass I do the following:
Bind my color buffer textures for normals etc., AND bind my depth buffer texture so I can fetch data from it, as I need to reconstruct position.

However, before reconstructing the position I'd like to do a pass (or two) where I only write to the stencil buffer so I can use that to discard pixels, so I do not run my expensive light shader more than needed. For this I need to utilize the depth that is written to the texture to do depth testing against backfaces of the light volume (and perhaps also front faces), but I'm not sure how I can do that, as for the second pass I draw directly to the window's default framebuffer.

Did that make it more clear?

Thanks so far.