Skip navigation

File Link(.exe)


Click Me

Objective


This assignment wants me to replace the arguments in the old command line  with a lua file which contains a assets list that show how the assets should be build. Also in this assignment, instead of compiling shader files in the run-time, I need to compile them with Shaderbuilder in the building process and load the binary data of shaders while the game is running.

Assets build list 


In the previous assignments, I put the names of the assets files on the command line to build them, which is fine for a simple example or assignment, however, it will be bad when the project scope becomes large. A better solution is to create a file of assets list and just pass the file name to the command line.

This is what my assets list file looks like:

assetstobild

 

In the root level, I have “generic” and “shader” to indicate different categories of assets, and particular builders will be apply to each of the assets categories. In one category,” builder = “…” ” means which builder will be used to build the assets.The GenericBuilder will just copy the last files from source to target. The ShaderBuilder is responsible for compiling the HLSL text file to the binary file depends on the type of the shader. ” assets = {…} ” is the list of assets that will be built. Each asset has a source file path and a target file path. Also, they all have a arguments list to pass optional arguments to the builder.

Time estimation


Reading and searching — 1.5 h
Coding / Debugging — 3 h
Writing blog — 1 h
Total — 5.5 h

Leave a Reply