Skip to content

Instantly share code, notes, and snippets.

@ikrima
ikrima / Support Render Doc In Pkged Builds.cpp
Last active February 28, 2024 06:14
RenderDocPlugin In Packaged Builds
C:\ikrima\src\knl\Bebylon\UnrealEngine\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11Device.cpp
Line 310
#if PLATFORM_WINDOWS
IUnknown* RenderDoc;
IID RenderDocID;
if (SUCCEEDED(IIDFromString(L"{A7AA6116-9C8D-4BBA-9083-B4D816B71B78}", &RenderDocID)))
{
// @third party code - BEGIN Bebylon - #Eng-FIX-RenderDoc: Disable Forced Ideal GPU Capture - Bc we use renderdoc in packaged games
bool bUseRenderDoc = false;
FParse::Bool(FCommandLine::Get(), TEXT("renderdoc"), bUseRenderDoc);
@ikrima
ikrima / .cpp
Created June 7, 2020 01:10 — forked from vaualbus/.cpp
This file replace the msvc CRT and allow you to init static variables and TLS
#if _CRT_DISABLE
extern "C" int _fltused = 0x9875;
#define WIN32_LEAN_AND_MEAN
#include <stdint.h>
#include <limits.h>
#include <windows.h>
//#include <Windows.h>
@ikrima
ikrima / UE4 Animation Subsystem Architecture
Last active November 23, 2023 03:18
Mapping Out The UE4 Animation Architecture Flow
Animation Subsystem
AnimInstance is the runtime animation class that maintains runtime data & plays shit
- This is the parent class of the animation blueprint
- Get Bone Transforms from a specific time t:
○ Sequence->GetAnimationPose(Output.Pose, Output.Curve, FAnimExtractContext(CurrentTime, Sequence->bEnableRootMotion));
UAnimationAsset is the classes that contain the actual data and also calculates bones & curves
- UAnimSequence
@ikrima
ikrima / robin_hood.natvis
Last active December 27, 2022 10:43
Robin Hood natvis
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="robin_hood::detail::Table&lt;*,*,*,*,*,*&gt;">
<!--
$T1 = bool IsFlat
$T2 = size_t MaxLoadFactor100
$T3 = typename Key
$T4 = typename T
$T5 = typename Hash
$T6 = typename KeyEqual
@ikrima
ikrima / UE4 Test Configuration Packaging
Created June 13, 2015 00:30
How to package a Test Configuration in UE4
go to your UE4/Engine/Build/Binaries folder, and run the following:
RunUAT BuildCookRun -project="F:\UE4\MyHotProject\MyHotProject.uproject" -windows-noeditor -cook -stage -pak -package -clientconfig=Test
@ikrima
ikrima / cppbinding_generator.js
Last active November 18, 2020 04:57
tree-sitter c++ bindings + strongly typed adaptor generator
const _ = require('lodash');
const ndetypes = require(`./src/node-types.json`);
let symtbl = new Set()
let fldtbl = new Set()
let cde_astfwds = "";
let cde_astdefs = "";
let cde_astdcl = String.raw`
struct TlvBase_cst : public CSTNode_o {
@ikrima
ikrima / Adding-Selective-lightbaking.patch
Created May 1, 2017 20:23
Selective Light Baking UE4 4.15
From e79d15122ffd2ac59170385afc858e90f9996eed Mon Sep 17 00:00:00 2001
From: ikrima <contact@ikrima.com>
Date: Thu, 16 Mar 2017 07:03:25 -0700
Subject: [PATCH] Adding selective lightbaking
-Mainly just piggybacked off existing functionality using FLightingBuildOptions
-Main thing was adding ability to pipe that data struct to the EditorBuildLighting command
& augmenting the ShouldOperateOnLevel() call to take into account FLightingBuildOptions
---
.../Editor/UnrealEd/Private/EditorBuildUtils.cpp | 49 ++++++++++++++--------
@ikrima
ikrima / bldperf.ps1
Last active September 16, 2020 22:29
VC Build analysis script
<#
.SYNOPSIS
VC Build analysis.
.DESCRIPTION
VC Build analysis.
.EXAMPLE
C:\PS>bldperf.ps1 -start
[...Build from msvc...]
C:\PS>bldperf.ps1 -stop -timetrace -compilescore -cppbldanalyze
.NOTES
@ikrima
ikrima / build.cs
Created April 6, 2017 20:17
4.15 UE4 Optimized Build Rules
public BBR(TargetInfo Target)
{
//Config
//BuildConfiguration.RelativeEnginePath = /* ...*/;
//Debug
//---BuildConfiguration.bOmitPCDebugInfoInDevelopment = true /* d=false */;
//BuildConfiguration.bSupportEditAndContinue = false /* d=false */;
//BuildConfiguration.bDisableDebugInfoForGeneratedCode = true /* d=true */;
//BuildConfiguration.bAllowLTCG = false /* d=false */;
@ikrima
ikrima / buildconfiguration.xml
Last active September 1, 2019 14:37
Useful UBT flags/variables
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<BebylonBuildConfiguration>
<bBBLivePPEnabled>true</bBBLivePPEnabled> <!-- /* d=false */ -->
<bBBIGMemTraceEnabled>false</bBBIGMemTraceEnabled> <!-- /* d=false */ -->
<bBBMicroProfileEnabled>true</bBBMicroProfileEnabled> <!-- /* d=true */ -->
<bBBPythonEnabled>true</bBBPythonEnabled> <!-- /* d=true */ -->
<BBCompileAssertLevel>4</BBCompileAssertLevel>
<bBBExperimentalFeaturesEnabled>true</bBBExperimentalFeaturesEnabled> <!-- /* d=false */ -->
</BebylonBuildConfiguration>