icetCompositeMode(3)

πŸ’– icetCompositeMode(3) β€” the IceT Reference glow-up πŸ’–

okay bestie, welcome to icetCompositeMode, a lil function from the IceT Reference that decides how your images get squished together. it's short, it's iconic, and it has OPINIONS. let's go 🫢


✨ NAME ✨

icetCompositeMode β€” set the type of operation used for compositing


🌸 Synopsis 🌸

#include <IceT.h>

void icetCompositeMode(   IceTEnum   mode  );

πŸ¦‹ Description πŸ¦‹

so basically: this sets the composite mode used when combining images. IceT does parallel rendering by letting every process in your code go render its own lil slice of partial geometry, all independent, main character energy. then those partial-geometry images get ``composited'' together into ONE image β€” like it was all rendered by a single process the whole time. slay.

IceT supports multiple operations for combining images, and the operator you pick should match whatever your rendering system uses to resolve hidden surfaces or to mix occluding geometry with whatever's chillin' behind it.

the argument mode is one of these enumerations:

  • ICET_COMPOSITE_MODE_Z_BUFFER β€” use the hidden-surface removal operation. the compositing compares how far each pixel fragment is from the viewpoint and passes along the fragment closest to the user. for this to actually work, your images need a depth buffer (set it with icetSetDepthFormat).
  • ICET_COMPOSITE_MODE_BLEND β€” blends two fragments together with the standard operator. for this to work, images must have a color buffer (set with icetSetColorFormat) that has an alpha channel, and there must be no depth buffer (because the operation makes zero sense with depth, fr). also, this mode only works if ICET_ORDERED_COMPOSITE is enabled and the order is set with icetCompositeOrder.

the default compositing mode is ICET_COMPOSITE_MODE_Z_BUFFER. and the current composite mode lives in the ICET_COMPOSITE_MODE state variable. πŸ’…


πŸ’€ Errors πŸ’€

  • ICET_INVALID_ENUM β€” mode is not a valid composite mode. (nope, not a vibe.)

πŸ™ˆ Warnings πŸ™ˆ

None. literally none. we're chill.


😭 Bugs 😭

ngl, icetCompositeMode will absolutely let you set a mode even when it's incompatible with your other current settings. some settings only get checked later, during a call to icetDrawFrame or icetCompositeImage. for example: if the image format (specified with icetSetColorFormat and icetSetDepthFormat) doesn't support the composite mode you picked, you'll get an error during the call to icetDrawFrame. surprise! πŸŽ€

and other incompatibilities aren't checked either. for example, if the composite mode is set to ICET_COMPOSITE_MODE_BLEND, IceT will happily use this operator even if ICET_ORDERED_COMPOSITE is not enabled. but because order matters in blend mode, you will probably get incorrect images if the compositing happens in arbitrary order. so like… be careful, bestie. ⚠️


Copyright (C)2010 Sandia Corporation

Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.

This source code is released under the New BSD License.


🌈 See Also 🌈


and that's the whole page, periodt. ✨ this lil icon dropped in the IceT Reference on September 26, 2014, and honestly? still ate. go composite something gorgeous, bestie πŸ’–πŸ¦‹πŸŒΈ