Skip to content

Instantly share code, notes, and snippets.

@msomeone
msomeone / Tricubic.cginc
Created September 9, 2020 18:41 — forked from Fewes/Tricubic.cginc
Tricubic texture sampling for Unity
/*--------------------------------------------------------------------------*\
Copyright (c) 2008-2009, Danny Ruijters. All rights reserved.
http://www.dannyruijters.nl/cubicinterpolation/
This file is part of CUDA Cubic B-Spline Interpolation (CI).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
vec3 ndc2world(mat4 inv_proj, mat4 inv_view, vec3 ndc_pos)
{
vec4 v = inv_proj * vec4(ndc_pos, 1.);
v.xyz /= v.w; // view space
vec4 w = inv_view * vec4(v.xyz, 1.); // world space, camera relative (origin = camera position)
return w.xyz;
//return v.xyz;
}
// Try reconstructing normal accurately from depth buffer.
@msomeone
msomeone / fibers.c
Created January 10, 2019 12:16 — forked from vurtun/fibers.c
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#define streq(a, b) (!strcmp((a), (b)))
#ifndef __USE_GNU
#define __USE_GNU
@msomeone
msomeone / tools-engineer-checklist.md
Created August 21, 2018 05:05 — forked from gorlak/tools-engineer-checklist.md
Tools Engineer Checklist

This list is provided as a guide for tools engineers of all skill levels looking for jobs in the game industry. It's meant as a guide to topics that should be pursued broadly in order to be well spoken in an interview. I doubt any hiring manager requires deep knowedge across every topic, but an ideal candidate would be somewhat knowledgable (aware of its existence if asked directly) with all topics here.

Each list of bullets increases in difficulty, so later bullets are more applicable to senior (or even director) level candidates.

Good luck.

@gorlak

Math