Login  Register

JOGL - GLSL Bump Mapping (Please Help!)

Posted by leolol on Oct 31, 2011; 11:04am
URL: https://forum.jogamp.org/JOGL-GLSL-Bump-Mapping-Please-Help-tp3467550.html

I've been spending the better half of the last 2 weeks trying to get bump-mapping working, however I seem to be having a problem when combining a normal map with a texture.

Bump mapping seems to work fine, when I apply only the normal map, however when I try to also apply the colour map (regular texture) the results are somewhat strange. I am using GLSL shaders borrowed from existing tutorials, which seem to work fine and other users have reported that all is working well.

I suspect there is something wrong with my JOGL code, however I cant see what exactly.

Screenshots: (First is with just normal Map, other 2 are with normal map and texture)

http://imgur.com/a/ceDpg

Link to my shader and GL code snippets:

http://pastebin.com/9mPmSNX3


Any help would be greatly appreciated, I am only posting here as a last resort after trawling through pages of threads/tutorials over the last few weeks with no joy.

Hope someone out there can help.

Leo