From 339bf83d663239d93f341f9c9e2f25a935a01eb5 Mon Sep 17 00:00:00 2001 From: Patrik Kraif Date: Mon, 9 Dec 2024 20:00:17 +0100 Subject: [PATCH] Revert "Add render debug modes" This reverts commit 66ddfdfbb4052c1e3a0b6e856c6ae51dcc0479fe. --- BBMOD_GML/objects/OMain/Step_0.gml | 17 --- .../BBMOD_DeferredRenderer.gml | 113 +----------------- 2 files changed, 1 insertion(+), 129 deletions(-) diff --git a/BBMOD_GML/objects/OMain/Step_0.gml b/BBMOD_GML/objects/OMain/Step_0.gml index 6b5a7f46..6de7441a 100644 --- a/BBMOD_GML/objects/OMain/Step_0.gml +++ b/BBMOD_GML/objects/OMain/Step_0.gml @@ -32,20 +32,3 @@ directionalBlur.Vector.Set( var _length = directionalBlur.Vector.Length(); _length = (_length > 0.0) ? _length : 1.0; directionalBlur.Step = 2.0 / min(_length, 32.0); - -if (keyboard_check_pressed(vk_left)) -{ - --renderer.DebugMode; - if (renderer.DebugMode < 0) - { - renderer.DebugMode = BBMOD_ERenderDebug.SIZE - 1; - } -} -else if (keyboard_check_pressed(vk_right)) -{ - ++renderer.DebugMode; - if (renderer.DebugMode >= BBMOD_ERenderDebug.SIZE) - { - renderer.DebugMode = 0; - } -} diff --git a/BBMOD_GML/scripts/BBMOD_DeferredRenderer/BBMOD_DeferredRenderer.gml b/BBMOD_GML/scripts/BBMOD_DeferredRenderer/BBMOD_DeferredRenderer.gml index 4d54cabb..24a15d64 100644 --- a/BBMOD_GML/scripts/BBMOD_DeferredRenderer/BBMOD_DeferredRenderer.gml +++ b/BBMOD_GML/scripts/BBMOD_DeferredRenderer/BBMOD_DeferredRenderer.gml @@ -1,23 +1,5 @@ /// @module DeferredRenderer -/// @enum TODO: Add docs -enum BBMOD_ERenderDebug -{ - None, - Depth, - BaseColor, - Metallic, - Normal, - Roughness, - Emissive, - BakedAO, - SSAO, - Lighting, - Reflections, - LightingComplexity, - SIZE, -}; - /// @func BBMOD_DeferredRenderer() /// /// @extends BBMOD_BaseRenderer @@ -79,9 +61,6 @@ function BBMOD_DeferredRenderer(): BBMOD_BaseRenderer() constructor /// value is `c_black`. ClearColor = c_black; - /// @var {Real} TODO: Add docs - DebugMode = BBMOD_ERenderDebug.None; - /// @var {Bool} /// @private __enableHDR = true; @@ -614,96 +593,7 @@ function BBMOD_DeferredRenderer(): BBMOD_BaseRenderer() constructor var _world = matrix_get(matrix_world); matrix_set(matrix_world, matrix_build_identity()); - - if (DebugMode != BBMOD_ERenderDebug.None) - { - var _debugName = ""; - - gpu_push_state(); - gpu_set_blendenable(false); - - switch (DebugMode) - { - case BBMOD_ERenderDebug.Depth: - _debugName = "Depth"; - shader_set(BBMOD_ShGBufferExtractRGB); - draw_surface_stretched(__surGBuffer[2], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.BaseColor: - _debugName = "BaseColor"; - shader_set(BBMOD_ShGBufferExtractRGB); - draw_surface_stretched(__surGBuffer[0], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.Metallic: - _debugName = "Metallic"; - shader_set(BBMOD_ShGBufferExtractA); - draw_surface_stretched(__surGBuffer[2], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.Normal: - _debugName = "Normal"; - shader_set(BBMOD_ShGBufferExtractRGB); - draw_surface_stretched(__surGBuffer[1], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.Roughness: - _debugName = "Roughness"; - shader_set(BBMOD_ShGBufferExtractA); - draw_surface_stretched(__surGBuffer[1], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.Emissive: - _debugName = "Emissive"; - // TODO: Implement emissive render debug - break; - - case BBMOD_ERenderDebug.BakedAO: - _debugName = "BakedAO"; - shader_set(BBMOD_ShGBufferExtractA); - draw_surface_stretched(__surGBuffer[0], X, Y, get_width(), get_height()); - shader_reset(); - break; - - case BBMOD_ERenderDebug.SSAO: - _debugName = "SSAO"; - draw_surface_stretched(__surSSAO, X, Y, get_width(), get_height()); - break; - - case BBMOD_ERenderDebug.Lighting: - _debugName = "Lighting"; - // TODO: Implement lighting render debug - break; - - case BBMOD_ERenderDebug.Reflections: - _debugName = "Reflections"; - // TODO: Implement reflections render debug - break; - - case BBMOD_ERenderDebug.LightingComplexity: - _debugName = "LightingComplexity"; - // TODO: Implement lighting complexity render debug - break; - - default: - break; - } - - gpu_pop_state(); - - if (_debugName != "") - { - draw_text_color(X + 9, Y + 9, _debugName, 0, 0, 0, 0, 1.0); - draw_text(X + 8, Y + 8, _debugName); - } - } - else if (PostProcessor != undefined + if (PostProcessor != undefined && PostProcessor.Enabled) { PostProcessor.__renderScale = RenderScale; @@ -716,7 +606,6 @@ function BBMOD_DeferredRenderer(): BBMOD_BaseRenderer() constructor draw_surface_stretched(__surFinal, X, Y, get_width(), get_height()); gpu_pop_state(); } - matrix_set(matrix_world, _world); return self;