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 ++ bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin | Bin 3782 -> 4208 bytes bgfx/shaders/dx11/chains/hlsl/fs_post.bin | Bin 3630 -> 3735 bytes bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin | Bin 2811 -> 3197 bytes bgfx/shaders/dx9/chains/hlsl/fs_post.bin | Bin 3139 -> 3372 bytes bgfx/shaders/gles/chains/hlsl/fs_distortion.bin | Bin 5285 -> 5935 bytes bgfx/shaders/gles/chains/hlsl/fs_post.bin | Bin 5366 -> 5701 bytes bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin | Bin 5035 -> 5643 bytes bgfx/shaders/glsl/chains/hlsl/fs_post.bin | Bin 5106 -> 5417 bytes bgfx/shaders/metal/chains/hlsl/fs_distortion.bin | Bin 5581 -> 6224 bytes bgfx/shaders/metal/chains/hlsl/fs_post.bin | Bin 5833 -> 6106 bytes 12 files changed, 4 insertions(+) (limited to 'bgfx') 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 ] }, diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin b/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin index 41f4aef5d24..0407e658a50 100644 Binary files a/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin and b/bgfx/shaders/dx11/chains/hlsl/fs_distortion.bin differ diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin index b22fb024fb8..60b08cf3043 100644 Binary files a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin and b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin differ diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin b/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin index 445bad83f41..54217cd1127 100644 Binary files a/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin and b/bgfx/shaders/dx9/chains/hlsl/fs_distortion.bin differ diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin index 8cc13a336da..31377efe8c7 100644 Binary files a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin and b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin differ diff --git a/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin b/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin index fa2f788eecc..a1f750c9aac 100644 Binary files a/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin and b/bgfx/shaders/gles/chains/hlsl/fs_distortion.bin differ diff --git a/bgfx/shaders/gles/chains/hlsl/fs_post.bin b/bgfx/shaders/gles/chains/hlsl/fs_post.bin index a48adbecf4f..3f4b0d6397c 100644 Binary files a/bgfx/shaders/gles/chains/hlsl/fs_post.bin and b/bgfx/shaders/gles/chains/hlsl/fs_post.bin differ diff --git a/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin b/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin index 15f466dbc53..bb7ab279101 100644 Binary files a/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin and b/bgfx/shaders/glsl/chains/hlsl/fs_distortion.bin differ diff --git a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin index 2bfa4c7145f..887cf531e21 100644 Binary files a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin and b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin differ diff --git a/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin b/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin index 2ea407b3195..d33db30a83c 100644 Binary files a/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin and b/bgfx/shaders/metal/chains/hlsl/fs_distortion.bin differ diff --git a/bgfx/shaders/metal/chains/hlsl/fs_post.bin b/bgfx/shaders/metal/chains/hlsl/fs_post.bin index ab0fc156fd5..b6c6bd79b8e 100644 Binary files a/bgfx/shaders/metal/chains/hlsl/fs_post.bin and b/bgfx/shaders/metal/chains/hlsl/fs_post.bin differ -- cgit v1.2.3-70-g09d2