S3D_PUSH_MATERIAL(3)
π S3D_PUSH_MATERIAL(3) π
okay bestie, welcome to the s3d Manual, page S3D_PUSH_MATERIAL(3) β we're doing materials today and honestly it's giving glow-up π¨β¨
πΈ NAME πΈ
s3d_push_material β push material
β¨ SYNOPSIS β¨
#include <s3d.h>
int s3d_push_material(int object, float amb_r, float amb_g, float amb_b,
float spec_r, float spec_g, float spec_b,
float diff_r, float diff_g, float diff_b);
π¦ DESCRIPTION π¦
So basically this function pushes a material for an object. That's the whole vibe. π
Heads up tho, bestie β you will have to count them yourself too, because polygons will ask for the material index number. No, the library is not gonna keep track for you. She's not that kind of girl. You are the main character of bookkeeping here. πβ¨
The material properties come in rgb (red/green/blue) color codes, in float. And the range? 0.0 is the minimum, 1.0 is the maximum a color value can be. That's the whole runway, no going past it. π«π
Now let's talk about what each color actually does, because they are NOT the same and the way they behave is lowkey iconic:
- specular color β this is the color which is directly reflected from the light source. the shiny moment β¨ the glint, the sparkle, the highlight
- diffuse color β this is the color which can be seen in the bright side of the object. sun's out, this is what you see βοΈ
- ambience color β this is the color of the shadow side of the object. the moody, dim, mysterious side π
so yeah, three rgb triples, three totally different jobs, one function call. slay. π«Ά
π AUTHOR π
Simon Wunderlich Author of s3d
okay that's the whole page bestie, we ate and left no crumbs ππ β this was S3D_PUSH_MATERIAL(3) from the s3d Manual, source s3d, and yeah the footer date is just the same page header energy coming back around, periodt. bye ily, go push some materials ππβ
π¦ 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