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
#define STAGE 0 | |
/** | |
* Stages: | |
* - Slices, no extra shader | |
* - Calculate UVW + unshaded | |
* - Voronoi | |
* - Root texture | |
* - Height gradient | |
* - Additive | |
* - Height * Root |
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
/** | |
* Proximity Fade shader include | |
* | |
* Based on Godot's proximity fade shader feature: | |
* https://github.com/godotengine/godot/blob/97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b/scene/resources/material.cpp#L1643 | |
* | |
* Usage: | |
// Include snippet | |
#include "proximity-fade.gdshaderinc" | |
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
#!/bin/sh | |
classes="" | |
relations="" | |
for file in $(find . -name "*.gd"); do | |
class_name="$(grep "class_name" "$file" | cut -f2 -d" ")" | |
extends_name="$(grep "extends" "$file" | cut -f2 -d" ")" | |
if [ -z "$class_name" ]; then |
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
/** | |
Copyright 2015 Gálffy Tamás | |
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 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
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
#!/bin/sh | |
# Dependencies: | |
# pandoc: https://pandoc.org/installing.html#linux | |
# wkhtmltox: https://wkhtmltopdf.org/downloads.html | |
changelog=$1 | |
release=$2 | |
if [ -z "$changelog" ] || [ -z "$release" ]; then |
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
# Spinners | |
# https://stackoverflow.com/questions/2685435/cooler-ascii-spinners | |
# "← ↖ ↑ ↗ → ↘ ↓ ↙" | |
# "▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▁" | |
# "▉▊▋▌▍▎▏▎▍▌▋▊▉" | |
# "▖▘▝▗" | |
# "┤┘┴└ ├ ┌ ┬ ┐" | |
# "◢◣◤◥" | |
# "◰◳◲◱" | |
# "◴◷◶◵" |
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
# Return PATH without directory | |
# | |
# @param dir directory to remove | |
function rmpath() { | |
dir="$1" | |
result="" | |
while read -r dir; do | |
if [ "$dir" != "$1" ]; then | |
result="$result:$dir" |
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
#!/bin/bash | |
# Function to find all code labels in directory | |
# Useful for finding TODO's or NOTE's and the like | |
# Anywhere in your code, put a comment in the form // <LABEL>: ... | |
# and findlabels will pick it up | |
# Usage: | |
# findlabels <directory> (labels) | |
# (labels) is optional, put spaces between labels if you look for multiple |
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
///matrix_ortho(x,y, width,height, znear,zfar) | |
// Thanks, mesa! | |
// Source from src/mesa/math/m_matrix.c:1019 | |
// Modified according to the formula at the bottom of | |
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb205347(v=vs.85).aspx | |
var _x,_y,w,h; | |
_x = argument0; | |
_y = argument1; |
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
template <typename T, typename Class, T(Class::*Getter)(), void(Class::*Setter)(const T&)> | |
class _property { | |
typedef _property<T, Class, Getter, Setter> self_type; | |
typedef T value_type; | |
typedef Class parent_type; | |
decltype(Getter) getter_func = Getter; | |
decltype(Setter) setter_func = Setter; | |
private: | |
value_type _value; |
NewerOlder