Even better?

It's difficult getting the same result because GL st are 0-1 but sw quake's
st are 0-inf % 64.
This commit is contained in:
Bill Currie 2012-01-11 07:51:15 +09:00
parent 5dbf913d41
commit 89ae6eca8b

View file

@ -9,12 +9,12 @@ const float CYCLE = 128.0;
const float PI = 3.14159;
const float FACTOR = PI * 2.0 / CYCLE;
const vec2 BIAS = vec2 (1.0, 1.0);
const float SCALE = 16.0;
const float SCALE = 8.0;
vec2
turb_st (vec2 st, float time)
{
vec2 angle = st.ts * CYCLE;
vec2 angle = st.ts * CYCLE / 2.0;
vec2 phase = vec2 (time, time) * SPEED;
return st + (sin ((angle + phase) * FACTOR) + BIAS) / SCALE;
}