Changeset 1814


Ignore:
Timestamp:
Aug 24, 2012, 6:48:42 PM (8 years ago)
Author:
rez
Message:

fixed rand() function

Location:
trunk/tools/neercs/video
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/neercs/video/noise.lolfx

    r1810 r1814  
    2222float rand(in vec2 p,in float t,in float v)
    2323        {
    24         return fract(sin(dot(p+t,vec2(12.9898,78.233)))*v);
     24        return fract(sin(dot(p+mod(t,2.0),vec2(12.9898,78.2333)))*v);
    2525        }
    2626
  • trunk/tools/neercs/video/render.cpp

    r1811 r1814  
    980980        shader_noise->SetUniform(shader_noise_texture, fbo_front->GetTexture(), 0);
    981981        shader_noise->SetUniform(shader_noise_screen_size, (vec2)screen_size);
    982         shader_noise->SetUniform(shader_noise_time, fmodf(fx_angle, 1.0f));
     982        shader_noise->SetUniform(shader_noise_time, fx_angle);
    983983        shader_noise->SetUniform(shader_noise_offset, noise_offset);
    984984        shader_noise->SetUniform(shader_noise_noise, noise_noise);
Note: See TracChangeset for help on using the changeset viewer.