diff --git a/FocusTerra/.vs/FocusTerra/v16/.suo b/FocusTerra/.vs/FocusTerra/v16/.suo index b5f9700a75a5db957c44891fb823dafa9c73c270..11695832942bc42c3cfc019ca52c9ab7087b48f9 100644 Binary files a/FocusTerra/.vs/FocusTerra/v16/.suo and b/FocusTerra/.vs/FocusTerra/v16/.suo differ diff --git a/FocusTerra/FocusTerra/x64/Release/FocusTerra.iobj b/FocusTerra/FocusTerra/x64/Release/FocusTerra.iobj index 7317244a33c1dea9fed5ec0f3ee65b03470cad03..e62db4f0b168fe787e3738f60e7199ba20d70bbd 100644 Binary files a/FocusTerra/FocusTerra/x64/Release/FocusTerra.iobj and b/FocusTerra/FocusTerra/x64/Release/FocusTerra.iobj differ diff --git a/FocusTerra/FocusTerra/x64/Release/FocusTerra.ipdb b/FocusTerra/FocusTerra/x64/Release/FocusTerra.ipdb index 7df30f06931d965cb43dfa515ecce6de8cf95a62..460db0c5092805b6a1387564bd967ce2bd90d23c 100644 Binary files a/FocusTerra/FocusTerra/x64/Release/FocusTerra.ipdb and b/FocusTerra/FocusTerra/x64/Release/FocusTerra.ipdb differ diff --git a/FocusTerra/FocusTerra/x64/Release/FocusTerra.log b/FocusTerra/FocusTerra/x64/Release/FocusTerra.log index e4e1eb4631518800bcd2012ee17166d65f1ceb65..9b40218443712b2a3419d42699483e246b22bca6 100644 --- a/FocusTerra/FocusTerra/x64/Release/FocusTerra.log +++ b/FocusTerra/FocusTerra/x64/Release/FocusTerra.log @@ -33,10 +33,10 @@ C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(2 C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(272,37): warning C4267: '=': conversion from 'size_t' to 'GLuint', possible loss of data C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(308,19): warning C4244: 'initializing': conversion from 'float' to 'unsigned int', possible loss of data C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(325,17): warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data -C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(439,35): warning C4305: 'argument': truncation from 'double' to 'float' -C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(440,35): warning C4305: 'argument': truncation from 'double' to 'float' +C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(443,35): warning C4305: 'argument': truncation from 'double' to 'float' +C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(444,35): warning C4305: 'argument': truncation from 'double' to 'float' Generating code -C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(429): warning C4715: 'WaveHandler::initialize_comp_data_': not all control paths return a value +C:\Users\engel\VS_Projects\FocusTerra\framebuffer-testing\src\wave_handler.cpp(433): warning C4715: 'WaveHandler::initialize_comp_data_': not all control paths return a value 1 of 2017 functions (<0.1%) were compiled, the rest were copied from previous compilation. 0 functions were new in current compilation 15 functions had inline decision re-evaluated but remain unchanged diff --git a/FocusTerra/FocusTerra/x64/Release/gui_handler.obj b/FocusTerra/FocusTerra/x64/Release/gui_handler.obj index e5cc974c666ed10b9c5eb0cb019e43c675959b71..263e570a230902c5b10f67ac755bd39099019433 100644 Binary files a/FocusTerra/FocusTerra/x64/Release/gui_handler.obj and b/FocusTerra/FocusTerra/x64/Release/gui_handler.obj differ diff --git a/FocusTerra/FocusTerra/x64/Release/vc142.pdb b/FocusTerra/FocusTerra/x64/Release/vc142.pdb index b1ae10b38b7b6ddedb666bbed9e82bb15ec46690..de27969999ea0258dfdda08d73e4964971479882 100644 Binary files a/FocusTerra/FocusTerra/x64/Release/vc142.pdb and b/FocusTerra/FocusTerra/x64/Release/vc142.pdb differ diff --git a/FocusTerra/FocusTerra/x64/Release/wave_handler.obj b/FocusTerra/FocusTerra/x64/Release/wave_handler.obj index 0f840782778b83ac6f6d90d783440e2eb2d24c79..435a8b07a7976b227d0e3611c2b1f02d7bf5c8bf 100644 Binary files a/FocusTerra/FocusTerra/x64/Release/wave_handler.obj and b/FocusTerra/FocusTerra/x64/Release/wave_handler.obj differ diff --git a/FocusTerra/x64/Release/FocusTerra.exe b/FocusTerra/x64/Release/FocusTerra.exe index c45775b5beb637760d32f25cc84d68d6daecc7b0..04f84f5c60fcb2d306f22a9ed386842d6c79efd3 100644 Binary files a/FocusTerra/x64/Release/FocusTerra.exe and b/FocusTerra/x64/Release/FocusTerra.exe differ diff --git a/FocusTerra/x64/Release/FocusTerra.pdb b/FocusTerra/x64/Release/FocusTerra.pdb index 1b8c00d4f605ecd8b73a5736248310298449724f..699976e65cb86ca97081ad96a55d7bbab9a864f0 100644 Binary files a/FocusTerra/x64/Release/FocusTerra.pdb and b/FocusTerra/x64/Release/FocusTerra.pdb differ diff --git a/shaders/render2d.frag b/shaders/render2d.frag index 3469a8606ca3bfa0979d01bbcb7e5c78afbb0d71..3328b2082ae003865d25051a7f15922bf6e4b44d 100644 --- a/shaders/render2d.frag +++ b/shaders/render2d.frag @@ -12,7 +12,10 @@ uniform sampler2D tex_damp; //damping void main(){ vec4 color = texture(tex_wave, textureCoordinates); float damping = texture(tex_damp, textureCoordinates).r; - float damping_color = 1. - damping; + //Debugging: top line + //Running: bottom line + //float damping_color = (1. - damping)*60; + float damping_color = (1. - damping); FragColor = vec4((0.25*(1.+color.r)+0.25)*damping + damping_color*0.2, damping_color*0.2, damping_color*0.2, 1.); //FragColor = color; } \ No newline at end of file diff --git a/shaders/step.frag b/shaders/step.frag index cf1db48a73b08d9cb5545d2be5fba4c816ea5728..d5bed78cca4882970e4b6209574c505243123cc5 100644 --- a/shaders/step.frag +++ b/shaders/step.frag @@ -49,5 +49,6 @@ void main() float dp = dot(A,sum); float newred = (dp + c2*onsite.r - onsite.g) * damping; + //FragColor = vec4(newred + onsite.b*source, onsite.rb, 1.); FragColor = vec4(newred + onsite.b*source, onsite.rb, 1.); } diff --git a/src/gui_handler.cpp b/src/gui_handler.cpp index 78637a2df3365aef90da2c9204fd36239d404daf..2cf858c3c806bc8050c6f668ed05797277d8dbbe 100644 --- a/src/gui_handler.cpp +++ b/src/gui_handler.cpp @@ -242,6 +242,7 @@ void GuiHandler::draw_gui_(Toolbox& tb) { tb.mailbox.push_back({ BLOCKCHAINMESSAGE::CLEAR }); tb.mailbox.push_back({ DRAWERMESSAGE::CLEAR }); } + ImGui::SameLine(); if (tb.g_state != static_cast<int>(GSTATE::FREEZE)) { if (ImGui::Button("FREEZE", ImVec2(140, 30))) { tb.g_state = static_cast<int>(GSTATE::FREEZE); diff --git a/src/wave_handler.cpp b/src/wave_handler.cpp index d6431642cf809885078c8ab54a2310ca313c8f44..2f48a807363c841c68fcca542a64eaef7a300493 100644 --- a/src/wave_handler.cpp +++ b/src/wave_handler.cpp @@ -9,7 +9,7 @@ #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> -int ij_to_tex(int i, int j, int texwidth, int texheight) { +int ij_to_tex(int i, int j, int texwidth) { return 4 * i * texwidth + 4 * j; } @@ -321,23 +321,23 @@ bool WaveHandler::initialize_comp_data_() int j_left = offscreen_pixels_x; int i_bottom = offscreen_pixels_y; int i_top = texheight_ - offscreen_pixels_y; - for (int ring_index = 0; ring_index < 280; ++ring_index) { + for (int ring_index = 0; ring_index < 280; ring_index++) { float value = 0.999f - static_cast<float>(ring_index) * 0.00005; std::cout << "Value: " << value << std::endl; /*Bottom and Top*/ for (int j = j_left - ring_index; j < j_right + ring_index; ++j) { - tex_damp_data_[ij_to_tex(i_bottom - ring_index, j, texwidth_, texheight_)] = value; - tex_damp_data_[ij_to_tex(i_top + ring_index, j, texwidth_, texheight_)] = value; + tex_damp_data_[ij_to_tex(i_bottom - ring_index, j, texwidth_)] = value; + tex_damp_data_[ij_to_tex(i_top + ring_index, j, texwidth_)] = value; } /*Left and Right*/ for (int i = i_bottom - ring_index; i < i_top + ring_index; ++i) { - tex_damp_data_[ij_to_tex(i, j_left - ring_index, texwidth_, texheight_)] = value; - tex_damp_data_[ij_to_tex(i, j_right + ring_index, texwidth_, texheight_)] = value; + tex_damp_data_[ij_to_tex(i, j_left - ring_index, texwidth_)] = value; + tex_damp_data_[ij_to_tex(i, j_right + ring_index, texwidth_)] = value; } } - /*Look at a central slice through the texture*/ + /*Debugging: Look at a central slice through the texture*/ for (int j = 0; j < texwidth_; ++j) { - std::cout << j << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_)] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 1] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 2] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 3] << std::endl; + std::cout << j << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_)] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 1] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 2] << " " << tex_damp_data_[ij_to_tex(texheight_ / 2, j, texwidth_, texheight_) + 3] << std::endl; }