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
// MIT licensed. | |
function fabsf (arg) { | |
return arg >= 0 ? arg : -arg | |
} | |
function planeBoxOverlap (normal, vert, maxbox) { | |
var q | |
var vmin = [] | |
var vmax = [] | |
var v |
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 <vector> | |
#include <queue> | |
#include <iostream> | |
#include <thread> | |
#include <chrono> | |
#include <functional> | |
#include <atomic> | |
struct Node { |
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 <math.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <inttypes.h> | |
int main() | |
{ | |
{ | |
float f = sqrtf(-1); // this results in f being set to nan. | |
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
Shader "Custom/CustomTriLerp" | |
{ | |
Properties | |
{ | |
[NoScaleOffset] _MainTex("Texture", 2D) = "white" {} | |
} | |
SubShader | |
{ | |
Pass | |
{ |
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
/* | |
The MIT License (MIT) | |
Copyright (c) 2018 Eric Arnebäck | |
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 |
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
# Example video made by this script: https://twitter.com/erkaman2/status/990873258416361472 | |
ffmpeg \ | |
-y \ | |
-i vid1.mp4 \ | |
-i vid2.mp4 \ | |
-i vid3.mp4 \ | |
-filter_complex '[0:v]pad=iw*3:ih[int];[int][1:v]overlay=W*0.33:0[temp];[temp][2:v]overlay=W*0.66:0[vid]' \ | |
-map [vid] \ | |
-c:v libx264 \ |
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
/* | |
The MIT License (MIT) | |
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: |
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
/* | |
The MIT License (MIT) | |
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. |
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 <math.h> | |
float max(float x, float y) { | |
return x > y ? x : y; | |
} | |
class vec3 { | |
public: | |
float x; |
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
class Foo{}; | |
int main(){ | |
Foo foos[1] = { Foo()}; | |
auto lambdaFunctionThatDoesNothing = [foos]() { }; | |
} |
NewerOlder