solvespace/res/shaders/imesh.frag

13 lines
387 B
GLSL
Raw Normal View History

//-----------------------------------------------------------------------------
// Indexed Mesh rendering shader
//
// Copyright 2016 Aleksey Egorov
//-----------------------------------------------------------------------------
uniform vec4 color;
2016-11-29 16:49:20 +00:00
uniform sampler2D texture;
void main() {
2016-11-29 16:49:20 +00:00
if(texture2D(texture, gl_FragCoord.xy / 32.0).a < 0.5) discard;
gl_FragColor = color;
}