diff options
author | 2017-01-04 17:44:46 -0800 | |
---|---|---|
committer | 2017-01-04 17:44:46 -0800 | |
commit | 2b95c8e50bbfa22320ca8ddd04d3d94052a5c4ed (patch) | |
tree | 7495be650b35a2c5e2f65e0a9ed4eb81debd838e /src/osd/modules/render/d3d/d3dhlsl.cpp | |
parent | fad07814a01d724c0025aca39c771f13e74cff50 (diff) |
Change cached texture format to floating point.
hlsl/phosphor.fx: Remove hacks
ini/presets/raster.ini, ini/presets/vector-mono.ini,
ini/presets/vector.ini: Tweak presets
src/osd/modules/render/d3d/d3dcomm.h,
src/osd/modules/render/d3d/d3dhlsl.cpp,
src/osd/modules/render/drawd3d.cpp: Change cache texture format to
floating point for precise for phosphor and ghosting shaders.
Diffstat (limited to 'src/osd/modules/render/d3d/d3dhlsl.cpp')
-rw-r--r-- | src/osd/modules/render/d3d/d3dhlsl.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index c41ab4f083f..17861ef3ce1 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -1097,20 +1097,20 @@ int shaders::phosphor_pass(d3d_render_target *rt, int source_index, poly_info *p curr_effect = phosphor_effect; curr_effect->update_uniforms(); curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->cache_texture); + curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); curr_effect->set_bool("Passthrough", false); curr_effect->set_float("DeltaTime", delta_time()); - next_index = rt->next_index(next_index); - blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); + rt->next_cache_index(); + blit(rt->cache_surface[rt->cache_index], false, D3DPT_TRIANGLELIST, 0, 2); - // Pass along our phosphor'd screen + // copy cached texture to target texture curr_effect->update_uniforms(); - curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->target_texture[next_index]); + curr_effect->set_texture("Diffuse", rt->cache_texture[rt->cache_index]); + curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); curr_effect->set_bool("Passthrough", true); - blit(rt->cache_surface, false, D3DPT_TRIANGLELIST, 0, 2); + blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); return next_index; } @@ -1129,20 +1129,20 @@ int shaders::ghosting_pass(d3d_render_target *rt, int source_index, poly_info *p curr_effect = ghosting_effect; curr_effect->update_uniforms(); curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->cache_texture); + curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); curr_effect->set_bool("Passthrough", false); curr_effect->set_float("DeltaTime", delta_time()); - next_index = rt->next_index(next_index); - blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); + rt->next_cache_index(); + blit(rt->cache_surface[rt->cache_index], false, D3DPT_TRIANGLELIST, 0, 2); - // Pass along our ghost'd screen + // copy cached texture to target texture curr_effect->update_uniforms(); - curr_effect->set_texture("Diffuse", rt->target_texture[next_index]); - curr_effect->set_texture("LastPass", rt->target_texture[next_index]); + curr_effect->set_texture("Diffuse", rt->cache_texture[rt->cache_index]); + curr_effect->set_texture("LastPass", rt->cache_texture[rt->cache_index]); curr_effect->set_bool("Passthrough", true); - blit(rt->cache_surface, false, D3DPT_TRIANGLELIST, 0, 2); + blit(rt->target_surface[next_index], false, D3DPT_TRIANGLELIST, 0, 2); return next_index; } |