Fix walkway and wall trims; not sure why shore frills don't also work

This commit is contained in:
2014-04-18 16:59:33 -04:00
parent 55c3f83d22
commit 4f741b440f
7 changed files with 106 additions and 1 deletions

15
osx/tools/mask.frag Normal file
View File

@@ -0,0 +1,15 @@
uniform sampler2D texture;
uniform sampler2D mask;
uniform vec2 offset;
uniform vec2 src;
void main() {
// Lookup the pixels in the textures
vec4 maskpix = texture2D(mask, gl_TexCoord[0].xy);
vec4 texpix = texture2D(texture, gl_TexCoord[0].xy);
// If the mask is black, carry the soruce texture through
if(maskpix.rgb == vec3(0.0,0.0,0.0))
gl_FragColor = texpix;
else gl_FragColor = vec4(0.0,0.0,0.0,0.0);
}