summaryrefslogtreecommitdiff
path: root/src/shaders
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-02-26 22:52:19 +0800
committerchai <chaifix@163.com>2020-02-26 22:52:19 +0800
commit372d77e436d21312ef1a0df622964751716963a3 (patch)
tree1a71865fea6fb9f2f532422c4b83959fff17ea76 /src/shaders
parent27687536844ed3b045bba1abd1aae8bb3692f6cb (diff)
*misc
Diffstat (limited to 'src/shaders')
-rw-r--r--src/shaders/common.c1
-rw-r--r--src/shaders/common.h6
-rw-r--r--src/shaders/pbr.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/shaders/common.c b/src/shaders/common.c
index 411c7e4..333b433 100644
--- a/src/shaders/common.c
+++ b/src/shaders/common.c
@@ -2,6 +2,7 @@
Vec4 _proj_params;
Vec2 _time;
+Vec4 _screen_params;
Vec3 unpacknormal(Color32 c32) {
Vec3 normal = {
diff --git a/src/shaders/common.h b/src/shaders/common.h
index 36f80c0..61066e5 100644
--- a/src/shaders/common.h
+++ b/src/shaders/common.h
@@ -35,6 +35,12 @@ Vec4 _proj_params;
// duration
Vec2 _time;
+// width
+// height
+// 1 / width
+// 1 / height
+Vec4 _screen_params;
+
/************************************************************************/
/* functions */
/************************************************************************/
diff --git a/src/shaders/pbr.c b/src/shaders/pbr.c
index 666f758..9bb051d 100644
--- a/src/shaders/pbr.c
+++ b/src/shaders/pbr.c
@@ -56,7 +56,7 @@ static bool frag(UniformCollection* uniforms, FragmentShaderIn* in, Color32* col
//vec3_scale(&c, roughness, &c);
color32_saturate(&c);
*color = c;
- vec3_scale(color, 1 - depth, color);
+ //vec3_scale(color, 1 - depth, color);
return 1;
}