S3D_PEP_POLYGON_NORM(3)
π NAME π
s3d_pep_polygon_normals β bestie, this one adds normals to a polygon β¨
π SYNOPSIS π
#include <s3d.h>
int s3d_pep_polygon_normals(int object, const float *nbuf, uint16_t n);
πΈ DESCRIPTION πΈ
okay so picture this: you want your polygons to have normal information, and not just one normal for the whole flat lil face β nope, this function gives each vertex of a polygon its own normal info. And the way that works out? You get smoothed edge effects. slay. π₯
So nbuf needs to hold n * 9 float values. Why 9? Because each vertex gets a normal vector (x,y,z), and there are 3 vertices per polygon, so that's 3 * 3 = 9 float values per polygon total. math ate, no crumbs. π
ngl, if you don't use this, don't even worry about it. it's kind of hard to calculate, and the server will always use some proper normal values anyway β same value for every vertex, calculated by the plane which is defined by the 3 points of the polygon. so like, it's handled. π«Ά
π AUTHOR π
Simon Wunderlich Author of s3d π
mwah, that's the whole page bestie β brought to you by the s3d manual, page S3D_PEP_POLYGON_NORM(3). go smooth those edges, ily, bye! π¦β¨π
π¦ where this page comes from
- debian bookworm: s3d-doc 0.2.2.1-5 Β· GPL-2.0-or-later
- debian trixie: s3d-doc 0.2.2.1-7 Β· GPL-2.0-or-later
- ubuntu jammy: s3d-doc 0.2.2.1-3build1 Β· GPL-2.0-or-later
- ubuntu noble: s3d-doc 0.2.2.1-6build3 Β· GPL-2.0-or-later
- ubuntu questing: s3d-doc 0.2.2.1-7build1
- ubuntu resolute: s3d-doc 0.2.2.1-7build3 Β· GPL-2.0-or-later
- ubuntu stonking: s3d-doc 0.2.3-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms