From 3d34594abdbd4d1377ae2fa04734a21579013896 Mon Sep 17 00:00:00 2001 From: jjesswan Date: Fri, 10 May 2024 07:05:03 -0400 Subject: fix particle texture and foam --- resources/images/foam3.png | Bin 24931468 -> 25418241 bytes resources/images/particle.png | Bin 122878 -> 2941439 bytes resources/shaders/particles.frag | 2 +- resources/shaders/particles.vert | 2 +- src/ocean/ocean_alt.h | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/images/foam3.png b/resources/images/foam3.png index e601df4..b25b73f 100644 Binary files a/resources/images/foam3.png and b/resources/images/foam3.png differ diff --git a/resources/images/particle.png b/resources/images/particle.png index 68b8ac2..9efb1f0 100644 Binary files a/resources/images/particle.png and b/resources/images/particle.png differ diff --git a/resources/shaders/particles.frag b/resources/shaders/particles.frag index 85d9ac2..fdbd8f0 100644 --- a/resources/shaders/particles.frag +++ b/resources/shaders/particles.frag @@ -11,5 +11,5 @@ uniform float alpha; void main() { vec4 c = texture(particle_texture, TexCoords); - fragColor = c*vec4(1,1,1,alpha)*1.6; + fragColor = c*vec4(1,1,1,alpha); } diff --git a/resources/shaders/particles.vert b/resources/shaders/particles.vert index 6e9e388..5175617 100644 --- a/resources/shaders/particles.vert +++ b/resources/shaders/particles.vert @@ -13,7 +13,7 @@ uniform float alpha; void main() { float scale = 1.f;//2000.0f; - TexCoords = vec2(pos.x, pos.w); + TexCoords = vec2(pos.z, pos.w); //ParticleColor = color; // gl_Position = projection *view* vec4((pos * scale) + vec2(offset), 0.0, 1.0); gl_Position = (vec4(pos.x*alpha, pos.y*alpha, 0, 1) + projection*view*vec4(vec3(offset), 1))*scale; diff --git a/src/ocean/ocean_alt.h b/src/ocean/ocean_alt.h index 6076ab2..333d2ca 100644 --- a/src/ocean/ocean_alt.h +++ b/src/ocean/ocean_alt.h @@ -79,8 +79,8 @@ private: const int num_rows = 256; const int num_cols = 256; - const int num_tiles_x = 2; - const int num_tiles_z = 2; + const int num_tiles_x = 1; + const int num_tiles_z = 1; const double vertex_displacement = Lx / 2; -- cgit v1.2.3-70-g09d2