Skip to content

Instantly share code, notes, and snippets.

View datee's full-sized avatar

Datee datee

  • Logic Interactive
  • Oslo, Norway
  • X @d0oo0p
View GitHub Profile
@jamiephan
jamiephan / README.md
Last active October 27, 2025 11:42
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@pabloko
pabloko / Edge WebView2 on D3D11.md
Last active September 11, 2025 17:28
Rendering offscreen Edge (WebView2) to D3D11 texture for overlays (C++/win32)

Using Edge WebView2 is really straightforward, but using the Composition controller is poorly documented and only discussed on few issues in the WebView2 repo.

The browser itself is rendered on a separate process using DirectComposition API wich does not directly interoperate with DirectX, but can be readed using GraphicsCaptureItem WinRT apis. This means that a capture session must be setup into the host visual root, and it will provide accelerated GPU texture capture of the browser (with transparency)

There are few extra steps to setup this pipeline under win32 apps, apart of usual WebView2 setup:

  1. A DispatcherQueueController need to be created in the hosting thread in order to be able to use the Visual interfaces
  2. Use CreateCoreWebView2CompositionController instead CreateCoreWebView2Controller or its WithConfig equivalent.
  3. Create a WinRT DirectComposition IContainerVisual and IVisual as in the example
  4. Create a WinRT Direct3D11CaptureFramePool and start the session using `GraphicsC
@mmozeiko
mmozeiko / win32_webgpu.c
Last active October 28, 2025 10:18
setting up and using WebGPU in C using Dawn
// example how to set up WebGPU rendering on Windows in C
// uses Dawn implementation of WebGPU: https://dawn.googlesource.com/dawn/
// download pre-built Dawn webgpu.h/dll/lib files from https://github.com/mmozeiko/build-dawn/releases/latest
#include "webgpu.h"
#define _CRT_SECURE_NO_DEPRECATE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@rcstuber
rcstuber / AutoImport.hx
Last active July 18, 2022 10:12
Recursive import statement generation macro for Haxe
package;
#if macro
import haxe.macro.*;
import sys.FileSystem;
import sys.io.*;
import haxe.io.*;
using StringTools;
@ZwodahS
ZwodahS / how_to_build_for_mac_haxe_heap.md
Last active July 6, 2022 07:37
How to build .app for Haxe/Heaps

How to build .app for Haxe/Heaps

Preparing your game

Normally you would load your resources from the same directory as your binary, but when building for Mac, you will have to do it slightly differently. Instead of loading your res from ., your should load it from ../Resources/.

Mac .app structure

Game.app
|_Contents
  |_Info.plist
@ddmills
ddmills / cp437-to-fnt.js
Last active August 16, 2022 19:05
Convert cp437 bitmap to fnt format
var valid = [" ", "!", "&quot;", "#", "$", "%", "&amp;", "'", "(", ")", "*", "+", ",", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "&lt;", "=", ">", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "\\", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "¡", "¢", "£", "¤", "¥", "¦", "§", "¨", "©", "ª", "«", "¬", "­", "®", "¯", "°", "±", "²", "³", "´", "µ", "¶", "·", "¸", "¹", "º", "»", "¼", "½", "¾", "¿", "À", "Á", "Â", "Ã", "Ä", "Å", "Æ", "Ç", "È", "É", "Ê", "Ë", "Ì", "Í", "Î", "Ï", "Ð", "Ñ", "Ò", "Ó", "Ô", "Õ", "Ö", "×", "Ø", "Ù", "Ú", "Û", "Ü", "Ý", "Þ", "ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "÷", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ", "Ÿ"];
var mapping =[
['NUL', '☺', '☻', '♥',
@rcstuber
rcstuber / GridShader.hx
Created June 1, 2021 10:11
SDF grid shader for Heaps
/**
* Simple SDF-based grid shader for the Heaps.io engine
* with adjustable number of cells, relative border width and color.
*
* License: MIT
**/
class GridShader extends hxsl.Shader {
static var SRC = {
@mmozeiko
mmozeiko / win32_d3d11.c
Last active October 10, 2025 12:39
setting up and using D3D11 in C
// example how to set up D3D11 rendering on Windows in C
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <d3d11.h>
#include <dxgi1_3.h>
#include <d3dcompiler.h>
#include <dxgidebug.h>
@iUltimateLP
iUltimateLP / DynamicTexture.cpp
Last active April 17, 2025 11:47
Implements dynamic textures into Unreal Engine 4, which can be dynamically written at runtime using the fastest way possible: by directly manipulating the pixel buffer of the texture.
// DynamicTexture
#include "DynamicTexture.h"
// UTextures have a BPP of 4 (Red, Green, Blue, Alpha)
#define DYNAMIC_TEXTURE_BYTES_PER_PIXEL 4
void UDynamicTexture::Initialize(int32 InWidth, int32 InHeight, FLinearColor InClearColor, TextureFilter FilterMethod/* = TextureFilter::TF_Nearest*/)
{
// Store the parameters
@Yanrishatum
Yanrishatum / hxsl-cheatsheet.md
Last active July 21, 2025 06:20
HXSL cheat-sheet

HXSL cheat-sheet

This is a WIP of a cheat-sheet that I will finish Eventually™

Types

Mapping of the shader types to Heaps types:

Float = Float
Int = Int
Bool = Bool