alecjacobson / computer-graphics-shader-pipeline

Computer Graphics Assignment about the Shader Pipeline
14 stars 24 forks source link

bump.fs understanding #18

Closed ptanugra closed 6 years ago

ptanugra commented 6 years ago

Hi Professor,

For bump.fs, I have followed all of the instructions and steps to calculate the normal (also Implemented the improved perlin noise). However i keep on getting a completely different result than the one in the README. Also with openGL, it's significantly harder to debug (can't simply print values on screen). Here is a screenshot of my completely wrong results: screen shot 2018-11-08 at 9 00 28 pm

I have also researched into setting up a TBN matrix but to no avail, it still produces a completely different result. I feel like I'm getting stuck in a loop trying after trying to read the many different articles online back and forth and the book doesn't really touch upon this topic either.

Am I going in the right direction? Also, am I overthinking the problem?

ptanugra commented 6 years ago

I think i got it

RioAraki commented 6 years ago

Hi, I also have a really hard time debugging this. I thought I have implemented everything from readme and get a kinda bumpy effect, but my output looks very similar to yours especially how the sphere is split up with edges to colors. May you share how you figure it out?

Here is my current normal output: 2018-11-12-165748_628x363_scrot

Thanks in advance!

RioAraki commented 6 years ago

To answer my own question, the multiplication sign in the mathematic formula meant to be a cross product, it is not a multiplication!