Yep, I have this in a map and working.
However... currently It can realy only do snow well, so it needs some modifying.
I know your probablie bust trapan (what with teh new release stuff) but I was wondering if you could make a change or to?
Most importantly... it settels on water currently and slowly fades... Is there a way to stop that? I assume its to do with this bit:
Code: Select all
vec3 pos = scalePos - mod(camPos, scale);
pos.y -= time * 0.5 * (speed * (2.0 + gl_Vertex.w));
pos = mod(pos, scale) - (scale * 0.5) + camPos;
if (pos.y < 0.0) {
gl_FrontColor *= 1.0 + 2.0 * (pos.y / scale);
pos.y = 0.0;
}
const vec4 eyePos = gl_ModelViewMatrix * vec4(pos, 1.0);
gl_PointSize = (1 + gl_Vertex.w) * 5000 / length(eyePos);
gl_Position = gl_ProjectionMatrix * eyePos;
The other thing, which would help it look way more like rain is that it would help if teh particles could be stretched out in the upwards direction. I'm not sure if thats as easy though as currently each drop is jus ta point, were to do taht it would need to be some sort of vertacie made of 2 points... with the image stretched between the two points but still always facing the cammera... so as if the view is from the top you would have an almost undeformed image (as teh points would apear close together) but from teh side it would be elongated upwards. Being able to set the lenght between the two points would alow for heavyer and lighter rain.
So its cool... but needs a few bits and bobs befor it looks REALY good.
Is any of that possible?
aGorm
:: EDIT :: Also... Is there a good place to learn Lua? A good site that helps you understand the basics? Only it doesn't look like it would be hard to write once you knew what it wanted.... just I have no idea what it wants yet.