summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author MooglyGuy <MooglyGuy@users.noreply.github.com>2023-05-20 14:05:42 +0200
committer GitHub <noreply@github.com>2023-05-20 08:05:42 -0400
commite89eb3e77c78015420b9fbfc7d89279b77014190 (patch)
treee35a3a19f9f96cefc852f83794c105633ecf4359 /src
parentb761e23168468157fa072ee630e1997511532f11 (diff)
BGFX and D3D9 renderer fixes for issues #11104, #11106, and #11107 (#11249)
* -hlsl.json: Removed duplicate scanline_variation setting. (#11107) [Ryan Holtz] * -d3dhlsl.cpp: Fixed lack of post-pass application when bloom is disabled. (#11104) [Ryan Holtz] * -drawd3d.cpp: Always set a default texture at scene start. (#11106) [Ryan Holtz]
Diffstat (limited to 'src')
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp14
-rw-r--r--src/osd/modules/render/drawd3d.cpp3
2 files changed, 12 insertions, 5 deletions
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 7c30339853f..52bec85f06f 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -1570,12 +1570,16 @@ void shaders::render_quad(poly_info *poly, int vertnum)
//next_index = phosphor_pass(rt, next_index, poly, vertnum);
// create bloom textures
- int old_index = next_index;
- next_index = post_pass(rt, next_index, poly, vertnum, true);
- next_index = downsample_pass(rt, next_index, poly, vertnum);
+ bool bloom_enabled = (options->bloom_scale > 0.0f);
+ if (bloom_enabled)
+ {
+ int old_index = next_index;
+ next_index = post_pass(rt, next_index, poly, vertnum, true);
+ next_index = downsample_pass(rt, next_index, poly, vertnum);
+ next_index = old_index;
+ }
- // apply bloom textures
- next_index = old_index;
+ // apply bloom textures (if enabled) and other post effects
next_index = post_pass(rt, next_index, poly, vertnum, false);
next_index = bloom_pass(rt, next_index, poly, vertnum);
next_index = phosphor_pass(rt, next_index, poly, vertnum);
diff --git a/src/osd/modules/render/drawd3d.cpp b/src/osd/modules/render/drawd3d.cpp
index 39fbc2408a2..542e2f8955d 100644
--- a/src/osd/modules/render/drawd3d.cpp
+++ b/src/osd/modules/render/drawd3d.cpp
@@ -755,6 +755,9 @@ void renderer_d3d9::begin_frame()
if (m_shaders->enabled())
m_shaders->begin_frame(window().m_primlist);
+
+ // set an initial default texture
+ set_texture(nullptr);
}
void renderer_d3d9::process_primitives()