├── .gitignore
├── font
└── DejaVuSans.ttf
├── pyproject.toml
├── cmake
├── FFTW
│ └── FindFFTW.cmake
├── GLFW
│ └── FindGLFW.cmake
└── GMP
│ └── FindGMP.cmake
└── src
├── gui
├── application.h
├── dialogs
│ ├── application_help.h
│ ├── application_about.h
│ ├── color_dialog.h
│ └── message.h
├── main_window
│ ├── model_tree_style.h
│ ├── model_tree_menu.h
│ ├── model_tree_actions.h
│ └── actions_repository.h
├── painter_window
│ └── initial_image.h
└── com
│ ├── command_line.h
│ ├── thread_queue.h
│ └── application_message.h
├── com
├── bit
│ └── table
│ │ └── reverse.h
├── constant.h
├── file
│ ├── read.h
│ └── path.h
├── random
│ ├── device.h
│ ├── create.h
│ └── uniform.h
├── names.h
├── variant.h
├── benchmark.h
├── log
│ └── write.h
├── message.h
├── progression.h
├── chrono.cpp
├── print.cpp
└── type
│ └── number.h
├── settings
├── name.h
├── utility.h
├── directory.h
├── dimensions.h
└── utility.cpp
├── gpu
├── renderer
│ ├── code
│ │ ├── constant.glsl
│ │ ├── renderer_volume_image.frag
│ │ ├── renderer_volume_opacity.frag
│ │ ├── renderer_volume_transparency.frag
│ │ ├── renderer_volume_image_opacity.frag
│ │ ├── renderer_volume_image_transparency.frag
│ │ ├── renderer_volume_opacity_transparency.frag
│ │ ├── renderer_volume_image_opacity_transparency.frag
│ │ ├── renderer_mesh_triangle_lines.frag
│ │ ├── renderer_mesh_normals.frag
│ │ ├── renderer_volume.vert
│ │ ├── renderer_mesh_normals.vert
│ │ ├── renderer_mesh_triangle_lines.vert
│ │ └── point_offset.glsl
│ ├── test
│ │ └── ray_tracing
│ │ │ ├── code
│ │ │ ├── renderer_ray_miss.rmiss
│ │ │ ├── renderer_ray_closest_hit.rchit
│ │ │ └── code.h
│ │ │ └── test_ray_tracing.h
│ ├── mesh
│ │ ├── meshes.h
│ │ └── sampler.h
│ ├── functionality.h
│ └── volume
│ │ └── sampler.h
├── optical_flow
│ ├── code
│ │ ├── optical_flow_view.frag
│ │ └── optical_flow_view_debug.frag
│ ├── sampler.h
│ ├── function.h
│ └── option.h
├── dft
│ ├── sampler.h
│ ├── barriers.h
│ └── code
│ │ ├── dft_view.vert
│ │ └── math.glsl
├── text_writer
│ ├── sampler.h
│ └── code
│ │ ├── code.h
│ │ ├── view_in.glsl
│ │ ├── text_writer_view.frag
│ │ └── text_writer_view.vert
├── pencil_sketch
│ ├── sampler.h
│ └── code
│ │ ├── code.h
│ │ ├── pencil_sketch_view.vert
│ │ └── pencil_sketch_view.frag
└── convex_hull
│ ├── code
│ ├── convex_hull_view.vert
│ ├── convex_hull_view.frag
│ ├── view_in.glsl
│ └── code.h
│ ├── barrier.h
│ └── size.h
├── text
├── code_points.h
├── text_data.h
└── fonts.h
├── shading
└── ggx
│ ├── table
│ └── f1_albedo.h
│ └── code
│ └── constants.glsl
├── filter
├── attitude
│ └── kalman
│ │ ├── constant.h
│ │ ├── quaternion.h
│ │ ├── init_utility.h
│ │ ├── ukf_utility.h
│ │ └── measurement.h
├── filters
│ ├── speed
│ │ └── init.h
│ ├── position
│ │ └── init.h
│ ├── direction
│ │ └── init.h
│ ├── acceleration
│ │ └── init.h
│ └── noise_model.h
├── core
│ └── test
│ │ ├── time_update_info.h
│ │ ├── view
│ │ └── point.h
│ │ ├── distribution.h
│ │ ├── smooth.h
│ │ ├── filters
│ │ ├── noise_model.h
│ │ └── filter_info.h
│ │ ├── simulator
│ │ ├── speed.h
│ │ └── acceleration.h
│ │ └── measurements.h
├── test
│ ├── time_update_details.h
│ ├── simulator
│ │ └── annotation.h
│ └── view
│ │ └── point.h
├── utility
│ └── low_pass.h
└── analysis
│ └── allan_deviation.h
├── color
├── table
│ └── conversion.h
├── samples
│ ├── blackbody_samples.h
│ └── daylight_samples.h
├── illuminants.h
└── colors.h
├── image
├── flip.h
├── depth.h
├── swap.h
├── normalize.h
├── max.h
├── file_save.h
└── grayscale.h
├── painter
├── pixels
│ ├── samples
│ │ ├── merge.h
│ │ └── com
│ │ │ └── info.h
│ └── color_contribution.h
├── test
│ └── test_painter.h
├── integrators
│ ├── bpt
│ │ ├── mis.h
│ │ └── vertex
│ │ │ └── vertex.h
│ └── pt
│ │ └── pt.h
└── shapes
│ └── mesh
│ └── optimize.h
├── vulkan
├── strings
│ ├── api_version.h
│ ├── format.h
│ ├── result.h
│ ├── image_type.h
│ ├── color_space.h
│ ├── image_layout.h
│ ├── present_mode.h
│ ├── primitive_topology.h
│ ├── physical_device_type.h
│ ├── point_clipping_behavior.h
│ ├── pipeline_robustness_image_behavior.h
│ ├── shader_float_controls_independence.h
│ └── pipeline_robustness_buffer_behavior.h
├── instance
│ ├── debug.h
│ ├── info.h
│ └── create.h
├── overview.h
├── sync.h
├── sample.h
└── physical_device
│ ├── properties.h
│ └── functionality.h
├── dft
├── fftw.h
├── cufft.h
└── dft.h
├── model
├── mesh
│ ├── normals.h
│ ├── optimize.h
│ ├── file
│ │ ├── obj
│ │ │ └── name.h
│ │ ├── load_obj.h
│ │ ├── load_txt.h
│ │ ├── save_obj.h
│ │ ├── file_type.h
│ │ ├── load_stl.h
│ │ └── save_stl.h
│ ├── create_lines.h
│ ├── create_facets.h
│ └── create_points.h
└── volume_utility.h
├── noise
├── noise.h
├── simplex_noise.h
├── functions.h
└── tables.h
├── numerical
└── test
│ └── test_vector.cpp
├── window
├── handle.h
└── surface.h
├── process
├── options.h
├── testing.h
├── computing.h
├── dimension.cpp
├── compute_volume.h
├── saving.h
└── compute_meshes.h
├── view
├── view.h
├── com
│ └── window.h
├── create.h
└── view
│ ├── view.h
│ └── buffer_info.h
├── sampling
└── testing
│ └── functions.h
└── geometry
├── shapes
├── test
│ └── compare.cpp
└── sphere_create.h
├── reconstruction
└── extract_manifold.h
├── graph
└── mst.h
└── spatial
└── intersection
└── average.h
/.gitignore:
--------------------------------------------------------------------------------
1 | /CMakeLists.txt.user
2 |
--------------------------------------------------------------------------------
/font/DejaVuSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cppd/math/HEAD/font/DejaVuSans.ttf
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.isort]
2 | atomic = true
3 | combine_star = true
4 | line_length = 120
5 | order_by_type = true
6 | py_version = "auto"
7 |
8 | [tool.black]
9 | line-length = 120
10 | target-version = ["py311"]
11 |
--------------------------------------------------------------------------------
/cmake/FFTW/FindFFTW.cmake:
--------------------------------------------------------------------------------
1 | # FFTW_FOUND
2 | # FFTW_INCLUDE_DIRS
3 | # FFTW_LIBRARIES
4 | # FFTW_THREAD_LIBRARIES
5 |
6 | if (FFTW_INCLUDE_DIRS AND FFTW_LIBRARIES AND FFTW_THREAD_LIBRARIES)
7 | set(FFTW_FIND_QUIETLY TRUE)
8 | endif()
9 |
10 | find_library(FFTW_LIBRARIES NAMES fftw3f libfftw3f)
11 | find_library(FFTW_THREAD_LIBRARIES NAMES fftw3f_threads libfftw3f_threads)
12 | find_path(FFTW_INCLUDE_DIRS NAMES fftw3.h)
13 |
14 | include(FindPackageHandleStandardArgs)
15 | find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_INCLUDE_DIRS FFTW_LIBRARIES FFTW_THREAD_LIBRARIES)
16 | mark_as_advanced(FFTW_INCLUDE_DIRS FFTW_LIBRARIES FFTW_THREAD_LIBRARIES)
17 |
--------------------------------------------------------------------------------
/cmake/GLFW/FindGLFW.cmake:
--------------------------------------------------------------------------------
1 | # GLFW_FOUND
2 | # GLFW_INCLUDE_DIRS
3 | # GLFW_LIBRARIES
4 |
5 | if (GLFW_INCLUDE_DIRS AND GLFW_LIBRARIES)
6 | set(GLFW_FIND_QUIETLY TRUE)
7 | endif()
8 |
9 | find_library(GLFW_LIBRARIES NAMES glfw libglfw glfw3 libglfw3)
10 | find_path(GLFW_MAIN_INCLUDE_DIR NAMES GLFW/glfw3.h)
11 | find_path(GLFW_NATIVE_INCLUDE_DIR NAMES GLFW/glfw3native.h)
12 |
13 | if (GLFW_MAIN_INCLUDE_DIR AND GLFW_NATIVE_INCLUDE_DIR)
14 | set(GLFW_INCLUDE_DIRS "${GLFW_MAIN_INCLUDE_DIR}" "${GLFW_NATIVE_INCLUDE_DIR}")
15 | list(REMOVE_DUPLICATES GLFW_INCLUDE_DIRS)
16 | endif()
17 |
18 | include(FindPackageHandleStandardArgs)
19 | find_package_handle_standard_args(GLFW DEFAULT_MSG GLFW_INCLUDE_DIRS GLFW_LIBRARIES)
20 | mark_as_advanced(GLFW_INCLUDE_DIRS GLFW_LIBRARIES)
21 |
--------------------------------------------------------------------------------
/cmake/GMP/FindGMP.cmake:
--------------------------------------------------------------------------------
1 | # GMP_FOUND
2 | # GMP_INCLUDE_DIRS
3 | # GMP_C_LIBRARIES
4 | # GMP_CXX_LIBRARIES
5 |
6 | if (GMP_INCLUDE_DIRS AND GMP_C_LIBRARIES AND GMP_CXX_LIBRARIES)
7 | set(GMP_FIND_QUIETLY TRUE)
8 | endif()
9 |
10 | find_library(GMP_C_LIBRARIES NAMES gmp libgmp)
11 | find_library(GMP_CXX_LIBRARIES NAMES gmpxx libgmpxx)
12 | find_path(GMP_C_INCLUDES NAMES gmp.h)
13 | find_path(GMP_CXX_INCLUDES NAMES gmpxx.h)
14 |
15 | if (GMP_C_INCLUDES AND GMP_CXX_INCLUDES)
16 | set(GMP_INCLUDE_DIRS "${GMP_C_INCLUDES}" "${GMP_CXX_INCLUDES}")
17 | list(REMOVE_DUPLICATES GMP_INCLUDE_DIRS)
18 | endif()
19 |
20 | include(FindPackageHandleStandardArgs)
21 | find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIRS GMP_C_LIBRARIES GMP_CXX_LIBRARIES)
22 | mark_as_advanced(GMP_INCLUDE_DIRS GMP_C_LIBRARIES GMP_CXX_LIBRARIES)
--------------------------------------------------------------------------------
/src/gui/application.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui
21 | {
22 | int run_application(int argc, char** argv);
23 | }
24 |
--------------------------------------------------------------------------------
/src/gui/dialogs/application_help.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui::dialogs
21 | {
22 | void application_help();
23 | }
24 |
--------------------------------------------------------------------------------
/src/com/bit/table/reverse.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | namespace ns::bit::table
21 | {
22 | std::string bit_reverse_lookup_table();
23 | }
24 |
--------------------------------------------------------------------------------
/src/gui/dialogs/application_about.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui::dialogs
21 | {
22 | void application_about(bool ray_tracing);
23 | }
24 |
--------------------------------------------------------------------------------
/src/settings/name.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::settings
21 | {
22 | inline constexpr const char* APPLICATION_NAME = "Math Viewer";
23 | }
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/constant.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef CONSTANT_GLSL
19 | #define CONSTANT_GLSL
20 |
21 | const float FLOAT_EPSILON = 1.0 / (1 << 23);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/text/code_points.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::text
23 | {
24 | std::vector supported_code_points();
25 | }
26 |
--------------------------------------------------------------------------------
/src/settings/utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::settings
23 | {
24 | std::flat_set supported_dimensions();
25 | }
26 |
--------------------------------------------------------------------------------
/src/shading/ggx/table/f1_albedo.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::shading::ggx::table
23 | {
24 | std::string f1_albedo_tables();
25 | }
26 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/code/optical_flow_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) out vec4 color;
21 |
22 | void main()
23 | {
24 | color = vec4(1);
25 | }
26 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_opacity.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define OPACITY
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/com/constant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | inline constexpr T PI = 3.1415926535897932384626433832795028841971693993751L;
24 | }
25 |
--------------------------------------------------------------------------------
/src/com/file/read.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | template
25 | std::vector read_file(const Path& path);
26 | }
27 |
--------------------------------------------------------------------------------
/src/com/random/device.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | void read_system_random(std::span bytes);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define TRANSPARENCY
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/constant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::attitude::kalman
21 | {
22 | template
23 | inline constexpr T W_THRESHOLD{1e-5}; // rad/s
24 | }
25 |
--------------------------------------------------------------------------------
/src/color/table/conversion.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | namespace ns::color::table
21 | {
22 | std::string conversion_lookup_table_float();
23 | std::string conversion_lookup_table_uint16();
24 | }
25 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_opacity.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define OPACITY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define TRANSPARENCY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/image/flip.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "image.h"
21 |
22 | #include
23 |
24 | namespace ns::image
25 | {
26 | template
27 | void flip_vertically(Image* image);
28 | }
29 |
--------------------------------------------------------------------------------
/src/settings/directory.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::settings
24 | {
25 | std::filesystem::path test_path(std::string_view utf8_name);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_opacity_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define OPACITY
21 | #define TRANSPARENCY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/painter/pixels/samples/merge.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::painter::pixels::samples
21 | {
22 | template
23 | [[nodiscard]] Samples merge_samples(const Samples& a, const Samples& b);
24 | }
25 |
--------------------------------------------------------------------------------
/src/vulkan/strings/api_version.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::vulkan::strings
24 | {
25 | std::string api_version_to_string(std::uint32_t api_version);
26 | }
27 |
--------------------------------------------------------------------------------
/src/vulkan/strings/format.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string format_to_string(VkFormat format);
27 | }
28 |
--------------------------------------------------------------------------------
/src/vulkan/strings/result.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string result_to_string(VkResult result);
27 | }
28 |
--------------------------------------------------------------------------------
/src/com/names.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | inline std::string space_name(const int dimension)
25 | {
26 | return std::to_string(dimension) + "-space";
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/dft/fftw.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #ifdef FFTW_FOUND
21 |
22 | #include "dft.h"
23 |
24 | #include
25 |
26 | namespace ns::dft
27 | {
28 | std::unique_ptr create_fftw(int x, int y);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/dft/cufft.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #ifdef CUDA_FOUND
21 |
22 | #include "dft.h"
23 |
24 | #include
25 |
26 | namespace ns::dft
27 | {
28 | std::unique_ptr create_cufft(int x, int y);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/gpu/dft/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::dft
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/model/mesh/normals.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::model::mesh
25 | {
26 | template
27 | void compute_normals(Mesh* mesh);
28 | }
29 |
--------------------------------------------------------------------------------
/src/model/mesh/optimize.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::model::mesh
25 | {
26 | template
27 | Mesh optimize(const Mesh& mesh);
28 | }
29 |
--------------------------------------------------------------------------------
/src/noise/noise.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | #include
21 |
22 | namespace ns::noise
23 | {
24 | template
25 | [[nodiscard]] T noise(const numerical::Vector& p);
26 | }
27 |
--------------------------------------------------------------------------------
/src/image/depth.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "image.h"
21 |
22 | #include
23 |
24 | namespace ns::image
25 | {
26 | template
27 | [[nodiscard]] Image convert_to_8_bit(const Image& image);
28 | }
29 |
--------------------------------------------------------------------------------
/src/image/swap.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "format.h"
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::image
26 | {
27 | void swap_rb(ColorFormat color_format, const std::span& bytes);
28 | }
29 |
--------------------------------------------------------------------------------
/src/vulkan/strings/image_type.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string image_type_to_string(VkImageType image_type);
27 | }
28 |
--------------------------------------------------------------------------------
/src/filter/filters/speed/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::speed
21 | {
22 | template
23 | struct Init final
24 | {
25 | T acceleration;
26 | T acceleration_variance;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_opacity_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define OPACITY
22 | #define TRANSPARENCY
23 |
24 | #extension GL_GOOGLE_include_directive : enable
25 | #include "volume.glsl"
26 |
--------------------------------------------------------------------------------
/src/image/normalize.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "format.h"
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::image
26 | {
27 | void normalize(ColorFormat color_format, std::vector* bytes);
28 | }
29 |
--------------------------------------------------------------------------------
/src/vulkan/strings/color_space.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string color_space_to_string(VkColorSpaceKHR color_space);
27 | }
28 |
--------------------------------------------------------------------------------
/src/vulkan/strings/image_layout.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string image_layout_to_string(VkImageLayout image_layout);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::text_writer
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/vulkan/strings/present_mode.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string present_mode_to_string(VkPresentModeKHR present_mode);
27 | }
28 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/quaternion.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::filter::attitude::kalman
23 | {
24 | template
25 | using Quaternion = numerical::QuaternionHJ;
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::optical_flow
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::pencil_sketch
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::text_writer
24 | {
25 | std::vector code_view_vert();
26 | std::vector code_view_frag();
27 | }
28 |
--------------------------------------------------------------------------------
/src/com/variant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | struct Visitors final : T...
24 | {
25 | using T::operator()...;
26 | };
27 |
28 | template
29 | Visitors(T...) -> Visitors;
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/convex_hull_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | void main()
24 | {
25 | gl_Position = matrix * vec4(points[gl_VertexIndex].xy, 0, 1);
26 | }
27 |
--------------------------------------------------------------------------------
/src/vulkan/strings/primitive_topology.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string primitive_topology_to_string(VkPrimitiveTopology primitive_topology);
27 | }
28 |
--------------------------------------------------------------------------------
/src/noise/simplex_noise.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::noise
25 | {
26 | template
27 | [[nodiscard]] T simplex_noise(const numerical::Vector& p);
28 | }
29 |
--------------------------------------------------------------------------------
/src/painter/pixels/color_contribution.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::painter::pixels
21 | {
22 | template
23 | [[nodiscard]] decltype(auto) sample_color_contribution(const Color& color)
24 | {
25 | return color.luminance();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/vulkan/instance/debug.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::instance
25 | {
26 | handle::DebugUtilsMessengerEXT create_debug_utils_messenger(VkInstance instance);
27 | }
28 |
--------------------------------------------------------------------------------
/src/vulkan/overview.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan
25 | {
26 | std::string overview();
27 | std::string overview_physical_devices(VkInstance instance, VkSurfaceKHR surface);
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/benchmark.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | void do_not_optimize(const T& v)
24 | {
25 | asm volatile("" : : "r,m"(v) : "memory");
26 | }
27 |
28 | template
29 | void do_not_optimize(T&) = delete;
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/renderer_ray_miss.rmiss:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_EXT_ray_tracing : require
21 |
22 | layout(location = 0) rayPayloadInEXT vec3 hit_value;
23 |
24 | void main()
25 | {
26 | hit_value = vec3(0.1, 0.1, 0.1);
27 | }
28 |
--------------------------------------------------------------------------------
/src/model/mesh/file/obj/name.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::model::mesh::file::obj
24 | {
25 | inline std::string obj_name(const std::size_t n)
26 | {
27 | return "OBJ-" + std::to_string(n);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/vulkan/strings/physical_device_type.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string physical_device_type_to_string(VkPhysicalDeviceType physical_device_type);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/convex_hull_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | layout(location = 0) out vec4 color;
24 |
25 | void main()
26 | {
27 | color = vec4(brightness.xxx, 1);
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_triangle_lines.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "mesh_in.glsl"
22 | #include "mesh_out.glsl"
23 |
24 | void main()
25 | {
26 | set_fragment_color(drawing.clip_plane_color);
27 | }
28 |
--------------------------------------------------------------------------------
/src/filter/core/test/time_update_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "filters/filter.h"
21 |
22 | namespace ns::filter::core::test
23 | {
24 | template
25 | struct TimeUpdateInfo final
26 | {
27 | T time;
28 | filters::UpdateInfo info;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/src/gui/main_window/model_tree_style.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gui::main_window
23 | {
24 | void set_model_tree_item_style(QTreeWidgetItem* item, bool visible);
25 | void set_model_tree_item_style_deleted(QTreeWidgetItem* item);
26 | }
27 |
--------------------------------------------------------------------------------
/src/image/max.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "format.h"
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace ns::image
27 | {
28 | [[nodiscard]] std::optional max(ColorFormat color_format, std::span bytes);
29 | }
30 |
--------------------------------------------------------------------------------
/src/vulkan/strings/point_clipping_behavior.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string point_clipping_behavior_to_string(VkPointClippingBehavior point_clipping_behavior);
27 | }
28 |
--------------------------------------------------------------------------------
/src/color/samples/blackbody_samples.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::color::samples
23 | {
24 | std::vector blackbody_a_samples(int from, int to, int count);
25 | std::vector blackbody_samples(double t, int from, int to, int count);
26 | }
27 |
--------------------------------------------------------------------------------
/src/text/text_data.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::text
24 | {
25 | struct TextData final
26 | {
27 | int step_y;
28 | int start_x;
29 | int start_y;
30 | std::vector text;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/filter/filters/position/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::position
21 | {
22 | template
23 | struct Init final
24 | {
25 | T speed;
26 | T speed_variance;
27 | T acceleration;
28 | T acceleration_variance;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/test_ray_tracing.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::renderer::test
24 | {
25 | void test_ray_tracing(const vulkan::Device& device, const vulkan::Queue& compute_queue);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/view_in.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef VIEW_IN_GLSL
19 | #define VIEW_IN_GLSL
20 |
21 | layout(std140, binding = 0) restrict uniform Data
22 | {
23 | mat4 matrix;
24 | vec3 color;
25 | }
26 | data;
27 |
28 | layout(binding = 1) uniform sampler2D tex;
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/src/numerical/test/test_vector.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | namespace ns::numerical
21 | {
22 | static_assert(sizeof(Vector2f) == 2 * sizeof(float));
23 | static_assert(sizeof(Vector3f) == 3 * sizeof(float));
24 | static_assert(sizeof(Vector4f) == 4 * sizeof(float));
25 | }
26 |
--------------------------------------------------------------------------------
/src/vulkan/sync.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan
25 | {
26 | void reset_fence(VkDevice device, VkFence fence);
27 | bool wait_for_fence(VkDevice device, VkFence fence, std::uint64_t timeout_nanoseconds);
28 | }
29 |
--------------------------------------------------------------------------------
/src/dft/dft.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::dft
24 | {
25 | class DFT
26 | {
27 | public:
28 | virtual ~DFT() = default;
29 |
30 | virtual void exec(bool inverse, std::vector>* data) = 0;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/noise/functions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::noise
25 | {
26 | template
27 | [[nodiscard]] T fractal_noise(const numerical::Vector& p, int count, T lacunarity, T gain);
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/log/write.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | std::string write_log(std::string_view text, std::string_view description) noexcept;
26 |
27 | [[noreturn]] void write_log_fatal_error_and_exit(const char* text) noexcept;
28 | }
29 |
--------------------------------------------------------------------------------
/src/filter/core/test/view/point.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::core::test::view
21 | {
22 | template
23 | struct Point final
24 | {
25 | T time;
26 | T position;
27 | T position_stddev;
28 | T speed;
29 | T speed_stddev;
30 | };
31 | }
32 |
--------------------------------------------------------------------------------
/src/gui/dialogs/color_dialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::gui::dialogs
26 | {
27 | void color_dialog(const std::string& title, const QColor& current_color, const std::function& f);
28 | }
29 |
--------------------------------------------------------------------------------
/src/image/file_save.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "image.h"
21 |
22 | #include
23 |
24 | namespace ns::image
25 | {
26 | [[nodiscard]] std::string_view save_file_extension();
27 |
28 | template
29 | void save(const Path& path, const ImageView<2>& image_view);
30 | }
31 |
--------------------------------------------------------------------------------
/src/window/handle.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::window
21 | {
22 | #ifdef __linux__
23 |
24 | using WindowID = unsigned long;
25 |
26 | #elifdef _WIN32
27 |
28 | struct HWND__;
29 | using WindowID = HWND__*;
30 |
31 | #else
32 | #error This operating system is not supported
33 | #endif
34 | }
35 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::pencil_sketch
24 | {
25 | std::vector code_compute_comp();
26 | std::vector code_view_vert();
27 | std::vector code_view_frag();
28 | }
29 |
--------------------------------------------------------------------------------
/src/painter/test/test_painter.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::painter
23 | {
24 | void test_painter_file();
25 | void test_painter_file(const std::string& file_name);
26 |
27 | void test_painter_window();
28 | void test_painter_window(const std::string& file_name);
29 | }
30 |
--------------------------------------------------------------------------------
/src/settings/dimensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::settings
23 | {
24 | using Dimensions = std::index_sequence<3, 4, 5, 6>;
25 |
26 | using Dimensions2 = std::index_sequence<2, 3, 4, 5, 6>;
27 |
28 | using Dimensions2A = std::index_sequence<2, 3, 4, 5, 6, 7>;
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_normals.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "mesh_out.glsl"
22 |
23 | layout(location = 0) in GS
24 | {
25 | vec3 color;
26 | }
27 | gs;
28 |
29 | void main()
30 | {
31 | set_fragment_color(gs.color);
32 | }
33 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | const vec4 vertices[3] = {vec4(-1, -1, 0, 1), vec4(3, -1, 0, 1), vec4(-1, 3, 0, 1)};
21 |
22 | out gl_PerVertex
23 | {
24 | vec4 gl_Position;
25 | };
26 |
27 | void main()
28 | {
29 | gl_Position = vertices[gl_VertexIndex];
30 | }
31 |
--------------------------------------------------------------------------------
/src/shading/ggx/code/constants.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef SHADING_GGX_CONSTANTS_GLSL
19 | #define SHADING_GGX_CONSTANTS_GLSL
20 |
21 | const float SHADING_GGX_PI = 3.1415926535897932384626433832795028841971693993751;
22 |
23 | const float SHADING_GGX_PI_R = 0.31830988618379067153776752674502872406891929148091;
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/src/window/surface.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "handle.h"
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace ns::window
27 | {
28 | std::string vulkan_create_surface_extension();
29 | VkSurfaceKHR vulkan_create_surface(WindowID window, VkInstance instance);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gui/painter_window/initial_image.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::gui::painter_window
26 | {
27 | std::vector make_initial_image(const std::vector& screen_size, image::ColorFormat color_format);
28 | }
29 |
--------------------------------------------------------------------------------
/src/model/volume_utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "volume/bounding_box.h" // IWYU pragma: export
21 | #include "volume/file.h" // IWYU pragma: export
22 | #include "volume/matrix.h" // IWYU pragma: export
23 | #include "volume/position.h" // IWYU pragma: export
24 | #include "volume/vertices.h" // IWYU pragma: export
25 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/barrier.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gpu::convex_hull
23 | {
24 | void buffer_barrier(
25 | VkCommandBuffer command_buffer,
26 | VkBuffer buffer,
27 | VkAccessFlags dst_access_mask,
28 | VkPipelineStageFlags dst_stage_mask);
29 | }
30 |
--------------------------------------------------------------------------------
/src/process/options.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::process
25 | {
26 | inline constexpr double SCENE_SIZE = 2;
27 |
28 | template
29 | inline constexpr numerical::Vector SCENE_CENTER = numerical::Vector(0);
30 | }
31 |
--------------------------------------------------------------------------------
/src/view/view.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "event.h"
21 |
22 | #include
23 |
24 | namespace ns::view
25 | {
26 | class View
27 | {
28 | public:
29 | virtual ~View() = default;
30 |
31 | virtual void send(Command&&) = 0;
32 | virtual void receive(const std::vector& info) = 0;
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/src/vulkan/strings/pipeline_robustness_image_behavior.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string pipeline_robustness_image_behavior_to_string(
27 | VkPipelineRobustnessImageBehavior pipeline_robustness_image_behavior);
28 | }
29 |
--------------------------------------------------------------------------------
/src/vulkan/strings/shader_float_controls_independence.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string shader_float_controls_independence_to_string(
27 | VkShaderFloatControlsIndependence shader_float_controls_independence);
28 | }
29 |
--------------------------------------------------------------------------------
/src/filter/test/time_update_details.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::filter::test
25 | {
26 | template
27 | struct TimeUpdateDetails final
28 | {
29 | T time;
30 | filters::UpdateDetails details;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/vulkan/strings/pipeline_robustness_buffer_behavior.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan::strings
25 | {
26 | std::string pipeline_robustness_buffer_behavior_to_string(
27 | VkPipelineRobustnessBufferBehavior pipeline_robustness_buffer_behavior);
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/view_in.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef VIEW_IN_GLSL
19 | #define VIEW_IN_GLSL
20 |
21 | layout(std140, binding = 0) restrict uniform Data
22 | {
23 | mat4 matrix;
24 | float brightness;
25 | };
26 |
27 | layout(std430, binding = 1) readonly restrict buffer Points
28 | {
29 | ivec2 points[];
30 | };
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/src/vulkan/instance/info.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | namespace ns::vulkan::instance
25 | {
26 | std::unordered_set supported_extensions();
27 |
28 | std::unordered_set supported_layers();
29 |
30 | std::uint32_t supported_api_version();
31 | }
32 |
--------------------------------------------------------------------------------
/src/process/testing.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::process
25 | {
26 | enum class TestType
27 | {
28 | SMALL,
29 | ALL,
30 | BENCHMARK
31 | };
32 |
33 | std::function action_self_test(TestType test_type);
34 | }
35 |
--------------------------------------------------------------------------------
/src/sampling/testing/functions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::sampling::testing
23 | {
24 | inline double round_distribution_count(const double count)
25 | {
26 | const double round_to = std::pow(10, std::round(std::log10(count)) - 2);
27 | return std::ceil(count / round_to) * round_to;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/dft/barriers.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gpu::dft
23 | {
24 | void buffer_barrier(VkCommandBuffer command_buffer, VkBuffer buffer);
25 | void image_barrier_before(VkCommandBuffer command_buffer, VkImage image);
26 | void image_barrier_after(VkCommandBuffer command_buffer, VkImage image);
27 | }
28 |
--------------------------------------------------------------------------------
/src/filter/filters/direction/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::direction
21 | {
22 | template
23 | struct Init final
24 | {
25 | T angle;
26 | T angle_variance;
27 | T acceleration;
28 | T acceleration_variance;
29 | T angle_speed;
30 | T angle_speed_variance;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/geometry/shapes/test/compare.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include "compare.h"
19 |
20 | namespace ns::geometry::shapes::test
21 | {
22 | static_assert(compare(1, 1.1, 1.1));
23 | static_assert(compare(1000, 10000.100000001, 10000.100000002));
24 | static_assert(!compare(1, 10000.100000001, 10000.100000002));
25 | static_assert(!compare(1, 10000.100000002, 10000.100000001));
26 | }
27 |
--------------------------------------------------------------------------------
/src/com/message.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | void message_error(const std::string_view& msg) noexcept;
25 | void message_error_fatal(const std::string_view& msg) noexcept;
26 | void message_warning(const std::string_view& msg) noexcept;
27 | void message_information(const std::string_view& msg) noexcept;
28 | }
29 |
--------------------------------------------------------------------------------
/src/gui/main_window/model_tree_menu.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "model_tree_actions.h"
21 |
22 | #include
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace ns::gui::main_window
29 | {
30 | std::unique_ptr make_model_tree_menu_for_object(ModelTreeActions* actions, model::ObjectId id, bool visible);
31 | }
32 |
--------------------------------------------------------------------------------
/src/com/file/path.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | template
26 | std::string generic_utf8_filename(const T& path);
27 |
28 | template
29 | std::filesystem::path path_from_utf8(const T& filename);
30 |
31 | std::filesystem::path path_from_utf8(const char* filename);
32 | }
33 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_normals.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec3 position;
21 | layout(location = 1) in vec3 normal;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec3 position;
26 | vec3 normal;
27 | }
28 | vs;
29 |
30 | void main()
31 | {
32 | vs.position = position;
33 | vs.normal = normal;
34 | }
35 |
--------------------------------------------------------------------------------
/src/model/mesh/file/load_obj.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | #include
24 | #include
25 |
26 | namespace ns::model::mesh::file
27 | {
28 | template
29 | std::unique_ptr> load_from_obj_file(const Path& file_name, progress::Ratio* progress);
30 | }
31 |
--------------------------------------------------------------------------------
/src/model/mesh/file/load_txt.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | #include
24 | #include
25 |
26 | namespace ns::model::mesh::file
27 | {
28 | template
29 | std::unique_ptr> load_from_txt_file(const Path& file_name, progress::Ratio* progress);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/renderer_ray_closest_hit.rchit:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_EXT_ray_tracing : require
21 |
22 | layout(location = 0) rayPayloadInEXT vec3 hit_value;
23 | hitAttributeEXT vec2 hit_attribute;
24 |
25 | void main()
26 | {
27 | hit_value = vec3(hit_attribute.x, hit_attribute.y, 1 - hit_attribute.x - hit_attribute.y);
28 | }
29 |
--------------------------------------------------------------------------------
/src/vulkan/instance/create.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::vulkan::instance
26 | {
27 | handle::Instance create_instance(
28 | const std::unordered_set& required_layers,
29 | const std::unordered_set& required_extensions);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/mesh/meshes.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "object.h"
21 |
22 | #include
23 |
24 | namespace ns::gpu::renderer
25 | {
26 | void find_opaque_and_transparent_meshes(
27 | const std::vector& meshes,
28 | std::vector* opaque_meshes,
29 | std::vector* transparent_meshes);
30 | }
31 |
--------------------------------------------------------------------------------
/src/model/mesh/file/save_obj.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace ns::model::mesh::file
27 | {
28 | template
29 | std::filesystem::path save_to_obj_file(const Mesh& mesh, const Path& file_name, std::string_view comment);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gui/com/command_line.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gui::com
24 | {
25 | std::string command_line_description();
26 |
27 | struct CommandLineOptions final
28 | {
29 | std::filesystem::path file_name;
30 | bool no_object_selection_dialog;
31 | };
32 |
33 | CommandLineOptions command_line_options();
34 | }
35 |
--------------------------------------------------------------------------------
/src/image/grayscale.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "format.h"
21 | #include "image.h"
22 |
23 | #include
24 | #include
25 |
26 | namespace ns::image
27 | {
28 | void make_grayscale(ColorFormat color_format, const std::span& bytes);
29 |
30 | template
31 | [[nodiscard]] Image convert_to_r_component_format(const Image& image);
32 | }
33 |
--------------------------------------------------------------------------------
/src/gpu/dft/code/dft_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec4 vertex_position;
21 | layout(location = 1) in vec2 texture_coordinates;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec2 texture_coordinates;
26 | }
27 | vs;
28 |
29 | void main()
30 | {
31 | gl_Position = vertex_position;
32 | vs.texture_coordinates = texture_coordinates;
33 | }
34 |
--------------------------------------------------------------------------------
/src/view/com/window.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::view::com
26 | {
27 | std::tuple, std::optional>> window_position_and_size(
28 | bool two_windows,
29 | int width,
30 | int height,
31 | int frame);
32 | }
33 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/code/pencil_sketch_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec4 position;
21 | layout(location = 1) in vec2 texture_coordinates;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec2 texture_coordinates;
26 | }
27 | vs;
28 |
29 | void main()
30 | {
31 | gl_Position = position;
32 | vs.texture_coordinates = texture_coordinates;
33 | }
34 |
--------------------------------------------------------------------------------
/src/gpu/renderer/mesh/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | #include
24 |
25 | namespace ns::gpu::renderer
26 | {
27 | vulkan::handle::Sampler create_mesh_texture_sampler(const vulkan::Device& device, bool anisotropy);
28 | vulkan::handle::Sampler create_mesh_shadow_sampler(VkDevice device);
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::renderer::test
24 | {
25 | std::vector code_ray_closest_hit_rchit();
26 | std::vector code_ray_generation_rgen();
27 | std::vector code_ray_miss_rmiss();
28 | std::vector code_ray_query_comp();
29 | }
30 |
--------------------------------------------------------------------------------
/src/painter/pixels/samples/com/info.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::painter::pixels::samples::com
23 | {
24 | template
25 | struct Info;
26 |
27 | template typename Samples, std::size_t N, typename Color>
28 | struct Info> final
29 | {
30 | static constexpr std::size_t COUNT = N;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/vulkan/sample.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::vulkan
25 | {
26 | std::flat_set supported_sample_counts(const VkPhysicalDeviceLimits& limits);
27 |
28 | VkSampleCountFlagBits sample_count_to_sample_count_flag(int sample_count);
29 | int sample_count_flag_to_sample_count(VkSampleCountFlagBits sample_count);
30 | }
31 |
--------------------------------------------------------------------------------
/src/filter/utility/low_pass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::filter::utility
24 | {
25 | template
26 | class LowPassFilter final
27 | {
28 | std::deque values_;
29 |
30 | public:
31 | void clear();
32 |
33 | void push(T value);
34 |
35 | [[nodiscard]] std::optional value() const;
36 | };
37 | }
38 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::convex_hull
24 | {
25 | std::vector code_prepare_comp();
26 | std::vector code_merge_comp();
27 | std::vector