Skip to content

Instantly share code, notes, and snippets.

View SergeyMakeev's full-sized avatar
😉

Sergey Makeev SergeyMakeev

😉
View GitHub Profile
@SergeyMakeev
SergeyMakeev / GenerateSkinningSubsets.cpp
Created October 11, 2024 03:00
A quick test for the idea of using bitsets when generating skinning subsets.
#include <conio.h>
#include <stdint.h>
#include <memory.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <intrin.h>
#include <time.h>
#include <vector>
// simplygon_minimal_example.cpp
#define WIN32_LEAN_AND_MEAN
#include <fstream>
#include <cassert>
#include <cstdio>
#include <cstdint>
#include <vector>
#include <string>
#include <windows.h>
#include <tchar.h>
@SergeyMakeev
SergeyMakeev / rbf.cpp
Created August 5, 2022 17:57
RBF Interpolation
// note key/value can be arbitrrary type (as long as you define distance function)
build_rbf_interpolator(vec3 keys[], vec3 values[])
{
N = len(keys);
// distances (any symetrical functio)
// (diagonal filled with zeroes)
Matrix A[NxN];
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
//
// This function creates a ring buffer by allocating a pagefile-backed section
// and mapping two views of that section next to each other. This way if the
// last record in the buffer wraps it can still be accessed in a linear fashion
// using its base VA.
//
@SergeyMakeev
SergeyMakeev / MockTree.lua
Created November 26, 2020 02:44 — forked from jovannic/MockTree.lua
MockTree: A module for handling Welds and Motor6Ds outside of Workspace
local MockTree = {}
local function addJointEdge(joints, joint, me, other)
local edgeList = joints[me]
if not edgeList then
edgeList = {}
joints[me] = edgeList
end
table.insert(edgeList, {joint, other})
end
@SergeyMakeev
SergeyMakeev / custom_game_engines_small_study.md
Created April 28, 2020 03:43 — forked from raysan5/custom_game_engines_small_study.md
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@SergeyMakeev
SergeyMakeev / gpu.cpp
Created January 16, 2020 23:15 — forked from statico/gpu.cpp
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif
@SergeyMakeev
SergeyMakeev / gpu.cpp
Created January 16, 2020 23:15 — forked from statico/gpu.cpp
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif