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 | |
src="$1" | |
dest="$2" | |
if test "$src" = "" | |
then | |
echo "Usage: $0 <source-volume> [new-volume]" >&2 | |
exit 1 | |
fi |
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
Color chars | |
\c0 (byte 1) | |
Set color to color 0 | |
\c1 (byte 2) | |
Set color to color 1 | |
\c2 (byte 3) | |
Set color to color 2 | |
\c3 (byte 4) | |
Set color to color 3 | |
\c4 (byte 5) |
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
#version 120 | |
#extension GL_EXT_texture_array : require | |
#extension GL_EXT_texture_array : enable | |
vec2 poissonDisk[36] = vec2[]( | |
vec2(-0.412506, -0.505401), | |
vec2(-0.198678, -0.362386), | |
vec2(0.0612825, -0.360698), | |
vec2(-0.680803, -0.662816), | |
vec2(-0.275453, -0.057909), |
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
#version 120 | |
#extension GL_EXT_texture_array : require | |
#extension GL_EXT_texture_array : enable | |
// Configuration: For the adventurous! | |
// This is blending. Shadows are rendered to separate layers based on distance. | |
// This may cause shadows to suddenly change appearance. Use this to change | |
// how long a distance they will "fade" between the two versions over. | |
float blendAlpha = 0.75f; // bl default is 0.9f | |
float blendBeta = 1.0f - blendAlpha; |
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
function isInfinity(%value) | |
{ | |
return strcmp(%value, "-1.#INF") == 0 || strcmp(%value, "1.#INF") == 0; | |
} | |
function isNaN(%value) | |
{ | |
return strcmp(%value, "-1.#IND") == 0; | |
} |
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
function rotl(%value, %shift) | |
{ | |
return (%value << %shift) | (%value >> (32 - %value)); | |
} | |
function blake2(%bytes) | |
{ | |
if (%bytes.class $= "BitArray") | |
%bytes = ByteArray(%bytes); | |
else if (%bytes.class !$= "ByteArray") |
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
function createLightning(%start, %end, %group, %color) | |
{ | |
if (%color $= "") | |
%color = "1 0 1"; | |
%normal = vectorNormalize(vectorSub(%end, %start)); | |
%segments = Array::from(Array::from(%start, %end, 1)); | |
%count = 3; | |
%offset = 0.6 * (vectorDist(%start, %end) / 7); |
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
#version 120 | |
#extension GL_EXT_texture_array : require | |
#extension GL_EXT_texture_array : enable | |
// Soft shadows v2 | |
// - Ultra graphics version | |
// fudgeKey is very hard to get right. | |
// Try various values to fix weird patterns or "disconnected shadows". | |
// It depends on your shadow quality, too. |
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
#version 120 | |
#extension GL_EXT_texture_array : require | |
#extension GL_EXT_texture_array : enable | |
// Soft shadows v2 | |
// - Performance optimized version | |
float dist = 0.05f; | |
float step = 0.025f; |
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
#version 120 | |
#extension GL_EXT_texture_array : require | |
#extension GL_EXT_texture_array : enable | |
// NOTE: this is a development release - expect tons of bugs | |
// this /will/ decrease your fps roughly (soft_distance*2/soft_stepsize+1)³ times, | |
// depends on cost of individual operations | |
// soft_distance is the space to spread out shadow blurring samples over |
NewerOlder