[BlockCursor] Replaced blending by old blending.
This commit is contained in:
parent
2fd6a7450c
commit
d883467239
@ -265,14 +265,14 @@ void BlockCursor::draw(gk::RenderTarget &target, gk::RenderStates states) const
|
||||
|
||||
if (m_animationStart > 0) {
|
||||
glCheck(glEnable(GL_CULL_FACE));
|
||||
// glCheck(glBlendFunc(GL_DST_COLOR, GL_ZERO));
|
||||
glCheck(glBlendFunc(GL_DST_COLOR, GL_ZERO));
|
||||
|
||||
// FIXME
|
||||
states.texture = &gk::ResourceHandler::getInstance().get<gk::Texture>("texture-block_destroy");
|
||||
|
||||
target.draw(m_animationVBO, GL_QUADS, 0, 24, states);
|
||||
|
||||
// glCheck(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
glCheck(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA));
|
||||
}
|
||||
|
||||
glCheck(glEnable(GL_POLYGON_OFFSET_FILL));
|
||||
|
@ -35,16 +35,16 @@ void main() {
|
||||
}
|
||||
|
||||
// Block breaking animation
|
||||
if (blockFace == -2 && color.a != 0.) {
|
||||
if (color.r < 0.5) {
|
||||
color.rgb = 0.5 * color.rgb;
|
||||
color.a -= 0.2;
|
||||
}
|
||||
else {
|
||||
color.rgb = 0.8 * color.rgb;
|
||||
color.a -= 0.7;
|
||||
}
|
||||
}
|
||||
/* if (blockFace == -2 && color.a != 0.) { */
|
||||
/* if (color.r < 0.5) { */
|
||||
/* color.rgb = 0.5 * color.rgb; */
|
||||
/* color.a -= 0.2; */
|
||||
/* } */
|
||||
/* else { */
|
||||
/* color.rgb = 0.8 * color.rgb; */
|
||||
/* color.a -= 0.7; */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
// Very cheap "transparency": don't draw pixels with a low alpha value
|
||||
if(color.a < 0.3 && blockFace > -1.) discard;
|
||||
|
Loading…
x
Reference in New Issue
Block a user