summaryrefslogtreecommitdiffstatshomepage
path: root/bgfx
diff options
context:
space:
mode:
author ImJezze <jezze@gmx.net>2016-04-24 20:36:42 +0200
committer ImJezze <jezze@gmx.net>2016-04-24 20:36:42 +0200
commit07d8b25571860897fdad90c0c215b3e949f96ea9 (patch)
treeec378412f51fd296d87162871bdbdbe8926b9d71 /bgfx
parent29f51e85db4572febadf40956e2808f5444d2135 (diff)
Added "selection" parameter to chain input sampler
- if specified all textures (.png) within the same directoy of the given texture will be selectable via slider in the UI - also added slider for "shadow mask tile mode" to HLSL chain
Diffstat (limited to 'bgfx')
-rw-r--r--bgfx/chains/hlsl.json15
-rw-r--r--bgfx/effects/hlsl/post.json1
-rw-r--r--bgfx/shaders/dx11/chains/hlsl/fs_post.binbin3165 -> 3394 bytes
-rw-r--r--bgfx/shaders/dx9/chains/hlsl/fs_post.binbin2882 -> 3015 bytes
-rw-r--r--bgfx/shaders/gles/chains/hlsl/fs_post.binbin4009 -> 4609 bytes
-rw-r--r--bgfx/shaders/glsl/chains/hlsl/fs_post.binbin3795 -> 4384 bytes
-rw-r--r--bgfx/shaders/metal/chains/hlsl/fs_post.binbin4512 -> 5115 bytes
7 files changed, 11 insertions, 5 deletions
diff --git a/bgfx/chains/hlsl.json b/bgfx/chains/hlsl.json
index 3f62dd77f5f..e99c7195b76 100644
--- a/bgfx/chains/hlsl.json
+++ b/bgfx/chains/hlsl.json
@@ -96,10 +96,11 @@
{ "type": "float", "name": "scanline_height", "text": "Individual Scanline Scale", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" },
{ "type": "float", "name": "scanline_variation", "text": "Scanline Variation", "default": 1.00, "max": 4.00, "min": 0.0, "step": 0.01, "format": "%1.2f", "screen": "crt" },
- { "type": "float", "name": "shadow_alpha", "text": "Shadow Mask Amount", "default": 0.20, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
- { "type": "vec2", "name": "shadow_uv_count", "text": "Shadow Mask Pixel Count ", "default": [ 12, 12 ], "max": [ 128, 128 ], "min": [ 1, 1 ], "step": 1, "format": "%3f", "screen": "crt" },
- { "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 0.500, 0.500 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
- { "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0.000, 0.000 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
+ { "type": "intenum", "name": "shadow_tile_mode", "text": "Shadow Mask Tile Mode", "default": 0, "max": 1, "min": 0, "step": 1, "format": "%s", "screen": "any", "strings": [ "Screen", "Source" ] },
+ { "type": "float", "name": "shadow_alpha", "text": "Shadow Mask Amount", "default": 0.20, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
+ { "type": "vec2", "name": "shadow_uv_count", "text": "Shadow Mask Pixel Count ", "default": [ 12, 12 ], "max": [ 128, 128 ], "min": [ 1, 1 ], "step": 1, "format": "%3f", "screen": "crt" },
+ { "type": "vec2", "name": "shadow_uv_size", "text": "Shadow Mask UV Size ", "default": [ 0.500, 0.500 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
+ { "type": "vec2", "name": "shadow_uv_offset", "text": "Shadow Mask UV Offset ", "default": [ 0.000, 0.000 ], "max": [ 1.000, 1.000 ], "min": [ 0.000, 0.000 ], "step": 0.001, "format": "%1.3f", "screen": "crt" },
{ "type": "float", "name": "humbar_alpha", "text": "Hum Bar Amount", "default": 0.05, "max": 1.00, "min": 0.00, "step": 0.01, "format": "%1.2f", "screen": "crt" },
{ "type": "float", "name": "humbar_hertz_rate", "text": "Hum Bar Frequency", "default": 0.001, "max": 1.000, "min": 0.000, "step": 0.00001, "format": "%1.5f", "screen": "crt" },
@@ -280,6 +281,9 @@
// bilinear (optional, texture and target only): Whether to apply bilinear filtering to the sampler.
// values: true, false
// default: true
+ //
+ // selection (optional, option and texture only): Determines the name of the selection and alowes to select other textures in the same directory as the specified texture file.
+ // values: Any valid ASCII string.
{ "sampler": "s_tex", "texture": "screen" }
],
@@ -451,6 +455,7 @@
{ "uniform": "u_scanline_bright_offset", "slider": "scanline_bright_offset" },
{ "uniform": "u_scanline_height", "slider": "scanline_height" },
{ "uniform": "u_scanline_variation", "slider": "scanline_variation" },
+ { "uniform": "u_shadow_tile_mode", "slider": "shadow_tile_mode" },
{ "uniform": "u_shadow_alpha", "slider": "shadow_alpha" },
{ "uniform": "u_shadow_count", "slider": "shadow_uv_count" },
{ "uniform": "u_shadow_uv", "slider": "shadow_uv_size" },
@@ -465,7 +470,7 @@
],
"input": [
{ "sampler": "s_tex", "target": "internal" },
- { "sampler": "s_shadow", "option": "bgfx_shadow_mask" }
+ { "sampler": "s_shadow", "option": "bgfx_shadow_mask", "selection": "Shadow Mask" }
],
"output": "internal"
},
diff --git a/bgfx/effects/hlsl/post.json b/bgfx/effects/hlsl/post.json
index a30e921e4c2..1fb934a36c7 100644
--- a/bgfx/effects/hlsl/post.json
+++ b/bgfx/effects/hlsl/post.json
@@ -35,6 +35,7 @@
{ "name": "u_time", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] },
{ "name": "u_screen_scale", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] },
{ "name": "u_screen_offset", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] },
+ { "name": "u_shadow_tile_mode", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] },
{ "name": "u_scanline_alpha", "type": "vec4", "values": [ 0.0, 0.0, 0.0, 0.0 ] },
{ "name": "u_scanline_scale", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
{ "name": "u_scanline_bright_scale", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] },
diff --git a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
index 4081afffd7a..740cea66bf5 100644
--- a/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/dx11/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
index efd4837d48a..cc98415c59f 100644
--- a/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/dx9/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/gles/chains/hlsl/fs_post.bin b/bgfx/shaders/gles/chains/hlsl/fs_post.bin
index f892bd39fc2..3969bd47936 100644
--- a/bgfx/shaders/gles/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/gles/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
index 76201d8f610..60cc2675a22 100644
--- a/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/glsl/chains/hlsl/fs_post.bin
Binary files differ
diff --git a/bgfx/shaders/metal/chains/hlsl/fs_post.bin b/bgfx/shaders/metal/chains/hlsl/fs_post.bin
index 25f3187fbe4..2be5d0aaa6e 100644
--- a/bgfx/shaders/metal/chains/hlsl/fs_post.bin
+++ b/bgfx/shaders/metal/chains/hlsl/fs_post.bin
Binary files differ