Thank you so much for the reply, which I’ve waiting for many days.
What I want to do is like this:
I want the effects on polygon’s surface(the green part).
The material was made of a lot of small points and they will randomly fade in. I basically make it come true and there’s the sandcastle:
You could easily find that my sandcastle above has problems that the material shapes will move as the camera position moved and the material shape always face to me even change the pitch of camera especially when I increase the size of shapes.
So I tried to use
materialInput.st instead of
gl_FragCoord.xy, with this, the previous problems were gone, but when I zoom out the shape will be very large, because the shape’s size is fixed percentage of polygon’s size. But what I want is let the shape size to be fixed pixel so it could correctly show whether the camera zoom out or not.
Also, I won’t give it up.
materialInput.st is a 0~1 coordinate so if I get a correct multiplier to scale, the problem will be resolved. I could get diff of longitude and latitude, or turn them to meters, but I don’t know how to transform the data to pixels and how to calculate when camera zoom out.
So, this is the situation. I am looking forward to your next reply.