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

11 lines
353 B
Plaintext
Raw Normal View History

2025-04-01 12:06:15 +00:00
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;
}