[basic.f.glsl] Small tweaks on InventoryCube shading.
This commit is contained in:
parent
33760af0fb
commit
64ee268129
@ -152,8 +152,8 @@ void InventoryCube::draw(gk::RenderTarget &target, gk::RenderStates states) cons
|
||||
states.texture = &m_textureAtlas.texture();
|
||||
states.vertexAttributes = gk::VertexAttribute::Only2d;
|
||||
|
||||
glCheck(glDisable(GL_CULL_FACE));
|
||||
glCheck(glDisable(GL_DEPTH_TEST));
|
||||
glCheck(glEnable(GL_CULL_FACE));
|
||||
glCheck(glEnable(GL_DEPTH_TEST));
|
||||
|
||||
target.draw(m_vbo, GL_QUADS, 4 * BlockFace::Top, 4, states);
|
||||
// target.draw(m_vbo, GL_QUADS, 4 * 1, 4, states);
|
||||
@ -161,8 +161,4 @@ void InventoryCube::draw(gk::RenderTarget &target, gk::RenderStates states) cons
|
||||
// target.draw(m_vbo, GL_QUADS, 4 * 3, 4, states);
|
||||
target.draw(m_vbo, GL_QUADS, 4 * BlockFace::North, 4, states);
|
||||
// target.draw(m_vbo, GL_QUADS, 4 * 5, 4, states);
|
||||
|
||||
glCheck(glEnable(GL_DEPTH_TEST));
|
||||
glCheck(glEnable(GL_CULL_FACE));
|
||||
|
||||
}
|
||||
|
@ -29,12 +29,12 @@ void main() {
|
||||
|
||||
if (v_faceValue == 2) {
|
||||
// color -= vec4(0.25, 0.25, 0.25, 0.0);
|
||||
color /= 2;
|
||||
color.rgb /= 2.3;
|
||||
color.a = v_color.a;
|
||||
}
|
||||
else if (v_faceValue == 4) {
|
||||
// color -= vec4(0.15, 0.15, 0.15, 0.0);
|
||||
color /= 1.5;
|
||||
color.rgb /= 1.6;
|
||||
color.a = v_color.a;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user