LightsprintSDK 2021.08.08
rr::RRSideBits Struct Reference

#include <RRMaterial.h>

Public Member Functions

bool operator== (const RRSideBits &a) const
 

Public Attributes

unsigned char renderFrom:1
 
unsigned char emitTo:1
 
unsigned char catchFrom:1
 
unsigned char legal:1
 
unsigned char receiveFrom:1
 
unsigned char reflect:1
 
unsigned char transmitFrom:1
 

Detailed Description

Boolean attributes of one side of a surface. Usually exist in array of two elements, for front and back side.

Member Function Documentation

◆ operator==()

bool rr::RRSideBits::operator== ( const RRSideBits a) const

Member Data Documentation

◆ renderFrom

unsigned char rr::RRSideBits::renderFrom

1=this side of surface is visible. Information only for renderer, not for solver.

◆ emitTo

unsigned char rr::RRSideBits::emitTo

1=this side of surface emits energy according to diffuseEmittance and diffuseReflectance. If both sides emit, 50% to each side is emitted.

◆ catchFrom

unsigned char rr::RRSideBits::catchFrom

1=surface catches photons coming from this side. Next life of catched photon depends on receiveFrom/reflect/transmitFrom/legal. For transparent pixels in alpha-keyed textures, simply disable catchFrom, light will come through without regard to other flags.

◆ legal

unsigned char rr::RRSideBits::legal

0=catched photons are considered harmful, their presence is masked away. It is usually used for back sides of solid 1sided faces.

◆ receiveFrom

unsigned char rr::RRSideBits::receiveFrom

1=catched photons are reflected according to diffuseReflectance. Reflected photon splits and leaves to all sides with emitTo.

◆ reflect

unsigned char rr::RRSideBits::reflect

1=catched photons are reflected according to specularReflectance. Reflected photon leaves to the same side.

◆ transmitFrom

unsigned char rr::RRSideBits::transmitFrom

1=catched photons are transmitted according to specularTransmittance and refractionIndex. Transmitted photon leaves to other side.