Bläddra i källkod

fixed rand() function

master
förälder
incheckning
a95bf9c0f8
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. +1
    -1
      neercs/video/noise.lolfx
  2. +1
    -1
      neercs/video/render.cpp

+ 1
- 1
neercs/video/noise.lolfx Visa fil

@@ -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 Visa fil

@@ -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);


Laddar…
Avbryt
Spara