User LibraryΒΆ

Additional library

It is possible to add custom items to the Guerilla Library. In the configuration file, the UserLibrary variable to a list of additional paths to be scanned. For instance:

UserLibrary = /prod/common/library\n/home/$(USER)/library

The directories /prod/common/library and /home/user will be used by Guerilla (user refers to the current user.)

You can provide several additional libraries, separated by \n or :. Use $(VAR) where VAR is an environment variable.

Shaders

Guerilla scans all gmaterial files found in custom libraries. This allows to reference these in RenderGraphs without having to explicitely add them into the scene. Note that the RenderGraphShader node will display the available custom materials in the Shader drop down list.

  • /prod/common/library
    • materials
      • concrete.gmaterial: ProdConcrete material
      • metal.gmaterial: ProdMetal material
    • attributes
      • texture.gnode: ProdTexture subshader node
      • id.gnode: ProdId subshader node

In this example, the ProdConcrete and the ProdMetal shaders will be available in the RenderGraphs

Subshaders

Guerilla scans all gnode files found in the attributes directory of custom libraries. This allows to reference these in RenderGraphs without having to explicitely add them into the scene.

In the previous example, the ProdTexture and the ProdId subshaders will be available in the RenderGraphs

Overriding the default library

It is possible to force a different default library by overriding the GUERILLA_LIBRARY environment variable. the LIBRARY environment variable will then point to this location.

Overriding GUERILLA_LIBRARY may cause Guerilla to cease functionning properly, as it expects several files from this location.