diff options
author | chai <chaifix@163.com> | 2019-12-08 21:29:29 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-12-08 21:29:29 +0800 |
commit | 69d8af71d6882e801496fcd7ed971081c0b720d8 (patch) | |
tree | 452f7d037cf977e4a934d433bd2f12c03ed1ea10 /src/core/shader.c | |
parent | 31be0df6255ef704bed28d2be56acbe1cea7caad (diff) |
*misc
Diffstat (limited to 'src/core/shader.c')
-rw-r--r-- | src/core/shader.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/shader.c b/src/core/shader.c index 89daa36..a508820 100644 --- a/src/core/shader.c +++ b/src/core/shader.c @@ -215,6 +215,12 @@ void ssrS_setregtofragin(uint extra_varying_flag, FragmentShaderIn* frag_in){ } } +Color32 texture2d(Texture* tex, Vec2* uv) { + FilterMode filter_mode = ssr_getfiltermode(); + WrapMode wrap_mode = ssr_getwrapmode(); + return texture_sampling(tex, filter_mode, wrap_mode, uv->x, uv->y); +} + float* ssrS_bcpnum(Vec3* bc, float A, float B, float C, float* out) { ssr_assert(bc && out); *out = bc->A * A + bc->B * B + bc->C * C; |