fixed missing discard

This commit is contained in:
Zeno Rogue 2021-04-15 19:08:35 +02:00
parent a4fda1b843
commit b597c538ef
1 changed files with 3 additions and 1 deletions

View File

@ -430,8 +430,10 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
"vFogs = 0.5 - gl_Position.z / 2.0;\n";
}
if(have_texture)
if(have_texture) {
fmain += "gl_FragColor *= texture2D(tTexture, vTexCoord);\n";
fmain += "if(gl_FragColor.a == 0.) discard;\n";
}
if(have_vfogcolor) {
varying +=