diff options
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 |