diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-05-10 07:05:03 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-05-10 07:05:03 -0400 |
commit | 3d34594abdbd4d1377ae2fa04734a21579013896 (patch) | |
tree | 2282b6c1115559e81b24df4aa1681d85470f189c | |
parent | 949907125f6f05937f3357c5ddc85a2e7380cf91 (diff) |
fix particle texture and foam
-rw-r--r-- | resources/images/foam3.png | bin | 24931468 -> 25418241 bytes | |||
-rw-r--r-- | resources/images/particle.png | bin | 122878 -> 2941439 bytes | |||
-rw-r--r-- | resources/shaders/particles.frag | 2 | ||||
-rw-r--r-- | resources/shaders/particles.vert | 2 | ||||
-rw-r--r-- | 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 Binary files differindex e601df4..b25b73f 100644 --- a/resources/images/foam3.png +++ b/resources/images/foam3.png diff --git a/resources/images/particle.png b/resources/images/particle.png Binary files differindex 68b8ac2..9efb1f0 100644 --- a/resources/images/particle.png +++ b/resources/images/particle.png 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; |