YUGA Introduction

YUGA files are files that contain multiple resources inside them such as Meshes, Textures and Shaders that we call chunks.

Meta Data and Chunk Header

Each Resource in a YUGA File has a Meta Data that comes before them in memory.

Data such as:

Meta Data in our header file:

Chunk Header in our header file:

How We Write Assets

We write the assets using a FileWriter Class.

Here is an example on how we write a Shader Asset to a YUGA File:

YUGA Shaders

Shader is an AssetType in our Asset System, YUGA.

It contains

Shader Data

Shader Header

It is the header we put at the beginning of our asset memory.

It contains compiled shader's hash, shader stage, shader language, and data that will help us navigate through the raw data to find what we're looking for, such as offsets and sizes.

YUGA::Asset::Shader

And here is the YUGA::Asset::Shader which is fundamentally pointer arithmetics for our asset memory to get requested properties:

We will be using this class to extract reflection info and using it to update our descriptor sets and shader resources.