diff options
author | chai <chaifix@163.com> | 2020-02-22 18:17:06 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-22 18:17:06 +0800 |
commit | 9c89460e136ed6c6c43704d9a3a15105e0f006b0 (patch) | |
tree | cd56f1dfc10650cfbfe7007ee3432ee32227edc3 /src/core/device.c | |
parent | d49f3d3f73709a9a7c0bce53aa13ed28a2bd27cb (diff) |
*wog
Diffstat (limited to 'src/core/device.c')
-rw-r--r-- | src/core/device.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/device.c b/src/core/device.c index 23e4bb3..70ae11f 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -500,6 +500,7 @@ static void render_prims_triangle(uint varying_flag) { /*back face culling*/ if (ssr_isenable(ENABLE_BACKFACECULL)) { + /*cull in ndc*/ float w0 = 1 / c0->w, w1 = 1 / c1->w, w2 = 1 / c2->w; Vec3 ab, ac; ab.x = c1->x * w1 - c0->x * w0; |