Fix walkway and wall trims; not sure why shore frills don't also work
This commit is contained in:
15
osx/tools/mask.frag
Normal file
15
osx/tools/mask.frag
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user