Pryme8 Posted July 19, 2018 Share Posted July 19, 2018 Do we have the ability to do parallax bump mapping with a black and white image not a tangent- normal image? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 19, 2018 Author Share Posted July 19, 2018 https://www.babylonjs-playground.com/#NAG06Y#118 Got it. https://www.babylonjs-playground.com/#NAG06Y#119 *UPDATE* I was off on the final calc in the shader it should be gl_FragColor = vec4(1.0-x, y, 1.0, 1.0); otherwise the white was concave looking instead of convex. https://www.babylonjs-playground.com/#NAG06Y#146 Quote Link to comment Share on other sites More sharing options...
Guest Posted July 20, 2018 Share Posted July 20, 2018 Pretty cool! What are you working on if I can ask? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 20, 2018 Author Share Posted July 20, 2018 A completely procedural asset-less game ^_^. I'm using the playground to mock up the assets. This will be my second one now so figured need to go a little harder. Im using the GPU to do most of the heavy lifting of the texture generation eventually ill have it doing all of it. Hopefully we will be throwing ninja stars at targets here soon. Just kinda working on topics I have gray areas in so I can be more competent and this seemed like a good way to keep me interested. DylanD and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
dbawel Posted July 22, 2018 Share Posted July 22, 2018 @Pryme8 Keep you interested? Now that would be something! Dave Quote Link to comment Share on other sites More sharing options...
captainleighwalker Posted August 3, 2018 Share Posted August 3, 2018 hi @Pryme8 I think what you have done is what I need - I want to make a black and white image with canvas and use it as a bump map. It looks like only normal maps are supported? Would there be any chance you could simplify your code to just show a black and white canvas rendered as a bump as that pg is pretty complicated for me! It would be much appreciated. Regards Leigh Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 3, 2018 Author Share Posted August 3, 2018 Ill post something for you here when I get a chance! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 4, 2018 Author Share Posted August 4, 2018 https://www.babylonjs-playground.com/#CZVCTN You will have to figure out why the parallax bump is not being more aggressive Quote Link to comment Share on other sites More sharing options...
captainleighwalker Posted August 4, 2018 Share Posted August 4, 2018 cool thanks I guess for normal use you don't need parallax? I was thinking add shadow with no offset on the canvas to make a transition between white and dark. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.