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 | |
rm -rf ~/ffmpeg_sources ~/bin ~/ffmpeg_build | |
mkdir -p ~/ffmpeg_sources ~/bin ~/ffmpeg_build | |
cd ~/ffmpeg_sources && \ | |
wget https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.bz2 && \ | |
tar xjvf nasm-2.15.05.tar.bz2 && \ | |
cd nasm-2.15.05 && \ | |
./autogen.sh && \ |
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 330 core | |
layout (location = 0) in vec3 VertexPosition; | |
layout (location = 1) in vec2 VertexTexCoord; | |
layout (location = 2) in vec4 VertexColor; | |
int QuadIndexOffsets[6] = int[6](0, 1, 2, 2, 3, 0); | |
vec2 QuadCoords[6] = vec2[6](vec2(0.0, 0.0), vec2(1.0, 0.0), vec2(1.0, 1.0), vec2(1.0, 1.0), vec2(0.0, 1.0), vec2(0.0, 0.0)); | |
uniform samplerBuffer VertexBuffer; | |
uniform mat4 ProjectionMatrix; |
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
local MAXVCACHE = 32 | |
local function CalculateScore(Object) | |
if #Object.Uses > 0 then | |
Object.Score = 2.0 * ((#Object.Uses) ^ -0.5) | |
if Object.CacheRank >= 3 then | |
Object.Score = Object.Score + ((1.0 - (Object.CacheRank - 3) / MAXVCACHE) ^ 1.5) | |
elseif Object.CacheRank >= 0 then | |
Object.Score = Object.Score + 0.75 | |
end |
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
for(int Count = 0; Count < 160; Count++) | |
{ | |
if(CurrentPosition.x < 0.0 || CurrentPosition.x > 1.0 || | |
CurrentPosition.y < 0.0 || CurrentPosition.y > 1.0 || | |
CurrentPosition.z < 0.0 || CurrentPosition.z > 1.0) | |
{ | |
return vec4(0.0, 0.0, 0.0, 1.0); | |
} | |
//intersections |
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
//Image.cpp:136 | |
throw love::Exception("Image cannot have mipmaps: compressed image data does not have all required mipmap levels."); | |
//Should be upgraded to: | |
throw love::Exception("Image cannot have mipmaps: compressed image data does not have all required mipmap levels (expected %d, got %d)", getMipmapCount(width, height), compresseddata[0]->getMipmapCount()); |
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
/* | |
This software is in the public domain. Where that dedication is not recognized, | |
you are granted a perpetual, irrevokable license to copy and modify this file | |
as you see fit. | |
*/ | |
float GetDepth(sampler2D tex_heightmap, vec2 UV ) { | |
return texture2D(tex_heightmap, UV).r; | |
} |
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
local CurrentStencil = nil | |
function Graphics.SetStencil(Stencil) | |
if Stencil then | |
Graphics.SetStencilTest(true, false) | |
Graphics.Stencil(Stencil, false) | |
CurrentStencil = Stencil | |
else | |
CurrentStencil = nil |
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 float colorblind_mode = 0.0; | |
const mat3 protanopia = mat3(0.567, 0.433, 0 , 0.558, 0.442, 0 , 0 , 0.242 ,0.758); | |
const mat3 protanomaly = mat3(0.817, 0.183, 0 , 0.333, 0.667, 0 , 0 , 0.125 ,0.875); | |
const mat3 deuteranopia = mat3(0.625, 0.375, 0 , 0.7 , 0.3 , 0 , 0 , 0.3 ,0.7 ); | |
const mat3 deuteranomaly = mat3(0.8 , 0.2 , 0 , 0.258, 0.742, 0 , 0 , 0.142 ,0.858); | |
const mat3 tritanopia = mat3(0.95 , 0.05 , 0 , 0 , 0.433, 0.567, 0 , 0.475 ,0.525); | |
const mat3 tritanomaly = mat3(0.967, 0.033, 0 , 0 , 0.733, 0.267, 0 , 0.183 ,0.817); | |
const mat3 achromatopsia = mat3(0.299, 0.587, 0.114, 0.299, 0.587, 0.114, 0.299, 0.587 ,0.114); | |
const mat3 achromatomaly = mat3(0.618, 0.320, 0.062, 0.163, 0.775, 0.062, 0.163, 0.320 ,0.516); |
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 Application.POST(Information, Content) | |
if Information.Parameter == "MyFuncName" then | |
return '{"d": "1"}', 200 | |
else | |
return '{"d": "0"}', 200 | |
end | |
end |
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
// Geometric Shadowing term G (Schilik using UE4 roughness) | |
float k = alpha / 2.0; | |
float GL = dotNL / (dotNL * (1.0 - k) + k); | |
float GV = dotNV / (dotNV * (1.0 - k) + k); | |
float G = GV * GL; |
NewerOlder