Is my parallax mapping ok or not?

Started by
5 comments, last by _Flame_ 4 years, 6 months ago

ello. I'm trying to achieve image like in this picture:

image.png.5f6228c264e74a2e21965d6a868e1a36.png

 

Here is my image: 

1117206395_Screenshotfrom2019-10-0900-21-57.thumb.png.6a51876e1fa323a85828639eeabd0d3f.png

As you see they don't looks the same. Is my parallax mapping incorrect?

 

 

Advertisement

TBH if you made the second screenshot brigher it'd help

Haven't worked with parallax mapping myself so far, so I can't help you with the details but it looks to me like it only works in the horizontal direction. If you compare the edges of the learnopengl picture with yours, you 'll see what I mean.

So I would narrow down the debugging to every instruction that affects the vertical direction.

Greetings

29 minutes ago, Frantic PonE said:

TBH if you made the second screenshot brigher it'd help

I've made it a little brighter, hope it helps. For some reason screenshots are darker then monitor images.

Yours looks flipped on the Y axis (but not on X). Posting source might help :)

5 hours ago, pcmaster said:

Yours looks flipped on the Y axis (but not on X). Posting source might help :)

Thank you . Looks like the problem solved.

1547279682_Screenshotfrom2019-10-0921-16-23.thumb.png.94ac33a6b9377ea735ae6f5516cdf8ea.png

The problem was how i calculated binormal vector. I have changed cross(n, t); on cross(t, n);

This topic is closed to new replies.

Advertisement