summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_gles2.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-09-18 00:18:57 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-09-18 00:18:57 -0300
commit7d6b160a444079fd6856b648ed077bf698b3b70c (patch)
tree8553b7174ffdc9f5ca4c0bc780ee04a12f96a72c /drivers/gles2/rasterizer_gles2.cpp
parente0ce701c8c5216fa95d0931927e3e1570c40f3ae (diff)
fix skeleton AABB computation, addeded shadeless view mode
Diffstat (limited to 'drivers/gles2/rasterizer_gles2.cpp')
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 6ea696e153..96f6ca3ece 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -2421,7 +2421,7 @@ AABB RasterizerGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
sk=skeleton_owner.get(p_skeleton);
AABB aabb;
- if (sk) {
+ if (sk && sk->bones.size()!=0) {
for (int i=0;i<mesh->surfaces.size();i++) {
@@ -4409,7 +4409,7 @@ void RasterizerGLES2::_add_geometry( const Geometry* p_geometry, const InstanceD
oe->additive_ptr=&oe->additive;
}
- if (shadow || m->flags[VS::MATERIAL_FLAG_UNSHADED]) {
+ if (shadow || m->flags[VS::MATERIAL_FLAG_UNSHADED] || current_debug==VS::SCENARIO_DEBUG_SHADELESS) {
e->light_type=0x7F; //unshaded is zero
} else {
@@ -5831,7 +5831,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans
if (light_type!=prev_light_type) {
- if (material->flags[VS::MATERIAL_FLAG_UNSHADED]) {
+ if (material->flags[VS::MATERIAL_FLAG_UNSHADED] || current_debug==VS::SCENARIO_DEBUG_SHADELESS) {
material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_DIRECTIONAL,false);
material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_OMNI,false);
material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_SPOT,false);