SCD5584 HCMS-2904
The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.
Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// uniform vec3 iResolution;// viewport resolution (in pixels) | |
// uniform float iTime;// shader playback time (in seconds) | |
// uniform float iTimeDelta;// render time (in seconds) | |
// uniform int iFrame;// shader playback frame | |
// uniform float iChannelTime[4];// channel playback time (in seconds) | |
// uniform vec3 iChannelResolution[4];// channel resolution (in pixels) | |
// uniform vec4 iMouse;// mouse pixel coords. xy: current (if MLB down), zw: click | |
// uniform samplerXX iChannel0..3;// input channel. XX = 2D/Cube | |
// uniform vec4 iDate;// (year, month, day, time in seconds) | |
// uniform float iSampleRate;// sound sample rate (i.e., 44100) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/pissang/claygl/blob/master/src/util/shader/integrateBRDF.glsl | |
https://github.com/mrdoob/three.js/blob/dev/src/renderers/shaders/ShaderChunk/bsdfs.glsl.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+shift+b", | |
"command": "cursorLeftSelect", | |
"when": "textInputFocus" | |
}, | |
{ | |
"key": "shift+left", | |
"command": "-cursorLeftSelect", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js webgl - lights - spotlight</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
background-color: #000; | |
margin: 0px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js webgl - transform controls</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
<style> | |
body { | |
margin: 0px; | |
background-color: #000000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <vulkan/vulkan.h> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_Vulkan.h> | |
typedef struct { | |
SDL_Window *SDLWindow; | |
SDL_Renderer *SDLRenderer; |
NewerOlder