Skip to content

Instantly share code, notes, and snippets.

@ApoorvaJ
ApoorvaJ / spiral_sampling.hlsl
Last active July 23, 2019 11:41
Spiral sampling over a solid angle
// The vector around which the sampling solid-angle is centered.
// Does not matter for a full sphere, but does matter for anything smaller.
float3 central_direction = ??;
// [0, 1], where 0 is a single vector along the `central_direction` and 1 is a full sphere.
float angle_coefficient = ??;
const int NUM_SAMPLES = 100;
const float GOLDEN_RATIO_MULTIPLIED_BY_TWO_PI = 10.1664073846;
// Rotation matrix from Z-axis to the central_direction vector
**Daft Func Spec**
Daft Func is a command-line tool for navigating, summarizing and refactoring C
code, with a primary focus on functions.
Capabilities
============
Spec'ed
-------
Program
=======
int __attribute__((cdecl / stdcall / fastcall)) foo(int a, int b) {
return (a < b) ? a : b;
}
int main() {
int i = foo(88, 99);
return i;
@ApoorvaJ
ApoorvaJ / vimrc
Last active March 30, 2017 04:20
" ==========================================================
" Vundle
" ==========================================================
set nocompatible
filetype off
if has('win32')
set rtp+=~/vimfiles/Vundle.vim/
call vundle#begin('~/vimfiles/')