summaryrefslogtreecommitdiffstatshomepage
path: root/bgfx/effects/hlsl
diff options
context:
space:
mode:
author therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-29 11:28:07 +0200
committer therealmogminer@gmail.com <therealmogminer@gmail.com>2016-03-29 11:28:24 +0200
commitd9153eb306f8b3f5e1c9c66cdc3ad6e41d09ccac (patch)
tree2f2ac88e85af83892fbc218012fa30d6de49d121 /bgfx/effects/hlsl
parent5cab7dbd8b0a09b55243b115d0c49a4bd3368768 (diff)
Get bgfx post-processing working with laserdisc games, nw
Diffstat (limited to 'bgfx/effects/hlsl')
-rw-r--r--bgfx/effects/hlsl/blit.json12
-rw-r--r--bgfx/effects/hlsl/color.json8
-rw-r--r--bgfx/effects/hlsl/deconverge.json8
-rw-r--r--bgfx/effects/hlsl/defocus.json8
-rw-r--r--bgfx/effects/hlsl/distortion.json8
-rw-r--r--bgfx/effects/hlsl/ntsc_decode.json1
-rw-r--r--bgfx/effects/hlsl/ntsc_encode.json8
-rw-r--r--bgfx/effects/hlsl/phosphor.json8
-rw-r--r--bgfx/effects/hlsl/post.json8
-rw-r--r--bgfx/effects/hlsl/prescale.json8
10 files changed, 39 insertions, 38 deletions
diff --git a/bgfx/effects/hlsl/blit.json b/bgfx/effects/hlsl/blit.json
index bbc9fd295d4..5f5ad148148 100644
--- a/bgfx/effects/hlsl/blit.json
+++ b/bgfx/effects/hlsl/blit.json
@@ -16,15 +16,15 @@
"equation": "add",
// blend function parameters (optional): What factors to use in the blend function when calculating the final pixel.
- // values: "0", "1", "srcColor", "1-srcColor", "dstColor", "1-dstColor", "srcAlpha", "1-srcAlpha", "dstAlpha", "1-dstAlpha"
+ // values: "0", "1", "srccolor", "1-srccolor", "dstcolor", "1-dstcolor", "srcalpha", "1-srcalpha", "dstalpha", "1-dstalpha"
// defaults (srcColor, srcAlpha): "1"
// defaults (dstColor, dstAlpha): "0"
//
- // "zero", "one", "invSrcColor", "invDstColor", "invSrcAlpha", and "invDstAlpha" are provided as aliases for "0", "1", "1-srcColor", "1-dstColor", "1-srcAlpha", and "1-dstAlpha"
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ // "zero", "one", "invsrccolor", "invdstcolor", "invsrcalpha", and "invdstalpha" are provided as aliases for "0", "1", "1-srccolor", "1-dstcolor", "1-srcalpha", and "1-dstalpha"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
// depth (required): The depth state for this effect.
diff --git a/bgfx/effects/hlsl/color.json b/bgfx/effects/hlsl/color.json
index 5a033140233..d5a8d6ca405 100644
--- a/bgfx/effects/hlsl/color.json
+++ b/bgfx/effects/hlsl/color.json
@@ -8,10 +8,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/deconverge.json b/bgfx/effects/hlsl/deconverge.json
index dafd2fb630e..322a916f47f 100644
--- a/bgfx/effects/hlsl/deconverge.json
+++ b/bgfx/effects/hlsl/deconverge.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/defocus.json b/bgfx/effects/hlsl/defocus.json
index 7ba4b2cec49..b01112de088 100644
--- a/bgfx/effects/hlsl/defocus.json
+++ b/bgfx/effects/hlsl/defocus.json
@@ -8,10 +8,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/distortion.json b/bgfx/effects/hlsl/distortion.json
index e8bbac16095..5eb70fa93d1 100644
--- a/bgfx/effects/hlsl/distortion.json
+++ b/bgfx/effects/hlsl/distortion.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/ntsc_decode.json b/bgfx/effects/hlsl/ntsc_decode.json
index 208f35b0ff3..1195669f450 100644
--- a/bgfx/effects/hlsl/ntsc_decode.json
+++ b/bgfx/effects/hlsl/ntsc_decode.json
@@ -26,6 +26,7 @@
"fragment": "fs_ntsc_decode",
"uniforms": [
{ "name": "s_tex", "type": "int", "values": [ 1.0 ] },
+ { "name": "s_screen", "type": "int", "values": [ 1.0 ] },
{ "name": "u_source_dims", "type": "vec4", "values": [ 1.0, 1.0, 0.0, 0.0 ] },
{ "name": "u_a_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] },
{ "name": "u_b_value", "type": "vec4", "values": [ 0.5, 0.5, 0.5, 0.5 ] },
diff --git a/bgfx/effects/hlsl/ntsc_encode.json b/bgfx/effects/hlsl/ntsc_encode.json
index 8ff193398b2..1112a21c197 100644
--- a/bgfx/effects/hlsl/ntsc_encode.json
+++ b/bgfx/effects/hlsl/ntsc_encode.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/phosphor.json b/bgfx/effects/hlsl/phosphor.json
index aaa3c12f727..84ad77ad5ed 100644
--- a/bgfx/effects/hlsl/phosphor.json
+++ b/bgfx/effects/hlsl/phosphor.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/post.json b/bgfx/effects/hlsl/post.json
index c4a86da84e5..48530433f40 100644
--- a/bgfx/effects/hlsl/post.json
+++ b/bgfx/effects/hlsl/post.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"
diff --git a/bgfx/effects/hlsl/prescale.json b/bgfx/effects/hlsl/prescale.json
index a636c4316e0..3026b424876 100644
--- a/bgfx/effects/hlsl/prescale.json
+++ b/bgfx/effects/hlsl/prescale.json
@@ -9,10 +9,10 @@
{
"blend": {
"equation": "add",
- "srcColor": "1",
- "dstColor": "0",
- "srcAlpha": "1",
- "dstAlpha": "0"
+ "srcColor": "srcalpha",
+ "dstColor": "1-srcalpha",
+ "srcAlpha": "srcalpha",
+ "dstAlpha": "1-srcalpha"
},
"depth": {
"function": "always"