Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Apr 2011
Offline Last Active Today, 11:50 AM

Topics I've Started

Deferred Rendering shaking edges

08 February 2013 - 05:57 AM



I'm trying to implement a deferred render pipeline. But i think i'm having troubles with my position reconstruction from depth map.

I cant find what is wrong. So i hope someone can point me in the right direction.


When using my point lights my edges get very shaky. I've uploaded a short movie so you can see the problem.



Thanks in advance

Atmospheric scattering

02 April 2012 - 02:22 PM


I'm currently stuck on merging my atmospheric scattering (precomputed eric brunetons implementation). With my planet.
They both work good seperated. But i don't have a clue how to merge them together.

I hope someone can help me out on this one.

Thanks in advance.

Eric bruneton Atmospheric scattering rotation bug

23 February 2012 - 12:39 PM


I'm trying to implement Precomputed atmospheric scattering thanks to the paper of Eric Bruneton.
I've converted some of the shaders needed to compute the single scattering. (Transmittance, Irradiance1, InScatter1, InScatterCopy) to HLSL.

All the precomputed textures work like they suppose to. But when I try to bring them together strange things happen.
I made a short video to show you the problem.


As you can see my horizon is turned on it's side and when i start to move it turns around.
1 other problem is I can't see my outer space view of the earth.

I think my problems with the turning lays with in my Camera view direction vector.
I just followed the files givin by bruneton on his site to calculate it.

D3DXMATRIX matView = pRenderContext->GetCamera()->GetView();
D3DXMATRIX matProj = pRenderContext->GetCamera()->GetProj();
D3DXMatrixInverse(&iproj, NULL, &matProj);
D3DXMatrixInverse(&iview, NULL, &matView);
D3DXVec3Transform(&cl, &D3DXVECTOR3(0.0, 0.0, 0.0), &iview);
D3DXVECTOR4 sun = D3DXVECTOR4(sin(sunTheta) * cos(sunPhi), sin(sunTheta) * sin(sunPhi), cos(sunTheta), 0.0);
D3DXVECTOR3 campos = D3DXVECTOR3(pRenderContext->GetCamera()->GetPos());

Then in my vertex shader i'm doing
output.Pos = float4(input.Pos,1);
output.Tex = input.Tex;
float4 invpos = mul(float4(input.Pos.xyz,1), projInverse);
output.ray = mul(float4(invpos.xyz, 0), viewInverse).xyz;
return output;

So I hope someone has had the same problem or knows what I did wrong.
If you need more code just ask :-)

Ty in advance

remove duplicate vertices

31 October 2011 - 10:08 AM


I'm making a small project (for school) with marching cubes to generate a terrain.
Now everything works fine except i cant find a way to merge / remove my duplicate vertices in a cpu friendly way.

At the moment i'm just cross checking my list for duplicates (takes alot of time)

Does anyone know an algorithm or something that can help me out.

Thanks in advance.

Fitting view frustum into boundingbox

16 September 2011 - 08:57 AM


I'm working a simple shadowmap depth map project. I'm having a hard time positioning the orthographic camera.
So i was wondering if i could make the camera fit the boundingbox of my terrain (because its big). So that my shadow map stays centered on my depth texture and uses optimal texture space.

I've looked on the internet but failed to find something helpfull.

Thanks in Advance