This file contains hidden or 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 "cinder/app/AppCocoaTouch.h" | |
#include "cinder/app/Renderer.h" | |
#include "cinder/Camera.h" | |
#include "cinder/CinderResources.h" | |
#include "cinder/ImageIo.h" | |
#include "cinder/gl/Texture.h" | |
#include <vector> | |
#include <map> | |
#include <list> |
This file contains hidden or 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
float D_GGX(float linearRoughness, float NoH, const vec3 h) { | |
// Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces" | |
// In mediump, there are two problems computing 1.0 - NoH^2 | |
// 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights) | |
// 2) NoH doesn't have enough precision around 1.0 | |
// Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well | |
// However, we can do better using Lagrange's identity: | |
// ||a x b||^2 = ||a||^2 ||b||^2 - (a . b)^2 |
This file contains hidden or 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
ImGuiStyle& style = ImGui::GetStyle(); | |
style.ChildWindowRounding = 3.f; | |
style.GrabRounding = 0.f; | |
style.WindowRounding = 0.f; | |
style.ScrollbarRounding = 3.f; | |
style.FrameRounding = 3.f; | |
style.WindowTitleAlign = ImVec2(0.5f,0.5f); | |
style.Colors[ImGuiCol_Text] = ImVec4(0.73f, 0.73f, 0.73f, 1.00f); |
This file contains hidden or 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 <any> | |
#include <cmath> | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
#include "NodeGraph.hpp" | |
namespace | |
{ |
This file contains hidden or 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
#pragma once | |
/* | |
// Example use on Windows with links opening in a browser | |
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include "Shellapi.h" | |
inline void LinkCallback( const char* link_, uint32_t linkLength_ ) |
This file contains hidden or 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
#!/bin/sh | |
## setup _________________________________ | |
TMUX_VER=2.9a | |
LIBEVENT_VER=2.1.11-stable | |
TEMP_COMPILE=~/tmux-temp-compile | |
COMMON_INSTALL_PREFIX=/opt | |
SYMLINK=/usr/local/bin/tmux |
This file contains hidden or 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
#!/bin/sh | |
## setup _________________________________ | |
TMUX_VER=2.9a | |
LIBEVENT_VER=2.1.11-stable | |
TEMP_COMPILE=~/tmux-temp-compile | |
COMMON_INSTALL_PREFIX=/opt | |
SYMLINK=/usr/local/bin/tmux |
This file contains hidden or 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
#!/bin/bash | |
# This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches | |
# It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged | |
# time ./clear_git_repositor.bash >cleaning.log | |
# We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming) | |
# MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files | |
MAXIMUM_PASSES=10 # Maximum number of passes |
This file contains hidden or 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 <iostream> | |
#include <assert.h> | |
#include <vector> | |
template<class T> | |
struct Func{}; | |
// std::func replacement without dynamic memory allocation (captures are limited to 48 bytes) | |
// this could be extended to support captures >48 bytes... of course, with a bit more of logic | |
// and some state. |
This file contains hidden or 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 <windows.h> | |
#include <stdio.h> | |
#define DIRECTINPUT_VERSION 0x0800 | |
#include <dinput.h> | |
#pragma comment(lib, "dinput8.lib") | |
#pragma comment(lib, "dxguid.lib") | |
class DiJoyStick { | |
public: |
OlderNewer