rj-action-library/Runtime/Shading/Library/Cameras.gdshaderinc

11 lines
353 B
Plaintext

bool cameraContainsLayerIndex( int layerIndex, uint _CAMERA_VISIBLE_LAYERS )
{
uint layer = uint( 1 << ( layerIndex - 1 ) );
return ( _CAMERA_VISIBLE_LAYERS & layer ) == layer;
}
bool cameraHasOnlyLayerIndex( int layerIndex, uint _CAMERA_VISIBLE_LAYERS )
{
uint layer = uint( 1 << ( layerIndex - 1 ) );
return _CAMERA_VISIBLE_LAYERS == layer;
}