From 1a94259666a0d98e98e6999f19cf07475b618e65 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 25 Feb 2020 23:41:30 +0800 Subject: *camera --- src/shaders/common.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/shaders/common.h') 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 -- cgit v1.1-26-g67d0