File: imesh_tex.frag

package info (click to toggle)
solvespace 3.1%2Bds1-3.1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 15,964 kB
  • sloc: cpp: 122,491; ansic: 11,375; javascript: 1,919; sh: 89; xml: 44; makefile: 25
file content (15 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//-----------------------------------------------------------------------------
// Indexed Mesh rendering shader
//
// Copyright 2016 Aleksey Egorov
//-----------------------------------------------------------------------------
uniform vec4 color;
uniform sampler2D texture_;

varying vec2 fragTex;

void main() {
    vec4 texColor = texture2D(texture_, fragTex);
    if(texColor.a == 0.0) discard;
    gl_FragColor = texColor * color;
}