DylanD Posted August 21, 2018 Author Share Posted August 21, 2018 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) Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 21, 2018 Share Posted August 21, 2018 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. DylanD 1 Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 22, 2018 Author Share Posted August 22, 2018 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! Pryme8 1 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.