Skip to documentation
DocumentationAll documentsEnglish

LIBOPTICAL(3)

NAME

liboptical - optical shading library for BRL-CAD

On this page

SYNOPSIS

#include <optical.h>

Link with -loptical.

The public interface is organized across the headers included by optical.h, including optical/defines.h, optical/shadework.h, optical/shadefuncs.h, optical/light.h, optical/plastic.h, and optical/photonmap.h.

DESCRIPTION

LIBOPTICAL provides the material shaders and lighting model used by BRL-CAD’s optical rendering tools, such as rt(1). It defines the shader function interface (struct mfuncs) and the per-shading working context (struct shadework) through which shaders compute surface color and appearance at ray/geometry intersections.

The library supplies a collection of built-in shaders — including phong/plastic reflectance, textures, and specialized effects — along with lighting, refraction and reflection handling, and photon-map based global illumination support. Applications obtain the list of available shaders via optical_shader_init() and drive shading through the librt ray-tracing pipeline.

The complete API, including data structures and function signatures, is documented in the headers noted above and in the Doxygen-generated reference for the LIBOPTICAL module.

SEE ALSO

brlcad(1), rt(1), librt(3), libbn(3), libbu(3)

The BRL-CAD Doxygen API reference provides the authoritative, up-to-date description of all public LIBOPTICAL routines.

AUTHOR

BRL-CAD Team

This software is Copyright (c) 2004-2026 United States Government as represented by the U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org