Re: [osg-users] Problem with deferred rendering

2012-07-05 Thread Daniel Schmid
Hi Wang Thanks for the Link. This is a really simple example. Is there a more advanced example working with the depth buffer, multiple lights and applying shadows rendered in a separate shadow pass? This is the stuff i'm kind of stuck... Wang Rui wrote: > Hi Daniel, > > Why not first have a

Re: [osg-users] Problem with deferred rendering

2012-07-05 Thread Wang Rui
Hi Daniel, Why not first have a look at the osgRecipes project which is also the code repo of the book OpenSceneGraph Cookbook. It does has a very simple deferred shading example in chapter 6. The book may require you to buy it but the code is totally free at: https://github.com/xarray/osgRecipes/

Re: [osg-users] Problem with deferred rendering

2012-07-05 Thread Daniel Schmid
Hi Sebastian You were talking about a deferred shading example. Do you have any example code you could provide? I'm just about to start with deferred shading and I'm very interested in having a look... Regards Daniel Sebastian Messerschmidt wrote: > Hi Micael, > > Feel free to ask If you en

Re: [osg-users] Problem with deferred rendering

2011-12-08 Thread Micael Levesque
Hi, Thanks for the quick answers :D So the first thing I did was to setup two cull callbacks, the first one sets the camera inverse view matrix to a uniform for the geometry pass like this (camera->getRenderTargetCamera()->getInverseViewMatrix()) and is attached to the g-buffer camera. The sec

Re: [osg-users] Problem with deferred rendering

2011-12-07 Thread Sebastian Messerschmidt
Hi Micael, as J-S already pointed out, you have to be aware of the space you are working in. I don't really agree that it has to be done directly in world space, but that is not important, as you can get correct results in view-space too. In my point light lighting pass I do: Vertex: varying

Re: [osg-users] Problem with deferred rendering

2011-12-06 Thread Jean-Sébastien Guay
Hi Mical, I recently have been trying to get a deferred rendering system to work using osg. Lots of fun to come! :-) First of all in almost all the tutorials I've seen so far, the normal vector was multiplied by the normal matrix (gl_NormalMatrix), but when I did so in my geometry vert

[osg-users] Problem with deferred rendering

2011-12-06 Thread Micael Levesque
Hi, I recently have been trying to get a deferred rendering system to work using osg. First of all in almost all the tutorials I've seen so far, the normal vector was multiplied by the normal matrix (gl_NormalMatrix), but when I did so in my geometry vertex shader, I had strange results (th