S3D_PUSH_MATERIALS_A(3)

s3d_push_materials_a πŸ’…βœ¨

okay bestie, welcome to the s3d manual, section 3 πŸŽ€ today's main character is s3d_push_materials_a β€” the one that pushes many materials at once, no cap 🫢


✨ NAME ✨

s3d_push_materials_a β€” push many materials 🌈


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <s3d.h>

int s3d_push_materials_a(int object, const float *mbuf, uint16_t n);

πŸ’– DESCRIPTION πŸ’–

So like. This one pushes a whole buffer of materials in a single go. Group-chat behavior, fr fr β€” instead of sliding into the DMs one material at a time, you send the whole squad πŸ“¨

The materials live in a float[n*12] format, and every single entry is split up like this:

  • mbuf[n*12 + 0-3] β€” ambience ✨
  • mbuf[n*12 + 4-7] β€” specular πŸ’Ž
  • mbuf[n *12 + 8-11] β€” diffusion values 🌸

and here n is literally the number of materials you're pushing, bestie. The values go in r,g,b,a order, always, no exceptions πŸ’…

lowkey important: if you only wanna push one material, don't be extra β€” use the easier s3d_push_material_a() function instead πŸ™ˆ

ok now the vibe check example, look at this:

// each line has r,g,b,a value
float bla[24]=
        {1, 0, 0, 1,
         1, 0, 0, 1,
         1, 0, 0, 1,
         0, 1, 1, 1,
         0, 1, 1, 1,
         0, 1, 1, 1};

s3d_push_materials_a(object, bla, 2); // push a red and a cyan material

see how that works?? two materials, one call, absolutely ate πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

  • Simon Wunderlich
    • Author of s3d 🫑

and that's the whole page babes πŸ’œ this was the s3d manual's S3D_PUSH_MATERIALS_A(3) page β€” icon behavior only, periodt. go push some materials, you got this πŸŒŸπŸŽ€πŸ¦‹