From ecf1e166fc6342ecf0664fe1d3af7aecb621c650 Mon Sep 17 00:00:00 2001 From: Jezze Date: Wed, 28 Sep 2016 15:22:38 +0200 Subject: Fixed several small issues in HLSL/BGFX * fixed target texture dimension when -intoverscan is used (this fixes the appereance of scanline and shadow mask) * added target_scale and screen_count uniforms * rounded corners now remain aligned with screen bounds when -intoverscan is used (single screen only) --- bgfx/effects/hlsl/distortion.json | 2 ++ bgfx/effects/hlsl/post.json | 2 ++ 2 files changed, 4 insertions(+) (limited to 'bgfx/effects/hlsl') diff --git a/bgfx/effects/hlsl/distortion.json b/bgfx/effects/hlsl/distortion.json index c459d70a6c3..b3b9b5a581a 100644 --- a/bgfx/effects/hlsl/distortion.json +++ b/bgfx/effects/hlsl/distortion.json @@ -28,7 +28,9 @@ { "name": "s_tex", "type": "int", "values": [ 0.0 ] }, { "name": "u_swap_xy", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_screen_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_screen_count", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, { "name": "u_target_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, + { "name": "u_target_scale", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, { "name": "u_quad_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, { "name": "u_distortion", "type": "vec4", "values": [ 0.20, 0.0, 0.0, 0.0 ] }, { "name": "u_cubic_distortion", "type": "vec4", "values": [ 0.20, 0.0, 0.0, 0.0 ] }, diff --git a/bgfx/effects/hlsl/post.json b/bgfx/effects/hlsl/post.json index 1fb934a36c7..db08baa4d82 100644 --- a/bgfx/effects/hlsl/post.json +++ b/bgfx/effects/hlsl/post.json @@ -29,6 +29,8 @@ { "name": "s_shadow", "type": "int", "values": [ 1.0 ] }, { "name": "u_swap_xy", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, { "name": "u_source_dims", "type": "vec4", "values": [ 256.0, 256.0, 0.0, 0.0 ] }, + { "name": "u_target_dims", "type": "vec4", "values": [ 256.0, 256.0, 0.0, 0.0 ] }, + { "name": "u_target_scale", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }, { "name": "u_quad_dims", "type": "vec4", "values": [ 256.0, 256.0, 0.0, 0.0 ] }, { "name": "u_humbar_hertz_rate", "type": "vec4", "values": [ 0.001, 0.0, 0.0, 0.0 ] }, { "name": "u_humbar_alpha", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] }, -- cgit v1.2.3-70-g09d2