diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/convex_decomp/b2Glue.h | 12 | ||||
-rw-r--r-- | drivers/convex_decomp/b2Polygon.cpp | 18 | ||||
-rw-r--r-- | drivers/convex_decomp/b2Polygon.h | 8 | ||||
-rw-r--r-- | drivers/convex_decomp/b2d_decompose.cpp | 2 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 176 | ||||
-rw-r--r-- | drivers/gles2/shader_compiler_gles2.cpp | 19 | ||||
-rw-r--r-- | drivers/gles2/shader_gles2.cpp | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/canvas.glsl | 2 | ||||
-rw-r--r-- | drivers/gles2/shaders/material.glsl | 10 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 11 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_gles3.cpp | 6 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 27 | ||||
-rw-r--r-- | drivers/gles3/shader_compiler_gles3.cpp | 2 | ||||
-rw-r--r-- | drivers/gles3/shader_gles3.cpp | 4 | ||||
-rw-r--r-- | drivers/gles3/shaders/canvas.glsl | 2 | ||||
-rw-r--r-- | drivers/gles3/shaders/scene.glsl | 12 | ||||
-rw-r--r-- | drivers/gles3/shaders/ssao_blur.glsl | 8 | ||||
-rw-r--r-- | drivers/png/image_loader_png.cpp | 2 | ||||
-rw-r--r-- | drivers/rtaudio/audio_driver_rtaudio.cpp | 10 | ||||
-rw-r--r-- | drivers/unix/dir_access_unix.cpp | 2 |
20 files changed, 174 insertions, 161 deletions
diff --git a/drivers/convex_decomp/b2Glue.h b/drivers/convex_decomp/b2Glue.h index 7ec6d7f181..425486356e 100644 --- a/drivers/convex_decomp/b2Glue.h +++ b/drivers/convex_decomp/b2Glue.h @@ -134,11 +134,13 @@ struct b2Vec2 return length; } - ///// Does this vector contain finite coordinates? - //bool IsValid() const - //{ - // return b2IsValid(x) && b2IsValid(y); - //} + /* + /// Does this vector contain finite coordinates? + bool IsValid() const + { + return b2IsValid(x) && b2IsValid(y); + } + */ float32 x, y; }; diff --git a/drivers/convex_decomp/b2Polygon.cpp b/drivers/convex_decomp/b2Polygon.cpp index 73955d3573..f45d98250a 100644 --- a/drivers/convex_decomp/b2Polygon.cpp +++ b/drivers/convex_decomp/b2Polygon.cpp @@ -189,7 +189,7 @@ void b2Polygon::MergeParallelEdges(float32 tolerance) { x = newx; y = newy; nVertices = newNVertices; -// printf("%d \n", newNVertices); + //printf("%d \n", newNVertices); } /* @@ -436,7 +436,6 @@ bool b2Polygon::IsSimple() { * For internal use. */ b2Polygon* b2Polygon::Add(b2Triangle& t) { -// float32 equalTol = .001f; // First, find vertices that connect int32 firstP = -1; int32 firstT = -1; @@ -963,7 +962,7 @@ int32 DecomposeConvex(b2Polygon* p, b2Polygon* results, int32 maxPolys) { tempP.Set(*p); ReversePolygon(tempP.x, tempP.y, tempP.nVertices); nTri = TriangulatePolygon(tempP.x, tempP.y, tempP.nVertices, triangulated); -// ReversePolygon(p->x, p->y, p->nVertices); //reset orientation + //ReversePolygon(p->x, p->y, p->nVertices); //reset orientation } else { //printf("It is not ccw \n"); nTri = TriangulatePolygon(p->x, p->y, p->nVertices, triangulated); @@ -997,7 +996,7 @@ void DecomposeConvexAndAddTo(b2Polygon* p, b2Body* bd, b2FixtureDef* prototype) if (p->nVertices < 3) return; b2Polygon* decomposed = new b2Polygon[p->nVertices - 2]; //maximum number of polys int32 nPolys = DecomposeConvex(p, decomposed, p->nVertices - 2); -// printf("npolys: %d",nPolys); + //printf("npolys: %d",nPolys); b2FixtureDef* pdarray = new b2FixtureDef[2*p->nVertices];//extra space in case of splits int32 extra = 0; for (int32 i = 0; i < nPolys; ++i) { @@ -1362,14 +1361,15 @@ b2Polygon TraceEdge(b2Polygon* p){ //printf("knode %d on node %d now has %d connections\n",k,j,knode->nConnected); //printf("Found duplicate point.\n"); } - //printf("Orphaning node at address %d\n",(int)jnode); - //for (int32 k=0; k<njConn; ++k) { - // if (jnode->connected[k]->IsConnectedTo(*jnode)) printf("Problem!!!\n"); - //} /* + printf("Orphaning node at address %d\n",(int)jnode); + for (int32 k=0; k<njConn; ++k) { + if (jnode->connected[k]->IsConnectedTo(*jnode)) printf("Problem!!!\n"); + } for (int32 k=0; k < njConn; ++k){ jnode->RemoveConnectionByIndex(k); - }*/ + } + */ jnode->nConnected = 0; } } diff --git a/drivers/convex_decomp/b2Polygon.h b/drivers/convex_decomp/b2Polygon.h index 36af2fd9d0..c466e28f7e 100644 --- a/drivers/convex_decomp/b2Polygon.h +++ b/drivers/convex_decomp/b2Polygon.h @@ -74,9 +74,11 @@ public: void print(){ printFormatted(); -// for (int32 i=0; i<nVertices; ++i){ -// printf("i: %d, x:%f, y:%f\n",i,x[i],y[i]); -// } + /* + for (int32 i=0; i<nVertices; ++i){ + printf("i: %d, x:%f, y:%f\n",i,x[i],y[i]); + } + */ } void printFormatted(){ diff --git a/drivers/convex_decomp/b2d_decompose.cpp b/drivers/convex_decomp/b2d_decompose.cpp index 82eade5b69..f84faaf586 100644 --- a/drivers/convex_decomp/b2d_decompose.cpp +++ b/drivers/convex_decomp/b2d_decompose.cpp @@ -144,7 +144,7 @@ static Vector< Vector<Vector2> > _b2d_decompose(const Vector<Vector2>& p_polygon Skip: ; } -// delete[] pdarray; + //delete[] pdarray; delete[] decomposed; delete p; return res;// pdarray; //needs to be deleted after body is created diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 2673c79232..fd3e5e508e 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -915,7 +915,7 @@ void RasterizerGLES2::texture_allocate(RID p_texture,int p_width, int p_height,I if (scale_textures) { texture->alloc_width = po2_width; texture->alloc_height = po2_height; - // print_line("scale because npo2: "+itos(npo2_textures_available)+" mm: "+itos(p_format&VS::TEXTURE_FLAG_MIPMAPS)+" "+itos(p_mipmap_count) ); + //print_line("scale because npo2: "+itos(npo2_textures_available)+" mm: "+itos(p_format&VS::TEXTURE_FLAG_MIPMAPS)+" "+itos(p_mipmap_count) ); } else { texture->alloc_width = texture->width; @@ -1910,7 +1910,7 @@ void RasterizerGLES2::mesh_add_surface(RID p_mesh,VS::PrimitiveType p_primitive, use_VBO=false; } -// surface->packed=pack_arrays && use_VBO; + //surface->packed=pack_arrays && use_VBO; int total_elem_size=0; @@ -3917,7 +3917,7 @@ void RasterizerGLES2::light_instance_set_shadow_transform(RID p_light_instance, ERR_FAIL_COND(!lighti); ERR_FAIL_COND(lighti->base->type!=VS::LIGHT_DIRECTIONAL); -// ERR_FAIL_INDEX(p_index,1); + //ERR_FAIL_INDEX(p_index,1); lighti->custom_projection[p_index]=p_camera; lighti->custom_transform[p_index]=p_transform; @@ -4043,8 +4043,10 @@ RID RasterizerGLES2::viewport_data_create() { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - //glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, - // GL_RGBA, GL_UNSIGNED_BYTE, NULL); + /* + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, + GL_RGBA, GL_UNSIGNED_BYTE, NULL); + */ glTexImage2D(GL_TEXTURE_2D, 0, format_luminance, 1, 1, 0, format_luminance_components, format_luminance_type, NULL); @@ -4295,11 +4297,11 @@ void RasterizerGLES2::begin_frame() { draw_next_frame=false; -// material_shader.set_uniform_default(MaterialShaderGLES2::SCREENZ_SCALE, Math::fmod(time, 3600.0)); + //material_shader.set_uniform_default(MaterialShaderGLES2::SCREENZ_SCALE, Math::fmod(time, 3600.0)); /* nehe ?*/ -// glClearColor(0,0,1,1); -// glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared.. + //glClearColor(0,0,1,1); + //glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared.. } void RasterizerGLES2::capture_viewport(Image* r_capture) { @@ -4329,7 +4331,7 @@ void RasterizerGLES2::capture_viewport(Image* r_capture) { PoolVector<uint8_t>::Write w = pixels.write(); glPixelStorei(GL_PACK_ALIGNMENT, 4); -// uint64_t time = OS::get_singleton()->get_ticks_usec(); + //uint64_t time = OS::get_singleton()->get_ticks_usec(); if (current_rt) { #ifdef GLEW_ENABLED @@ -4456,7 +4458,7 @@ void RasterizerGLES2::begin_shadow_map( RID p_light_instance, int p_shadow_pass opaque_render_list.clear(); alpha_render_list.clear(); -// pre_zpass_render_list.clear(); + //pre_zpass_render_list.clear(); light_instance_count=0; glCullFace(GL_FRONT); @@ -4614,7 +4616,7 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const { //print_line("compiled fragment: "+fragment_code); - // ("compiled fragment globals: "+fragment_globals); + //("compiled fragment globals: "+fragment_globals); //print_line("UCF: "+itos(p_shader->uniforms.size())); @@ -5128,9 +5130,11 @@ _FORCE_INLINE_ void RasterizerGLES2::_update_material_shader_params(Material *p_ ud.value=E->value().default_value; old_inuse=false; //if reverted to default, obviously did not work - //print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key()))); - //if (old_mparams.has(E->key())) - // print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type())); + /* + print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key()))); + if (old_mparams.has(E->key())) + print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type())); + */ } @@ -5216,12 +5220,14 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material if (p_material->shader_cache && p_material->shader_cache->valid) { - // // reduce amount of conditional compilations - // for(int i=0;i<_tex_version_count;i++) - // material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false); + /* + // reduce amount of conditional compilations + for(int i=0;i<_tex_version_count;i++) + material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false); + */ - // material_shader.set_custom_shader(p_material->shader_cache->custom_code_id); + //material_shader.set_custom_shader(p_material->shader_cache->custom_code_id); if (p_material->shader_version!=p_material->shader_cache->version) { //shader changed somehow, must update uniforms @@ -5241,7 +5247,7 @@ bool RasterizerGLES2::_setup_material(const Geometry *p_geometry,const Material if (E->get().index<0) continue; -// print_line(String(E->key())+": "+E->get().value); + //print_line(String(E->key())+": "+E->get().value); if (E->get().istexture) { //clearly a texture.. RID rid = E->get().value; @@ -5418,13 +5424,7 @@ void RasterizerGLES2::_setup_light(uint16_t p_light) { if (li->near_shadow_buffer) { glActiveTexture(GL_TEXTURE0+max_texture_units-1); - //if (read_depth_supported) { - - glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth); - //} else { - - - //} + glBindTexture(GL_TEXTURE_2D,li->near_shadow_buffer->depth); material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX,li->shadow_projection[0]); material_shader.set_uniform(MaterialShaderGLES2::SHADOW_TEXEL_SIZE,Vector2(1.0,1.0)/li->near_shadow_buffer->size); @@ -5944,8 +5944,10 @@ Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Materia const Surface::ArrayData& ad=surf->array[i]; -// if (!gl_texcoord_shader[i]) -// continue; + /* + if (!gl_texcoord_shader[i]) + continue; + */ if (ad.size==0 || ! ad.bind) { glDisableVertexAttribArray(i); @@ -5957,7 +5959,7 @@ Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Materia } glEnableVertexAttribArray(i); -// print_line("set: "+itos(i)+" - count: "+itos(ad.count)+" datatype: "+itos(ad.datatype)+" ofs: "+itos(ad.ofs)+" stride: "+itos(stride)+" total len: "+itos(surf->array_len)); + //print_line("set: "+itos(i)+" - count: "+itos(ad.count)+" datatype: "+itos(ad.datatype)+" ofs: "+itos(ad.ofs)+" stride: "+itos(stride)+" total len: "+itos(surf->array_len)); glVertexAttribPointer(i, ad.count, ad.datatype, ad.normalize, stride, &base[ad.ofs]); } @@ -6015,7 +6017,7 @@ void RasterizerGLES2::_render(const Geometry *p_geometry,const Material *p_mater glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len>(1<<16))?GL_UNSIGNED_INT:GL_UNSIGNED_SHORT, s->index_array_local); } else { - // print_line("indices: "+itos(s->index_array_local) ); + //print_line("indices: "+itos(s->index_array_local) ); //print_line("VBO F: "+itos(s->format)+" C: "+itos(s->index_array_len)+" VC: "+itos(s->array_len)); @@ -6405,7 +6407,7 @@ void RasterizerGLES2::_render_list_forward(RenderList *p_render_list,const Trans material_shader.set_conditional(MaterialShaderGLES2::SHADELESS,false); material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_OCTREE,false); material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP,false); -// material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_TEXTURE,false); + //material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_TEXTURE,false); } @@ -6956,7 +6958,7 @@ void RasterizerGLES2::_process_glow_bloom() { glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::HDR_SOURCE),2); copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_EXPOSURE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE])); copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_WHITE])); -// copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,1.0); + //copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,1.0); copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_TRESHOLD,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_TRESHOLD])); copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_SCALE,float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE])); @@ -7040,7 +7042,7 @@ void RasterizerGLES2::_process_hdr() { _copy_screen_quad(); copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_COPY,false); -// int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]; + //int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES]; copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_REDUCE,true); copy_shader.bind(); @@ -7345,7 +7347,7 @@ void RasterizerGLES2::end_scene() { print_line(String("setting camera to ")+camera_transform_inverse); */ -// material_shader.set_uniform_default(MaterialShaderGLES2::CAMERA_INVERSE, camera_transform_inverse); + //material_shader.set_uniform_default(MaterialShaderGLES2::CAMERA_INVERSE, camera_transform_inverse); current_depth_test=true; @@ -7391,7 +7393,7 @@ void RasterizerGLES2::end_scene() { _render_list_forward(&alpha_render_list,camera_transform,camera_transform_inverse,camera_projection,false,fragment_lighting,true); glColorMask(1,1,1,1); -// material_shader.set_conditional( MaterialShaderGLES2::USE_FOG,false); + //material_shader.set_conditional( MaterialShaderGLES2::USE_FOG,false); DEBUG_TEST_ERROR("Drawing Scene"); @@ -7534,8 +7536,8 @@ void RasterizerGLES2::end_scene() { if (GLOBAL_DEF("rasterizer/debug_shadow_maps",false)) { _debug_shadows(); } -// _debug_luminances(); -// _debug_samplers(); + //_debug_luminances(); + //_debug_samplers(); if (using_canvas_bg) { using_canvas_bg=false; @@ -7884,7 +7886,7 @@ void RasterizerGLES2::_debug_draw_shadows_type(Vector<ShadowBuffer>& p_shadows,P Size2 debug_size(128,128); -// Size2 debug_size(512,512); + //Size2 debug_size(512,512); int useblur=shadow_filter==SHADOW_FILTER_ESM?1:0; @@ -7989,7 +7991,7 @@ void RasterizerGLES2::_debug_shadows() { _debug_draw_shadows_type(near_shadow_buffers,ofs); -// _debug_draw_shadows_type(far_shadow_buffers,ofs); + //_debug_draw_shadows_type(far_shadow_buffers,ofs); } @@ -8841,11 +8843,11 @@ RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) { } else { // We'll use a RGBA texture into which we pack the depth info glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, cls->size, cls->height, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); // Attach the RGBA texture to FBO color attachment point glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, cls->depth, 0); + GL_TEXTURE_2D, cls->depth, 0); cls->rgba=cls->depth; // Allocate 16-bit depth buffer @@ -8853,7 +8855,7 @@ RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) { // Attach the render buffer as depth buffer - will be ignored glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, cls->rbo); + GL_RENDERBUFFER, cls->rbo); } @@ -8922,7 +8924,7 @@ void RasterizerGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Matr //light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1)); - /// p_near=1; + / //p_near=1; CameraMatrix projection; { real_t fov = 90; @@ -9121,10 +9123,10 @@ void RasterizerGLES2::canvas_debug_viewport_shadows(CanvasLight* p_lights_with_s //print_line(" debug lights "); while(light) { - // print_line("debug light"); + //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - // print_line("sb is valid"); + //print_line("sb is valid"); CanvasLightShadow * sb = canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glActiveTexture(GL_TEXTURE0); @@ -9172,7 +9174,7 @@ void RasterizerGLES2::_canvas_item_render_commands(CanvasItem *p_item,CanvasItem case CanvasItem::Command::TYPE_RECT: { CanvasItem::CommandRect* rect = static_cast<CanvasItem::CommandRect*>(c); -// canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate); + //canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate); #if 0 int flags=0; @@ -9344,9 +9346,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater } else { glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height); } -// if (current_clip) { -// // print_line(" a clip "); -// } canvas_texscreen_used=true; } @@ -9925,8 +9924,8 @@ RID RasterizerGLES2::sampled_light_dp_create(int p_width,int p_height) { glGenTextures(1,&slight->texture); glBindTexture(GL_TEXTURE_2D, slight->texture); // for debug, but glitchy -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -10046,7 +10045,7 @@ void RasterizerGLES2::free(const RID& p_rid) { // delete the texture Texture *texture = texture_owner.get(p_rid); -// glDeleteTextures( 1,&texture->tex_id ); + //glDeleteTextures( 1,&texture->tex_id ); _rinfo.texture_mem-=texture->total_data_size; texture_owner.free(p_rid); memdelete(texture); @@ -10232,9 +10231,11 @@ void RasterizerGLES2::free(const RID& p_rid) { glDeleteFramebuffers(1,&cls->fbo); glDeleteRenderbuffers(1,&cls->rbo); glDeleteTextures(1,&cls->depth); - //if (!read_depth_supported) { - // glDeleteTextures(1,&cls->rgba); - //} + /* + if (!read_depth_supported) { + glDeleteTextures(1,&cls->rgba); + } + */ canvas_light_shadow_owner.free(p_rid); memdelete(cls); @@ -10286,18 +10287,18 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { } else { // We'll use a RGBA texture into which we pack the depth info glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); // Attach the RGBA texture to FBO color attachment point glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, depth, 0); + GL_TEXTURE_2D, depth, 0); // Allocate 16-bit depth buffer glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size,size); // Attach the render buffer as depth buffer - will be ignored glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, rbo); + GL_RENDERBUFFER, rbo); } @@ -10332,8 +10333,8 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { } else { -// glGenRenderbuffers(1, &rbo); -// glBindRenderbuffer(GL_RENDERBUFFER, rbo); + //glGenRenderbuffers(1, &rbo); + //glBindRenderbuffer(GL_RENDERBUFFER, rbo); glGenTextures(1, &depth); glBindTexture(GL_TEXTURE_2D, depth); @@ -10383,20 +10384,21 @@ bool RasterizerGLES2::ShadowBuffer::init(int p_size,bool p_use_depth) { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); -// glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0, -// GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, NULL); + //glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0, + //GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, NULL); - // Attach the RGBA texture to FBO color attachment point - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, blur, 0); + // Attach the RGBA texture to FBO color attachment point + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, blur, 0); - // Allocate 16-bit depth buffer - /* glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size); + // Allocate 16-bit depth buffer + /* + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size); - // Attach the render buffer as depth buffer - will be ignored - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, rbo_blur); -*/ + // Attach the render buffer as depth buffer - will be ignored + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, rbo_blur); + */ status = glCheckFramebufferStatus(GL_FRAMEBUFFER); OS::get_singleton()->print("Status: %x\n",status); glBindFramebuffer(GL_FRAMEBUFFER, 0); @@ -10502,7 +10504,7 @@ void RasterizerGLES2::_update_framebuffer() { #endif //color -// GLuint format_rgba = use_fp16_fb?_GL_RGBA16F_EXT:GL_RGBA; + //GLuint format_rgba = use_fp16_fb?_GL_RGBA16F_EXT:GL_RGBA; GLuint format_rgba = GL_RGBA; GLuint format_type = use_fp16_fb?_GL_HALF_FLOAT_OES:GL_UNSIGNED_BYTE; GLuint format_internal=GL_RGBA; @@ -10528,8 +10530,8 @@ void RasterizerGLES2::_update_framebuffer() { glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.color, 0); @@ -10562,8 +10564,8 @@ void RasterizerGLES2::_update_framebuffer() { glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.sample_color, 0); @@ -10730,9 +10732,9 @@ void RasterizerGLES2::_update_blur_buffer() { glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); + GL_RGBA, GL_UNSIGNED_BYTE, NULL); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_TEXTURE_2D, framebuffer.blur[i].color, 0); + GL_TEXTURE_2D, framebuffer.blur[i].color, 0); GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); @@ -10915,9 +10917,9 @@ void RasterizerGLES2::init() { framebuffer.fbo=0; framebuffer.width=0; framebuffer.height=0; -// framebuffer.buff16=false; -// framebuffer.blur[0].fbo=false; -// framebuffer.blur[1].fbo=false; + //framebuffer.buff16=false; + //framebuffer.blur[0].fbo=false; + //framebuffer.blur[1].fbo=false; framebuffer.active=false; @@ -10945,8 +10947,8 @@ void RasterizerGLES2::init() { use_depth24 =true; s3tc_supported = true; atitc_supported = false; -// use_texture_instancing=false; -// use_attribute_instancing=true; + //use_texture_instancing=false; + //use_attribute_instancing=true; use_texture_instancing=false; use_attribute_instancing=true; full_float_fb_supported=true; @@ -11017,8 +11019,10 @@ void RasterizerGLES2::init() { use_hw_skeleton_xform=vtf>0 && float_supported; float_linear_supported = extensions.has("GL_OES_texture_float_linear"); - //if (extensions.has("GL_QCOM_tiled_rendering")) - // use_hw_skeleton_xform=false; + /* + if (extensions.has("GL_QCOM_tiled_rendering")) + use_hw_skeleton_xform=false; + */ GLint mva; glGetIntegerv(GL_MAX_VERTEX_ATTRIBS,&mva); if (vtf==0 && mva>8) { @@ -11195,7 +11199,7 @@ void RasterizerGLES2::set_extensions(const char *p_strings) { for(int i=0;i<strings.size();i++) { extensions.insert(strings[i]); -// print_line(strings[i]); + //print_line(strings[i]); } } diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index adb9fe0e83..247a35141e 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -435,7 +435,7 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a //create the call to sample the screen, and clamp it uses_texpos=true; code="get_texpos("+dump_node_code(onode->arguments[1],p_level)+""; -// code="get_texpos(gl_ProjectionMatrixInverse * texture2D( depth_texture, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy,vec2(0.0),vec2(1.0))*gl_LightSource[5].specular.zw+gl_LightSource[5].specular.xy)"; + //code="get_texpos(gl_ProjectionMatrixInverse * texture2D( depth_texture, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy,vec2(0.0),vec2(1.0))*gl_LightSource[5].specular.zw+gl_LightSource[5].specular.xy)"; //code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb"; break; } else if (custom_h && callfunc=="cosh_custom") { @@ -571,12 +571,13 @@ Error ShaderCompilerGLES2::compile_node(SL::ProgramNode *p_program) { global_code+=uline; if (uniforms) { - //if (uniforms->has(E->key())) { - // //repeated uniform, error - // ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key())); - // ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS); -// -// } + /* + if (uniforms->has(E->key())) { + //repeated uniform, error + ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key())); + ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS); + } + */ SL::Uniform u = E->get(); u.order+=ubase; uniforms->insert(E->key(),u); @@ -812,8 +813,8 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR1"]="var1_interp"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR2"]="var2_interp"; -// mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_POS"]="SCREEN_POS"; -// mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_SIZE"]="SCREEN_SIZE"; + //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_POS"]="SCREEN_POS"; + //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_SIZE"]="SCREEN_SIZE"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["INSTANCE_ID"]="instance_id"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["TIME"]="time"; diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp index 2ee89e9895..97c31dfc1c 100644 --- a/drivers/gles2/shader_gles2.cpp +++ b/drivers/gles2/shader_gles2.cpp @@ -561,7 +561,7 @@ ShaderGLES2::Version* ShaderGLES2::get_current_version() { v.uniform_location[j]=glGetUniformLocation(v.id,uniform_names[j]); - // print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); + //print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); } // set texture uniforms diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl index eeab42ee64..4bcebbd69d 100644 --- a/drivers/gles2/shaders/canvas.glsl +++ b/drivers/gles2/shaders/canvas.glsl @@ -392,7 +392,7 @@ LIGHT_SHADER_CODE //use lighting #endif -// color.rgb*=color.a; + //color.rgb*=color.a; gl_FragColor = color; diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index e5be25757d..704a22c5d1 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -820,7 +820,7 @@ void main() { vec3 binormal = normalize(binormal_interp)*side; vec3 tangent = normalize(tangent_interp)*side; #endif -// vec3 normal = abs(normalize(normal_interp))*side; + //vec3 normal = abs(normalize(normal_interp))*side; vec3 normal = normalize(normal_interp)*side; #if defined(ENABLE_SCREEN_UV) vec2 screen_uv = gl_FragCoord.xy*screen_uv_mult; @@ -989,7 +989,7 @@ FRAGMENT_SHADER_CODE #ifdef LIGHT_USE_PSSM -// if (vertex_interp.z > light_pssm_split) { + //if (vertex_interp.z > light_pssm_split) { #if 0 highp vec3 splane = vec3(0.0,0.0,0.0); @@ -1261,12 +1261,12 @@ LIGHT_SHADER_CODE vec3 ambient = const_light_mult*ambient_light*diffuse.rgb; # if defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT) -// ambient*=diffuse_interp.a; //attenuation affects ambient too + //ambient*=diffuse_interp.a; //attenuation affects ambient too # endif -// diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; -// diffuse.rgb+=emission * const_light_mult; + //diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; + //diffuse.rgb+=emission * const_light_mult; diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient; diffuse.rgb+=emission * const_light_mult; diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 3c3768be67..e658fbbe88 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -147,7 +147,7 @@ void RasterizerCanvasGLES3::canvas_begin(){ -// state.canvas_shader.set_uniform(CanvasShaderGLES3::PROJECTION_MATRIX,state.vp); + //state.canvas_shader.set_uniform(CanvasShaderGLES3::PROJECTION_MATRIX,state.vp); //state.canvas_shader.set_uniform(CanvasShaderGLES3::MODELVIEW_MATRIX,Transform()); //state.canvas_shader.set_uniform(CanvasShaderGLES3::EXTRA_MATRIX,Transform()); @@ -743,9 +743,6 @@ void RasterizerGLES2::_canvas_item_setup_shader_params(CanvasItemMaterial *mater } else { glCopyTexSubImage2D(GL_TEXTURE_2D,0,x,y,x,y,viewport.width,viewport.height); } -// if (current_clip) { -// // print_line(" a clip "); -// } canvas_texscreen_used=true; } @@ -1193,10 +1190,10 @@ void RasterizerCanvasGLES3::canvas_debug_viewport_shadows(Light* p_lights_with_s while(light) { - // print_line("debug light"); + //print_line("debug light"); if (light->shadow_buffer.is_valid()) { - // print_line("sb is valid"); + //print_line("sb is valid"); RasterizerStorageGLES3::CanvasLightShadow * sb = storage->canvas_light_shadow_owner.get(light->shadow_buffer); if (sb) { glBindTexture(GL_TEXTURE_2D,sb->distance); @@ -1253,7 +1250,7 @@ void RasterizerCanvasGLES3::canvas_light_shadow_buffer_update(RID p_buffer, cons //light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1)); - /// p_near=1; + //p_near=1; CameraMatrix projection; { real_t fov = 90; diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp index efad6c7e55..b7616db8b1 100644 --- a/drivers/gles3/rasterizer_gles3.cpp +++ b/drivers/gles3/rasterizer_gles3.cpp @@ -300,9 +300,9 @@ void RasterizerGLES3::end_frame(){ glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, vtx ); -// glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); -// glEnableVertexAttribArray(VS::ARRAY_VERTEX); -// glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); + //glBindBuffer(GL_ARRAY_BUFFER,canvas->data.canvas_quad_vertices); + //glEnableVertexAttribArray(VS::ARRAY_VERTEX); + //glVertexAttribPointer( VS::ARRAY_VERTEX, 2 ,GL_FLOAT, false, 0, 0 ); glBindVertexArray(canvas->data.canvas_quad_array); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 5e0f439e3e..a026199bc7 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1102,10 +1102,10 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material* p_m glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); else glPolygonMode(GL_FRONT_AND_BACK,GL_FILL); - */ - //if (p_material->line_width) - // glLineWidth(p_material->line_width); + if (p_material->line_width) + glLineWidth(p_material->line_width); + */ #if 0 //blend mode @@ -2067,8 +2067,10 @@ void RasterizerSceneGLES3::_add_geometry( RasterizerStorageGLES3::Geometry* p_g } } - //if (e->geometry->type==RasterizerStorageGLES3::Geometry::GEOMETRY_MULTISURFACE) - // e->sort_flags|=RenderList::SORT_FLAG_INSTANCING; + /* + if (e->geometry->type==RasterizerStorageGLES3::Geometry::GEOMETRY_MULTISURFACE) + e->sort_flags|=RenderList::SORT_FLAG_INSTANCING; + */ if (mirror) { @@ -3949,9 +3951,10 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C if (env && env->bg_mode==VS::ENV_BG_SKYBOX) { - //if (use_mrt) { - // glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for skybox, only diffuse/ambient matters - // + /* + if (use_mrt) { + glBindFramebuffer(GL_FRAMEBUFFER,storage->frame.current_rt->buffers.fbo); //switch to alpha fbo for skybox, only diffuse/ambient matters + */ _draw_skybox(skybox,p_cam_projection,p_cam_transform,storage->frame.current_rt && storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_VFLIP],env->skybox_scale); } @@ -3963,7 +3966,7 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C //_render_list_forward(&alpha_render_list,camera_transform,camera_transform_inverse,camera_projection,false,fragment_lighting,true); //glColorMask(1,1,1,1); -// state.scene_shader.set_conditional( SceneShaderGLES3::USE_FOG,false); + //state.scene_shader.set_conditional( SceneShaderGLES3::USE_FOG,false); if (use_mrt) { @@ -4016,7 +4019,7 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C storage->canvas->canvas_begin(); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D,exposure_shrink[4].color); -// glBindTexture(GL_TEXTURE_2D,storage->frame.current_rt->exposure.color); + //glBindTexture(GL_TEXTURE_2D,storage->frame.current_rt->exposure.color); storage->canvas->draw_generic_textured_rect(Rect2(0,0,storage->frame.current_rt->width/16,storage->frame.current_rt->height/16),Rect2(0,0,1,1)); } @@ -4189,8 +4192,8 @@ void RasterizerSceneGLES3::render_scene(const Transform& p_cam_transform,const C if (GLOBAL_DEF("rasterizer/debug_shadow_maps",false)) { _debug_shadows(); } -// _debug_luminances(); -// _debug_samplers(); + //_debug_luminances(); + //_debug_samplers(); if (using_canvas_bg) { using_canvas_bg=false; diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 26b9aeada4..97872226a4 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -676,7 +676,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() { actions[VS::SHADER_SPATIAL].renames["AO"]="ao"; actions[VS::SHADER_SPATIAL].renames["EMISSION"]="emission"; actions[VS::SHADER_SPATIAL].renames["DISCARD"]="_discard"; -// actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2; + //actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2; actions[VS::SHADER_SPATIAL].renames["POINT_COORD"]="gl_PointCoord"; diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 13b2160ec6..42a9f19671 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -573,7 +573,7 @@ ShaderGLES3::Version* ShaderGLES3::get_current_version() { v.uniform_location[j]=glGetUniformLocation(v.id,uniform_names[j]); - // print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); + //print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j])); } // set texture uniforms @@ -720,7 +720,7 @@ void ShaderGLES3::setup(const char** p_conditional_defines, int p_conditional_co } else { fragment_code3=code3.substr(0,cpos).ascii(); - // print_line("CODE3:\n"+String(fragment_code3.get_data())); + //print_line("CODE3:\n"+String(fragment_code3.get_data())); fragment_code4 = code3.substr(cpos+light_code_tag.length(),code3.length()).ascii(); //print_line("CODE4:\n"+String(fragment_code4.get_data())); } diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl index cf2e0f776f..e6c72da8f1 100644 --- a/drivers/gles3/shaders/canvas.glsl +++ b/drivers/gles3/shaders/canvas.glsl @@ -449,7 +449,7 @@ LIGHT_SHADER_CODE //use lighting #endif -// color.rgb*=color.a; + //color.rgb*=color.a; frag_color = color; } diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl index c5af010c96..66123193e6 100644 --- a/drivers/gles3/shaders/scene.glsl +++ b/drivers/gles3/shaders/scene.glsl @@ -681,11 +681,13 @@ void light_process_omni(int idx, vec3 vertex, vec3 eye_vec,vec3 normal,vec3 bino splane.z=1.0 - splane.z; - //if (clamp_rect.z<clamp_rect.w) { - // clamp_rect.x+=clamp_rect.z; - //} else { - // clamp_rect.y+=clamp_rect.w; - //} + /* + if (clamp_rect.z<clamp_rect.w) { + clamp_rect.x+=clamp_rect.z; + } else { + clamp_rect.y+=clamp_rect.w; + } + */ } diff --git a/drivers/gles3/shaders/ssao_blur.glsl b/drivers/gles3/shaders/ssao_blur.glsl index 31f3841a2a..ff852487c0 100644 --- a/drivers/gles3/shaders/ssao_blur.glsl +++ b/drivers/gles3/shaders/ssao_blur.glsl @@ -69,9 +69,11 @@ void main() { depth*=depth_divide; - //if (depth > camera_z_far*0.999) { - // discard;//skybox - //} + /* + if (depth > camera_z_far*0.999) { + discard;//skybox + } + */ float sum = texelFetch(source_ssao, ssC, 0).r; diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index de095c20ac..51429f3416 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -134,7 +134,7 @@ Error ImageLoaderPNG::_load_image(void *rf_up,png_rw_ptr p_func,Image *p_image) } if (png_get_valid(png,info,PNG_INFO_tRNS)) { -// png_set_expand_gray_1_2_4_to_8(png); + //png_set_expand_gray_1_2_4_to_8(png); png_set_tRNS_to_alpha(png); update_info=true; } diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index a798990449..850e5ab053 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -104,11 +104,11 @@ Error AudioDriverRtAudio::init() { unsigned int target_number_of_buffers = 4; options.numberOfBuffers = target_number_of_buffers; -// options. -// RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). */// -// unsigned int numberOfBuffers; /*!< Number of stream buffers. */ -// std::string streamName; /*!< A stream name (currently used only in Jack). */ -// int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */ + //options. + //RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). */// + //unsigned int numberOfBuffers; /*!< Number of stream buffers. */ + //std::string streamName; /*!< A stream name (currently used only in Jack). */ + //int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */ parameters.firstChannel = 0; mix_rate = GLOBAL_DEF("audio/mix_rate",44100); diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 890b6b17bc..a09cf80e6c 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -49,7 +49,7 @@ Error DirAccessUnix::list_dir_begin() { list_dir_end(); //close any previous dir opening! -// char real_current_dir_name[2048]; //is this enough?! + //char real_current_dir_name[2048]; //is this enough?! //getcwd(real_current_dir_name,2048); //chdir(curent_path.utf8().get_data()); dir_stream = opendir(current_dir.utf8().get_data()); |