How do I convert Vertex Position into normalized values?
Posted: Tue Mar 19, 2019 10:31 pm
Hi, my first post, apologies if this has been answered before but I couldn't find it via search. I am loving learning ASE so far, but ran into a hurdle.
I am trying to make a simple dissolve shader, and I'd like a slider (float, min 0, max 1) to determine the extend of the effect. I am using Vertex Position node to get local vertex info, so for example if a cube is 5 units tall, then I'd have to input 2.5 into the slider to dissolve the whole thing.
I'd like to get normalized vertex positions regardless of the scale of the object, so I can just slide the slider from 0 to 1 to get it from completely dissolved to completely visible. So my question is how do you manipulate the Vertex Position so that it's always between 0 and 1?
thanks!
I am trying to make a simple dissolve shader, and I'd like a slider (float, min 0, max 1) to determine the extend of the effect. I am using Vertex Position node to get local vertex info, so for example if a cube is 5 units tall, then I'd have to input 2.5 into the slider to dissolve the whole thing.
I'd like to get normalized vertex positions regardless of the scale of the object, so I can just slide the slider from 0 to 1 to get it from completely dissolved to completely visible. So my question is how do you manipulate the Vertex Position so that it's always between 0 and 1?
thanks!