# ShaderFit Client module for Blockland v21. It keeps the shadow map at a size this 32-bit game can allocate. Place `ShaderFit.dll` in the game's `modules` folder, then quit and start Blockland from Steam. A DLL that is already loaded stays mapped until that restart. The largest shadow map this build will use is 8192 with 4 cascades. 16384 is 2 GB and the game runs out of memory there, so that size is not used. The DLL only changes rendering on this client. ## Build Blockland is a 32-bit program, so the DLL has to be built with a 32-bit MinGW toolchain (`i686-w64-mingw32`). Put that toolchain's `bin` directory first on `PATH` so CMake finds that `gcc` and `mingw32-make`. `find_package(TSFUNCS)` needs a tsfuncs 1.0.1 package: `tsfuncs-config.cmake` next to `include/` and `lib/`. MinHook's cmake package lives under that package's `lib/minhook`. Pass the package directory as `CMAKE_PREFIX_PATH`. From this repo: ``` cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_PREFIX_PATH=C:/path/to/tsfuncs -S . -B build cmake --build build ``` The result is `build/ShaderFit.dll`. CMake is set so the filename has no `lib` prefix. The link line is tsfuncs, MinHook, `psapi`, `opengl32`, and `dxgi`, with static libgcc and libstdc++. Source is `src/main.cpp` and `CMakeLists.txt`. The current DLL is attached to the v1.0.0 release.