diff options
author | sotech117 <michael_foiani@brown.edu> | 2024-05-10 14:31:04 -0400 |
---|---|---|
committer | sotech117 <michael_foiani@brown.edu> | 2024-05-10 14:31:04 -0400 |
commit | 2820f2a620340feff973dfea26c1eb1172140ada (patch) | |
tree | a3b84e7c69954b7cd6ef28a68a3ae815e69c3127 | |
parent | 1b98aed8908e04b750012323a8bf0f182fb305a6 (diff) |
demo daygit add .
-rw-r--r-- | resources/images/foam3.png | bin | 25418241 -> 7877956 bytes | |||
-rw-r--r-- | resources/shaders/foam.frag | 4 | ||||
-rw-r--r-- | src/ocean/ocean_alt.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/resources/images/foam3.png b/resources/images/foam3.png Binary files differindex b25b73f..3646425 100644 --- a/resources/images/foam3.png +++ b/resources/images/foam3.png diff --git a/resources/shaders/foam.frag b/resources/shaders/foam.frag index d534ccd..d6d1cab 100644 --- a/resources/shaders/foam.frag +++ b/resources/shaders/foam.frag @@ -33,7 +33,7 @@ float getSaturation(vec2 k, vec2 xzPos, float adjWaveLength, float phaseC){ void main() { float height = pos.y; float saturation = constants[0];//getSaturation(dir, vec2(pos.x, pos.z), 200.f, constants[0]); - vec4 m_uv = texture(halftone_texture, tex*1); + vec4 m_uv = texture(halftone_texture, tex*.6); float m_threshold = (m_uv.r + m_uv.g + m_uv.b) / 3; // final rgba color at x,z pos @@ -46,7 +46,7 @@ void main() { // apply foam texture vec4 foam = texture(foam_texture, tex + time*.0003); vec4 j = vec4(0,0,0,0); - if (saturation > m_threshold) j = g*foam*1.8; + if (saturation > m_threshold) j = g*foam; fragColor = j; diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp index c9cee3d..0660a14 100644 --- a/src/ocean/ocean_alt.cpp +++ b/src/ocean/ocean_alt.cpp @@ -138,7 +138,7 @@ void ocean_alt::fft_prime(double t){ std::vector<Eigen::Vector2d> tmp7 = fast_fft(neg_ik_hat_h_z); for (int i = 0; i < N; i++) { - m_current_h[i] = -tmp[i]; + m_current_h[i] = tmp[i]; // m_slopes[i] = tmp2[i]; // m_displacements[i] = tmp3[i]; m_slopes_x[i] = tmp4[i]; @@ -373,7 +373,7 @@ void ocean_alt::update_ocean() // float waveheight = (height - h_0 ) / (h_max - h_0); // m_foam_constants.wavelengths[i] = waveheight; float h_0 = 0; // min*.2f; - float h_max = max*.35f; // the smaller the constant, the more foam there is + float h_max = max*.25f; // the smaller the constant, the more foam there is m_foam_constants.wavelengths[i] = (height - h_0 ) / (h_max - h_0); // if (i < 5){ |