Jackalope / jen (public) (License: GPLv3 or later version) (since 2018-10-24) (hash sha1)
----> ABOUT:

3D rendering and computing framework based on Vulkan API.

Libraries:
- simdcpp submodule (see my simdcpp repo)
- jmath submodule (see my jmath repo)
- mesh (constexpr generation of cubes, spheres, icosahedrons subdivisions)
- atlas (1D lines and 2D rectangles cutting)
- jlib submodule (see my jlib repo)
- jrf submodule (see my jrf repo)
- vkw (Vulkan API C++ wrapper)
Modules:
- compute (run compute shaders on gpu)
- graphics (draw models with clustered forward rendering and onscreen text)
- resource manager (load meshes, models, textures, scene data from
files and create related objects in graphics module)

----> INSTALLING:

To download all the parts of this framework it's enough to launch
git clone with recursive flag:

$ git clone —recursive ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jen

After this look at git tags:

$ git tag

It is recommended to use a tagged version instead of the latest commit,
because the first commit after the tagged one mostly includes incompatible
parts of future changes for the next version.

$ git checkout v0.1.0

----> DEPENDENCIES:

To use JEN as CMake subdirectory and successfully build programs with it
you need to make sure you have all of its dependencies:
- compiler: Clang or GCC, support for C++17. Clang 10+ or GCC 9+ is recommended,
compiling on Windows OS is tricky and requires something like MinGW with MSYS,
there are also some complications to go through to make dependencies work;
- GLFW3 library, supported version is 3.2.1;
- FreeType library, if graphics module will be used;
- Vulkan API headers, and optional validation layers to debug sneaky problems,
you also need Vulkan support in your graphics driver to run compiled programs;
- LibZip can be necessary, if JRF is used to read zip files;
- CMake, for obvious reasons;
- glslangValidator to compile shader for the graphics module.

CMake must be able to find GLFW3, Vulkan and FreeType (for graphics)
with find_package().

----> HOW TO USE IT:

To use JEN, you need to add it as a subdirectory:

add_subdirecroty(${PATH_TO_JEN})

There are several configuration options:
- JEN_MODULE_COMPUTE - turn compute module on for compiling and including;
- JEN_MODULE_GRAPHICS - turn graphics module on ...;
- JEN_MULTITHREADED_DRAW_FRAME - draw_frame function will use thread pool queue
instead of linear executing;
- JEN_MODULE_RESOURCE_MANAGER - resource manager module ON, if graphics is ON;
- JEN_VLK_VALIDATION - enable Vulkan Validation Layers to debug some errors
related to JEN. This will often produce false-positive,
as well as true-positive errors.

Look in CMakeLists.txt at JenExamples repo for details on how to use and
configure JEN automatically:

$ git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/JenExamples

Also I recommend to compile and run examples to make sure it works correctly.

----> SUPPORTED HARDWARE:

JEN has not been tested well, because it requires running it on large amount of
different hardware to do so. It must work with mesa driver and modern
Intel i965 GPUs as well as AMD GPUs.


----> DOCUMENTATION:

You can generate Doxygen documentation, to do so
turn on any of JEN_DOXYGEN_* options and run documentation target in cmake:

$ cmake -G %1 -DJEN_DOXYGEN_HTML=ON -DJEN_DOXYGEN_LATEX=ON
$ cmake —build —target documentation

Resource manager is not documented because it still requires large enhancements.
List of commits:
Subject Hash Author Date (UTC)
New shading type SHADOW_MAPPING is added to remove experimental shadow mapping from DEFAULT. d4651206b1798ddec7e3275352f48445b8a184d2 Jackalope 2020-06-01 04:01:29
Debug pipelines crash fix. 9b0a75d94e30eb7fd45360f7fe10429bf05c243e Jackalope 2020-06-01 04:00:24
Window improvements. scroll_diff and cursor_diff members. Update noclip screen. 8d659590a0fb52e1e24683305a7ee8699bdff6da Jackalope 2020-06-01 01:30:50
Update jlib 0.4.1 Update jrf 0.2.2 d36e5263523a9b0443476b2db8d856e86086af81 Jackalope 2020-05-31 23:58:41
Update jmath 0.1.2. 8d3566336ef87f73318e84cde87bdf841240dcdc Jackalope 2020-05-31 23:57:25
Use scanf instead of fgets for interactive device selection. fd7ff8b61ef1e21852d6c0a15ab0d17d09c5cccc Jackalope 2020-05-31 23:56:34
Include FreeType as system library to prevent warnings. dc92c7f8acdaa90b25cf272f1730d338111780fc Jackalope 2020-05-31 23:54:37
Add glfw required version. 3.3.1 is not working. ee727d7efda88af1e8a227b542f5b79d0ba6f301 Jackalope 2020-05-31 23:53:33
GCC Compatibility. c828a38456627d0383d431165b802f97fd303349 Jackalope 2020-05-29 16:48:24
Solved clang compiler warnings from compute module. b9416237761f8648bbddb7e7ba59e833a7879528 Jackalope 2020-05-28 11:09:55
CMake: two shaders targets, instead of single target per shader. a708650319e44c7b98056f3bc85a896dd65d96f3 Jackalope 2020-05-28 11:06:13
Reduced amount of warnings. 18bf33ca4e0e7f0369f6b5fdc59b81a8420dde8e Jackalope 2020-05-27 15:11:37
Replace jl::rarray with generic structure in shader header file. 1cedb5886becc0f70c19d1c649e96f7eac5e0037 Jackalope 2020-05-27 13:07:31
Embedding shaders in obj library. e877e7a688ee4a899480c12acba55c340622f993 Jackalope 2020-05-27 12:40:34
Update jlib 0.3.0 (refactoring of threads, new thread pool). 1c713a320ced91d0ad5f1606c39f1187871d28e5 Jackalope 2020-05-26 14:44:35
Update graphics after change of "wait for monitor" flag. 29d9b749c803646006b9b0071b54256bd3c08ca8 Jackalope 2020-05-26 14:40:34
reduced number of -Wno* warnings bf3ec94ce3020715e246107a47efc9a8772db382 Jackalope 2020-05-25 01:48:40
Disable "find_package(jlib 0.2.0 REQUIRED)" in jrf b4903e20d9128227163119fe73e32cda5050cb67 Jackalope 2020-05-24 16:40:26
Update jrf-0.2.1 3518adb37045d4e4eb4488c8c07e3f674f5fbac3 Jackalope 2020-05-24 14:33:14
Update jrf-0.2.0 8720e50ca5f692a96ba764cab1a250683c6a0c59 Jackalope 2020-05-24 13:42:55
Commit d4651206b1798ddec7e3275352f48445b8a184d2 - New shading type SHADOW_MAPPING is added to remove experimental shadow mapping from DEFAULT.
Author: Jackalope
Author date (UTC): 2020-06-01 04:01
Committer name: Jackalope
Committer date (UTC): 2020-06-01 04:01
Parent(s): 9b0a75d94e30eb7fd45360f7fe10429bf05c243e
Signing key:
Tree: 35acba0725c5d515318a2b072d594396dc771b7e
File Lines added Lines deleted
include/jen/settings.h 3 1
src/graphics/shaders/default.frag 11 6
File include/jen/settings.h changed (mode: 100644) (index 3083bab..be2dfd1)
... ... struct jen::GraphicsSettings
123 123 { {
124 124 /// @brief Shading options for general 3D pipeline. /// @brief Shading options for general 3D pipeline.
125 125 enum class Shading : uint32_t { enum class Shading : uint32_t {
126 /// Default shading with clustered forward rendering and shadow mapping
126 /// Default shading with clustered forward rendering
127 127 DEFAULT, DEFAULT,
128 /// DEFAULT + shadow mapping. Experimental
129 SHADOW_MAPPING,
128 130 /// No lighting system /// No lighting system
129 131 NO_LIGHTING, NO_LIGHTING,
130 132 /// Render weird-looking colors instead of textures to detect /// Render weird-looking colors instead of textures to detect
File src/graphics/shaders/default.frag changed (mode: 100644) (index 1b6596e..4de2053)
... ... layout(location = 4) in vec4 scales;
61 61 layout(location = 0) out vec4 out_color; layout(location = 0) out vec4 out_color;
62 62
63 63 const uint DEFAULT = 0; const uint DEFAULT = 0;
64 const uint NO_LIGHTING = 1;
65 const uint DEBUG_TEXTURE_COORDINATES = 2;
66 const uint DEBUG_CLUSTERS_DEPTH = 3;
67 const uint DEBUG_CLUSTERS_NUM_LIGHTS = 4;
64 const uint SHADOW_MAPPING = 1;
65 const uint NO_LIGHTING = 2;
66 const uint DEBUG_TEXTURE_COORDINATES = 3;
67 const uint DEBUG_CLUSTERS_DEPTH = 4;
68 const uint DEBUG_CLUSTERS_NUM_LIGHTS = 5;
68 69 layout (constant_id = 0) const uint TYPE = DEFAULT; layout (constant_id = 0) const uint TYPE = DEFAULT;
69 70 layout (constant_id = 1) const float BIAS = 0.01; layout (constant_id = 1) const float BIAS = 0.01;
70 71 layout (constant_id = 2) const uint BLOCKER_SEARCH_DETAIL = 0; layout (constant_id = 2) const uint BLOCKER_SEARCH_DETAIL = 0;
 
... ... vec3 compute_light_with_shadow()
564 565 push.light.z_near, push.light.z_far); push.light.z_near, push.light.z_far);
565 566
566 567 float diffuse = dot(in_normal, to_light) / to_light_distance; float diffuse = dot(in_normal, to_light) / to_light_distance;
567 float visibility = compute_light_visibility(to_light, d_norm, diffuse);
568 float visibility;
569 if (TYPE == SHADOW_MAPPING)
570 visibility = compute_light_visibility(to_light, d_norm, diffuse);
571 else
572 visibility = 1;
568 573 float intensivity = compute_light_attenuation(d_norm); float intensivity = compute_light_attenuation(d_norm);
569 574
570 575 float scale = max(diffuse, 0.04) * intensivity * visibility; float scale = max(diffuse, 0.04) * intensivity * visibility;
 
... ... void main()
664 669 vec3 coord = vec3(UV, push.textureIndex); vec3 coord = vec3(UV, push.textureIndex);
665 670 vec3 texel = texture(textureSampler, coord).rgb; vec3 texel = texture(textureSampler, coord).rgb;
666 671 #endif #endif
667 if (TYPE == DEFAULT)
672 if (TYPE <= SHADOW_MAPPING)
668 673 out_color = vec4(texel * compute_lights(), 1); out_color = vec4(texel * compute_lights(), 1);
669 674 else if (TYPE == NO_LIGHTING) else if (TYPE == NO_LIGHTING)
670 675 out_color = vec4(texel, 1); out_color = vec4(texel, 1);
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/Jackalope/jen

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/Jackalope/jen

Clone this repository using git:
git clone git://git.rocketgit.com/user/Jackalope/jen

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main