Jump to content

Black and White Bump Mapping


Pryme8
 Share

Recommended Posts

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


 
Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...