Skip to content

Instantly share code, notes, and snippets.

View Kuranes's full-sized avatar

Tuan Kuranes Kuranes

View GitHub Profile
@rygorous
rygorous / symdiff.py
Created April 28, 2015 15:32
Figure out actual external deps in .a (only tested for OS X/iOS)
"""This tool queries undefined symbols in a lib, then queries defined
symbols, and then diffs the two sets so we know what the actual
externals for the purpose of the lib are."""
import os
import re
import subprocess
libname = 'libbink2.a' # command line parsing? please.
def parse_def_sym(str):
# Simulator for depth comparison error (i.e. z-fighting)
# Nathan Reed, June 2015
# Written for Python 3.4; requires numpy
import math
import numpy as np
import optparse
# Parse command-line options
parser = optparse.OptionParser()
@adactio
adactio / basicServiceWorker.js
Last active March 27, 2023 09:30
A basic Service Worker, for use on, say, a blog.
'use strict';
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function() {
// Update 'version' if you need to refresh the cache
var staticCacheName = 'static';
var version = 'v1::';
@bkaradzic
bkaradzic / orthodoxc++.md
Last active October 19, 2025 16:39
Orthodox C++

Orthodox C++

This article has been updated and is available here.

@SwooshyCueb
SwooshyCueb / SuperEagle.glsl
Created May 21, 2016 05:51
Temporary location for glsl stuff
#version 420 compatibility
// Will insert lines here so make sure version is at the very top.
// No includes.
/******************************************************************************/
/* GLSL Fragment Shader implementation of the SuperEagle 2x upscaler filter */
/******************************************************************************/
/* Copyright (C) 2016 Markus Kitsinger (SwooshyCueb) <[email protected]> */
/* */
/* This implementation of the SuperEagle filter is subject to the terms of */
Suppose Alice and Bob need a protocol for agreeing to perform an action.
The communication delay is T seconds (which we assume to be symmetric).
A standard handshaking protocol is request/acknowledgement. Alice raises her hand
to signal a request. Bob sees the signal T seconds later. When Bob is ready to perform
the action, he raises his hand to signal acknowledgement. So, from when Alice sent the
request, it's at least 2T seconds before she sees Bob's acknowledgement and can perform
the action.
@h3r2tic
h3r2tic / restir-meets-surfel-lighting-breakdown.md
Created November 23, 2021 02:15
A quick breakdown of lighting in the `restir-meets-surfel` branch of my renderer

A quick breakdown of lighting in the restir-meets-surfel branch of my renderer, where I revive some olde surfel experiments, and generously sprinkle ReSTIR on top.

General remarks

Please note that this is all based on work-in-progress experimental software, and represents a single snapshot in development history. Things will certainly change 😛

Due to how I'm capturing this, there's frame-to-frame variability, e.g. different rays being shot, TAA shimmering slightly. Some of the images come from a dedicated visualization pass, and are anti-aliased, and some show internal buffers which are not anti-aliased.

Final images

@Marc-B-Reynolds
Marc-B-Reynolds / output.md
Last active November 25, 2024 22:53
brute force testing of 1/sqrt functions
click for range breakdown

checking on [3f800000,40000000] [1.000000e+00,2.000000e+00]

func e max ULP CR FR 2 ULP > 2 ULP CR% FR% 2 ULP% > 2 ULP%
vrsqrte_f32 -- 4947968 103 225 216 8388065 0.001228 0.002682 0.002575 99.993515
FRSR_Mon0 -- 564177 3 8 6 8388592 0.000036 0.000095 0.000072 99.999797
FRSR_Deg0 -- 403258 0 0 0 8388609 0.000000 0.000000 0.000000 100.000000
FRSR_Mon1 -- 14751 230 464 466 8387449 0.002742 0.005531 0.005555 99.986172