diff --git a/data/shaders/common.hlsl b/data/shaders/common.hlsl index 772a30c2d..4c25cf2b6 100644 --- a/data/shaders/common.hlsl +++ b/data/shaders/common.hlsl @@ -38,9 +38,6 @@ static const float PI4 = 12.5663706f; static const float INV_PI = 0.31830988f; static const float PI_HALF = PI * 0.5f; static const float FLT_MIN = 0.00000001f; -static const float FLT_MAX_10 = 511.0f; -static const float FLT_MAX_11 = 1023.0f; -static const float FLT_MAX_14 = 8191.0f; static const float FLT_MAX_16 = 32767.0f; static const float FLT_MAX_16U = 65535.0f; static const float RPC_9 = 0.11111111111f; diff --git a/data/shaders/light.hlsl b/data/shaders/light.hlsl index 6ef06d613..2d54b5db3 100644 --- a/data/shaders/light.hlsl +++ b/data/shaders/light.hlsl @@ -158,8 +158,8 @@ void main_cs(uint3 thread_id : SV_DispatchThreadID) } // mulitple ligts can go through this shader, so we accumulate the results - /* diffuse */ tex_uav[thread_id.xy] += float4(light_diffuse * light.radiance + light_subsurface, 1.0f); - /* specular */ tex_uav2[thread_id.xy] += float4(light_specular * light.radiance, 1.0f); + /* diffuse */ tex_uav[thread_id.xy] += float4(light_diffuse * light.radiance + light_subsurface, 0.0f); + /* specular */ tex_uav2[thread_id.xy] += float4(light_specular * light.radiance, 0.0f); /* shadow */ tex_uav3[thread_id.xy] = saturate(tex_uav3[thread_id.xy] - (1.0f - shadow.a)); /* volumetric */ tex_uav4[thread_id.xy] += float4(volumetric_fog, 1.0f); } diff --git a/data/shaders/light_composition.hlsl b/data/shaders/light_composition.hlsl index 03596b1a3..8b1faafbe 100644 --- a/data/shaders/light_composition.hlsl +++ b/data/shaders/light_composition.hlsl @@ -126,8 +126,8 @@ void main_cs(uint3 thread_id : SV_DispatchThreadID) if (surface.is_sky()) { light_emissive = tex_environment.SampleLevel(samplers[sampler_bilinear_clamp], direction_sphere_uv(surface.camera_to_pixel), 0).rgb; - alpha = 1.0f; - distance_from_camera = FLT_MAX_10; + alpha = 0.0f; + distance_from_camera = FLT_MAX_16; } else { diff --git a/editor/Widgets/TitleBar.cpp b/editor/Widgets/TitleBar.cpp index 582259121..b62c44e77 100644 --- a/editor/Widgets/TitleBar.cpp +++ b/editor/Widgets/TitleBar.cpp @@ -121,7 +121,7 @@ namespace if (!show_about_window) return; - vector comma_seperated_contributors = comma_seperate_contributors(contributors); + static vector comma_seperated_contributors = comma_seperate_contributors(contributors); static const string window_title = "Spartan " + to_string(sp_info::version_major) + "." + to_string(sp_info::version_minor) + "." + to_string(sp_info::version_revision); const ImGuiTableFlags table_flags = ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingFixedFit; @@ -178,10 +178,10 @@ namespace "copies or substantial portions of the Software." "\n\n" "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR" - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY," + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, " "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE" "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER" - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM," + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, " "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."; ImGui::Separator(); diff --git a/runtime/Core/Debugging.h b/runtime/Core/Debugging.h index a7a381a62..b928c9e35 100644 --- a/runtime/Core/Debugging.h +++ b/runtime/Core/Debugging.h @@ -48,7 +48,7 @@ namespace Spartan inline static bool m_gpu_assisted_validation_enabled = false; // gpu-based validation, significant cpu and gpu cost inline static bool m_breadcrumbs_enabled = false; // breadcrumbs: tracks gpu crashes and writes info into breadcrumbs.txt, minimal overhead - will be ignored for non-amd gpus inline static bool m_logging_to_file_enabled = false; // logs to file, high cpu cost due to disk i/o - inline static bool m_renderdoc_enabled = true; // integrates renderdoc, high cpu overhead from api wrapping + inline static bool m_renderdoc_enabled = false; // integrates renderdoc, high cpu overhead from api wrapping inline static bool m_gpu_marking_enabled = true; // gpu markers for debugging, no performance impact inline static bool m_gpu_timing_enabled = true; // measures gpu timings, negligible cost inline static bool m_shader_optimization_enabled = true; // enables shader optimizations, high cost when off diff --git a/runtime/Rendering/Renderer_Passes.cpp b/runtime/Rendering/Renderer_Passes.cpp index 2457d2a71..1e1f825eb 100644 --- a/runtime/Rendering/Renderer_Passes.cpp +++ b/runtime/Rendering/Renderer_Passes.cpp @@ -828,10 +828,10 @@ namespace Spartan pso.render_target_color_textures[2] = tex_material; pso.render_target_color_textures[3] = tex_velocity; pso.render_target_depth_texture = tex_depth; - pso.clear_color[0] = is_transparent_pass ? rhi_color_load : Color::standard_black; - pso.clear_color[1] = is_transparent_pass ? rhi_color_load : Color::standard_black; - pso.clear_color[2] = is_transparent_pass ? rhi_color_load : Color::standard_black; - pso.clear_color[3] = is_transparent_pass ? rhi_color_load : Color::standard_black; + pso.clear_color[0] = is_transparent_pass ? rhi_color_load : Color::standard_transparent; + pso.clear_color[1] = is_transparent_pass ? rhi_color_load : Color::standard_transparent; + pso.clear_color[2] = is_transparent_pass ? rhi_color_load : Color::standard_transparent; + pso.clear_color[3] = is_transparent_pass ? rhi_color_load : Color::standard_transparent; cmd_list->SetIgnoreClearValues(false); cmd_list->SetPipelineState(pso);