diff options
Diffstat (limited to 'src/shaders/common/core.c')
-rw-r--r-- | src/shaders/common/core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/shaders/common/core.c b/src/shaders/common/core.c index ffaa649..91bb6c0 100644 --- a/src/shaders/common/core.c +++ b/src/shaders/common/core.c @@ -4,7 +4,7 @@ Vec4 _proj_params; Vec2 _time; Vec4 _screen_params; -Vec3 unpacknormal(Color32 c32) { +Vec3 decode_normal(Color32 c32) { Vec3 normal = { c32.r * 2 - 1, c32.g * 2 - 1, @@ -15,16 +15,16 @@ Vec3 unpacknormal(Color32 c32) { Mat4 mat4(Vec4* c1, Vec4* c2, Vec4* c3, Vec4* c4); -Vec2 texsize(Texture* texture) { +Vec2 texture_size(Texture* texture) { Vec2 size = {texture->width, texture->height}; return size; } -float linear01Depth(float depth) { +float linear_01_depth(float depth) { float n = _proj_params.x, f = _proj_params.y; return n / ((n-f)*depth + f); } -float linearEyeDepth(float depth) { - return _proj_params.y * linear01Depth(depth); +float linear_eye_depth(float depth) { + return _proj_params.y * linear_01_depth(depth); }
\ No newline at end of file |