Skip to content

Instantly share code, notes, and snippets.

View gonnavis's full-sized avatar

Vis gonnavis

View GitHub Profile
@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

@BlueMagnificent
BlueMagnificent / contact_pair_test.html
Last active March 18, 2024 15:32
Javascript 3D Physics Tut 3 Contact Pair Test
<html>
<head>
<meta charset="utf-8">
<title>Collision JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
@BlueMagnificent
BlueMagnificent / contact_manifold_check_two.html
Last active November 16, 2021 06:17
Javascript 3D Physics Tut 3 contact manifold check two
<html>
<head>
<meta charset="utf-8">
<title>Collision JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
@BlueMagnificent
BlueMagnificent / bonus.html
Created December 28, 2019 13:03
Javascript 3D Physics Tut 2 Bonus
<html>
<head>
<meta charset="utf-8">
<title>Move JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
@donmccurdy
donmccurdy / README.md
Last active April 10, 2024 14:51
Convert legacy three.js (JSON) files to glTF 2.0

legacythree2gltf.js

Converts legacy JSON models (created by the three.js Blender exporter, for THREE.JSONLoader) to glTF 2.0. When original .blend files are available, prefer direct export from Blender 2.80+.

NOTE: JSON files created with .toJSON() use a newer JSON format, which isn't deprecated, and these are still supported by THREE.ObjectLoader. This converter does not support that newer type of JSON file.

Installation:

npm install canvas vblob three
@mateuszwojt
mateuszwojt / disney_brdf.glsl
Created August 13, 2019 01:51
Disney Principled BRDF GLSL shader implementation
// Principled PBR Path tracer. Except where otherwise noted:
// Copyright © 2019 Markus Moenig Distributed under The MIT License.
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
@BlueMagnificent
BlueMagnificent / index.html
Last active July 31, 2021 18:54
Javascript 3D Physics Snippet Three
<html>
<head>
<meta charset="utf-8">
<title>JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
@BlueMagnificent
BlueMagnificent / setupGraphics.js
Last active July 31, 2021 18:03
Javascript 3D Physics Setup Graphics
function setupGraphics(){
//create clock for timing
clock = new THREE.Clock();
//create the scene
scene = new THREE.Scene();
scene.background = new THREE.Color( 0xbfd1e5 );
//create camera
// by Etienne JACOB
// motion blur template by beesandbombs
// needs opensimplexnoise code in another tab
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;