diff options
author | chai <chaifix@163.com> | 2020-02-25 23:41:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-25 23:41:30 +0800 |
commit | 1a94259666a0d98e98e6999f19cf07475b618e65 (patch) | |
tree | 502450d9ce77dca2234898badaf22a43ecf89d7e /src/shaders/common.h | |
parent | 87b9482459c1a27b8756514473ae392453db39ec (diff) |
*camera
Diffstat (limited to 'src/shaders/common.h')
-rw-r--r-- | src/shaders/common.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/shaders/common.h b/src/shaders/common.h index 7e0ca5f..36f80c0 100644 --- a/src/shaders/common.h +++ b/src/shaders/common.h @@ -25,12 +25,22 @@ #define _mvp_matrix (uniforms->mvp) #define _it_model_matrix /*inverse-transpose model matrix if needed*/ +// near +// far +// fov +// aspect +Vec4 _proj_params; + +// dt +// duration +Vec2 _time; + /************************************************************************/ /* functions */ /************************************************************************/ /*shader built in functions*/ -Vec3 normal_from_color(Color32 c32); +Vec3 unpacknormal(Color32 c32); Mat4 mat4(Vec4* c1, Vec4* c2, Vec4* c3, Vec4* c4); Mat3 mat3(Vec3* c1, Vec3* c2, Vec3* c3); @@ -62,4 +72,7 @@ out_v3->x = color.x * 2 - 1; \ out_v3->y = color.y * 2 - 1; \ out_v3->z = color.z * 2 - 1; +float linear01depth(float depth); +float lineareyedepth(float depth); + #endif
\ No newline at end of file |