summaryrefslogtreecommitdiffstatshomepage
path: root/bgfx
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-08 23:55:54 +0100
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-13 15:51:16 +0100
commita20459a6a3722389f77d6e4671fda16898d4ae8a (patch)
tree28ed799ecccd7f4b32a2e72e9abcf64358675fa4 /bgfx
parent3172371fcd26285582a8595dd0b5d5d9193fcf4c (diff)
Fix up numerous bgfx shader bugs, add auto-uniform u_texsize, nw
Diffstat (limited to 'bgfx')
-rw-r--r--bgfx/chains/test.json14
-rw-r--r--bgfx/effects/tint.json7
2 files changed, 13 insertions, 8 deletions
diff --git a/bgfx/chains/test.json b/bgfx/chains/test.json
index 34ddc00fc5c..4da0656d481 100644
--- a/bgfx/chains/test.json
+++ b/bgfx/chains/test.json
@@ -3,9 +3,9 @@
"sliders": [
{ "type": "int_enum", "name": "adjustments", "text": "Enable Adjustments", "default": 0, "max": 1, "min": 0, "step": 1, "scale": 1.0, "format": "%s", "screen": "any", "strings": [ "On", "Off" ] },
{ "type": "float", "name": "ratio_amount", "text": "Ratio Amount", "default": 0, "max": 100, "min": 0, "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" },
- { "type": "color", "name": "red_ratios", "text": "Color Matrix, Red from ", "default": [ 200, 0, 0 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
- { "type": "color", "name": "grn_ratios", "text": "Color Matrix, Green from ", "default": [ 0, 200, 0 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
- { "type": "color", "name": "blu_ratios", "text": "Color Matrix, Blue from ", "default": [ 0, 0, 200 ], "max": [ 400, 400, 400 ], "min": [ -400, -400, -400 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
+ { "type": "color", "name": "red_ratios", "text": "Color Matrix, Red from ", "default": [ 200, 0, 0 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
+ { "type": "color", "name": "grn_ratios", "text": "Color Matrix, Green from ", "default": [ 0, 200, 0 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
+ { "type": "color", "name": "blu_ratios", "text": "Color Matrix, Blue from ", "default": [ 0, 0, 200 ], "max": [ 400, 400, 400 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.005, "format": "%2.3f", "screen": "any" },
{ "type": "color", "name": "tint", "text": "Tint ", "default": [ 100, 100, 100 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" },
{ "type": "color", "name": "phosphor", "text": "Phosphor Life, ", "default": [ 0, 0, 0 ], "max": [ 100, 100, 100 ], "min": [ 0, 0, 0 ], "step": 1, "scale": 0.01, "format": "%1.2f", "screen": "any" },
{ "type": "vec2", "name": "shift", "text": "Frame Shift ", "default": [ 0, 0 ], "max": [ 25, 25 ], "min": [ -25, -25 ], "step": 1, "scale": 1.0, "format": "%2.f", "screen": "raster" }
@@ -18,6 +18,10 @@
"mode": "native",
"prescale": 1
},
+ { "name": "native2",
+ "mode": "native",
+ "prescale": 1
+ },
{ "name": "previous",
"mode": "native",
"prescale": 1
@@ -53,7 +57,7 @@
"input": [
{ "sampler": "s_tex", "texture": "native" }
],
- "output": "native"
+ "output": "native2"
},
{ "effect": "phosphor",
"name": "Phosphor Decay",
@@ -66,7 +70,7 @@
{ "uniform": "u_phosphor", "slider": "phosphor" }
],
"input": [
- { "sampler": "s_tex", "texture": "native" },
+ { "sampler": "s_tex", "texture": "native2" },
{ "sampler": "s_prev", "texture": "previous" }
],
"output": "native"
diff --git a/bgfx/effects/tint.json b/bgfx/effects/tint.json
index 19cd7687f15..7dfe9c8d709 100644
--- a/bgfx/effects/tint.json
+++ b/bgfx/effects/tint.json
@@ -17,8 +17,9 @@
"vertex": "vs_tint",
"fragment": "fs_tint",
"uniforms": [
- { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
- { "name": "u_tint", "type": "vec4", "values": [ 1.0, 1.0, 1.0, 1.0 ] },
- { "name": "u_shift", "type": "vec4", "values": [ 0.1, 0.1, 0.0, 0.0 ] }
+ { "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "u_tint", "type": "vec4", "values": [ 1.0, 1.0, 1.0, 1.0 ] },
+ { "name": "u_shift", "type": "vec4", "values": [ 0.1, 0.1, 0.0, 0.0 ] },
+ { "name": "u_texsize", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] }
]
} \ No newline at end of file