diff --git a/src/k3.c b/src/k3.c index 07635bb..18a1ced 100644 --- a/src/k3.c +++ b/src/k3.c @@ -1749,6 +1749,7 @@ void k3PassDepthOnly(mat4 projection, mat4 cam, int clear, int cull) { setup_core_projection(glslp, projection); + bind_mat_textures(mat, 0); setup_glsl_mat_uniforms(glslp, mat, 0); setup_glsl_model_uniforms(glslp, modelmat); @@ -1783,6 +1784,15 @@ void k3PassDepthOnly(mat4 projection, mat4 cam, int clear, int cull) { glLoadMatrixf((float*) modelview); } + if(!k3IsCore) { + if(mat->passes[0].alphatest) { + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.9f); + } else { + glDisable(GL_ALPHA_TEST); + } + } + glBindBufferARB(GL_ARRAY_BUFFER_ARB, mdl->vstore->gl); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, mdl->estore->gl);