Jump to content

ShaderMaterial Questions


DylanD
 Share

Recommended Posts

Hey I'm try to do a larger more gradual gradient with my shader but instead of going off of where the camera is I just want it to simply change over the y of the object.  When I tried I get It working on only the front face and I'm not sure how to get it seamlessly on all the sides.

https://www.babylonjs-playground.com/#2IFRKC#45

Any ideas how I could get it to be seamless ?

 

(shaders are super cool)

Link to comment
Share on other sites

5 hours ago, DylanD said:

Oh, @Pryme8  I was wondering what is the best way to debug a shader?  console.log("test") doesn't seem to work.  Any pro tips?

Visually, or with https://spector.babylonjs.com/
 

23 minutes ago, DylanD said:

Hey I'm try to do a larger more gradual gradient with my shader but instead of going off of where the camera is I just want it to simply change over the y of the object.  When I tried I get It working on only the front face and I'm not sure how to get it seamlessly on all the sides.

https://www.babylonjs-playground.com/#2IFRKC#45

Any ideas how I could get it to be seamless ?

(shaders are super cool)

fix your faceUV's  when the default box is created it does not have its UV's aligned. to a specific direction.

 

 

Link to comment
Share on other sites

18 hours ago, Pryme8 said:

Visually, or with https://spector.babylonjs.com/
 

fix your faceUV's  when the default box is created it does not have its UV's aligned. to a specific direction.

 

 

BOOM! @Pryme8

https://www.babylonjs-playground.com/#2IFRKC#51

the faces things only got me through 4/6 sides, still the left and right faces wouldn't work but, I figured out that if I used the normals from one of my other shaders to figure out what side is what, I could use them to switch between vuv.y and vuv.x!!!

LOOK AT THAT!!! WOOOOH!!!

shaders are awesome

now to make one more with everything all together!

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...