Small optimizations of house rendering

This commit is contained in:
r.kuznetsov 2015-12-08 18:23:55 +03:00 committed by Daria Volvenkova
parent 0260f4007a
commit 6ec7a266da
3 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@ SOURCES += glfunctions.cpp
OTHER_FILES += \
shaders/area_vertex_shader.vsh \
shaders/area3d_vertex_shader.vsh \
shaders/button_fragment_shader.fsh \
shaders/button_vertex_shader.vsh \
shaders/circle_shader.fsh \

View file

@ -6,7 +6,6 @@ varying float v_intensity;
void main(void)
{
vec4 finalColor = texture2D(u_colorTex, v_colorTexCoords);
finalColor.a *= u_opacity;
vec4 finalColor = vec4(texture2D(u_colorTex, v_colorTexCoords).rgb, u_opacity);
gl_FragColor = vec4((v_intensity * 0.2 + 0.8) * finalColor.rgb, finalColor.a);
}

View file

@ -60,6 +60,7 @@ void AreaShape::Draw(ref_ptr<dp::Batcher> batcher, ref_ptr<dp::TextureManager> t
dp::GLState state(gpu::AREA_3D_PROGRAM, dp::GLState::GeometryLayer);
state.SetColorTexture(region.GetTexture());
state.SetBlending(dp::Blending(false /* isEnabled */));
dp::AttributeProvider provider(1, vertexes.size());
provider.InitStream(0, gpu::Area3dVertex::GetBindingInfo(), make_ref(vertexes.data()));