summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp2
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp37
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp6
-rw-r--r--drivers/gles3/shader_gles3.cpp30
4 files changed, 1 insertions, 74 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 309497c938..5d93c6a982 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -1545,7 +1545,7 @@ void RasterizerCanvasGLES3::reset_canvas() {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
//use for reading from screen
- if (storage->frame.current_rt) {
+ if (storage->frame.current_rt && !storage->frame.current_rt->flags[RasterizerStorage::RENDER_TARGET_NO_SAMPLING]) {
glActiveTexture(GL_TEXTURE0 + storage->config.max_texture_image_units - 3);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.mip_maps[0].color);
}
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index cd0adbd0d1..6b827002f8 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -354,47 +354,10 @@ void RasterizerGLES3::blit_render_target_to_screen(RID p_render_target, const Re
void RasterizerGLES3::end_frame(bool p_swap_buffers) {
-#if 0
- canvas->canvas_begin();
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D,storage->resources.white_tex);
- glDisable(GL_BLEND);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
-
-
- float vtx[8]={0,0,
- 0,1,
- 1,1,
- 1,0
- };
-
- glBindBuffer(GL_ARRAY_BUFFER,0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0);
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- 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 );
-
- glBindVertexArray(canvas->data.canvas_quad_array);
-
- canvas->draw_generic_textured_rect(Rect2(0,0,15,15),Rect2(0,0,1,1));
-#endif
if (p_swap_buffers)
OS::get_singleton()->swap_buffers();
else
glFinish();
-
- /* print_line("objects: "+itos(storage->info.render_object_count));
- print_line("material chages: "+itos(storage->info.render_material_switch_count));
- print_line("surface changes: "+itos(storage->info.render_surface_switch_count));
- print_line("shader changes: "+itos(storage->info.render_shader_rebind_count));
- print_line("vertices: "+itos(storage->info.render_vertices_count));
-*/
}
void RasterizerGLES3::finalize() {
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 29ab531177..b777f9343a 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2786,12 +2786,6 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c
copymem(&state.omni_array_tmp[li->light_index * state.ubo_light_size], &ubo_data, state.ubo_light_size);
state.omni_light_count++;
-#if 0
- if (li->light_ptr->shadow_enabled) {
- li->shadow_projection[0] = Transform(camera_transform_inverse * li->transform).inverse();
- lights_use_shadow=true;
- }
-#endif
} break;
case VS::LIGHT_SPOT: {
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 9e234f5005..20b2bc0a28 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -279,21 +279,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
strings.push_back("precision highp sampler2DArray;\n");
#endif
-#if 0
- if (cc) {
-
- String _code_string = "#define VERTEX_SHADER_CODE "+cc->vertex+"\n";
- String _code_globals = "#define VERTEX_SHADER_GLOBALS "+cc->vertex_globals+"\n";
-
- code_string=_code_string.ascii();
- code_globals=_code_globals.ascii();
- DEBUG_PRINT( code_globals.get_data() );
- DEBUG_PRINT( code_string.get_data() );
- strings.push_back(code_globals);
- strings.push_back(code_string);
- }
-#endif
-
strings.push_back(vertex_code0.get_data());
if (cc) {
@@ -382,21 +367,6 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
strings.push_back("precision highp sampler2DArray;\n");
#endif
-#if 0
- if (cc) {
-
- String _code_string = "#define FRAGMENT_SHADER_CODE "+cc->fragment+"\n";
- String _code_globals = "#define FRAGMENT_SHADER_GLOBALS "+cc->fragment_globals+"\n";
-
- code_string=_code_string.ascii();
- code_globals=_code_globals.ascii();
- DEBUG_PRINT( code_globals.get_data() );
- DEBUG_PRINT( code_string.get_data() );
- strings.push_back(code_globals);
- strings.push_back(code_string);
- }
-#endif
-
strings.push_back(fragment_code0.get_data());
if (cc) {
material_string = cc->uniforms.ascii();