Przeglądaj źródła

fixed rand() function

master
rodzic
commit
a95bf9c0f8
2 zmienionych plików z 2 dodań i 2 usunięć
  1. +1
    -1
      neercs/video/noise.lolfx
  2. +1
    -1
      neercs/video/render.cpp

+ 1
- 1
neercs/video/noise.lolfx Wyświetl plik

@@ -21,7 +21,7 @@ uniform vec3 retrace;

float rand(in vec2 p,in float t,in float v)
{
return fract(sin(dot(p+t,vec2(12.9898,78.233)))*v);
return fract(sin(dot(p+mod(t,2.0),vec2(12.9898,78.2333)))*v);
}

void main(void)


+ 1
- 1
neercs/video/render.cpp Wyświetl plik

@@ -979,7 +979,7 @@ void Render::Draw3D()
shader_noise->Bind();
shader_noise->SetUniform(shader_noise_texture, fbo_front->GetTexture(), 0);
shader_noise->SetUniform(shader_noise_screen_size, (vec2)screen_size);
shader_noise->SetUniform(shader_noise_time, fmodf(fx_angle, 1.0f));
shader_noise->SetUniform(shader_noise_time, fx_angle);
shader_noise->SetUniform(shader_noise_offset, noise_offset);
shader_noise->SetUniform(shader_noise_noise, noise_noise);
shader_noise->SetUniform(shader_noise_retrace, noise_retrace);


Ładowanie…
Anuluj
Zapisz