Jump to content

  • Log In with Google      Sign In   
  • Create Account

Weton

Member Since 27 Mar 2013
Offline Last Active Jun 19 2016 08:54 PM

Posts I've Made

In Topic: compare depth values in omnidirectional shadow mapping

07 January 2016 - 03:54 PM

It took me much longer than I'd like to admit, but I solved it.

I thought that lightDir was simply lightPos - fragmentPos, but in fact it was normalized. So calculating depth from a normlaized vector won't work.

Now it works as expected :)


In Topic: Wrong Normals in Deferred Renderer

14 October 2015 - 04:30 PM

Yes, I'd calculate the matrices in advance, but I couldn't find my mistake for so long, so I just left it in there ;)

 

I took the functions from a library. So when you asked me for the code I looked it up and noticed that it didn't work as expected.

 

So I used this perspective matrix and everything works :

let p = Mat4::new(
    near/right, 0.       , 0.                    , 0.                     ,
    0.        , near/left, 0.                    , 0.                     ,
    0.        , 0.       , -(far+near)/(far-near), -2.*far*near/(far-near),
    0.        , 0.       , -1.                   , 0.                     ,
);

Thank you a lot for asking the right question smile.png


In Topic: Cannot Clear/Draw to Framebuffer

15 August 2014 - 08:27 AM

Thanks to both of you.

No, that is not an explanation. To know that OpenGL would have to look into the future.

Sure ;) But it could cancel the operation when I call SwapBuffers

And yes, I bound a sampler when I bound the texture.

But why is it important to know the min and mag filters when I write to a texture?

In Topic: Cannot Clear/Draw to Framebuffer

14 August 2014 - 12:53 PM

After I added an object, that is using the texture it seems to work.

Is it possible, that opengl noticed that I was never reading data from the framebuffer and skipped rendering?

In Topic: Cannot Clear/Draw to Framebuffer

13 August 2014 - 03:17 AM

Yes, the viewport is set to the same width and height as the textures. (I updated the source)


PARTNERS