====================================================================== CsdrUpdater for CTR 2010/04/06 ====================================================================== Contents - Revision History - Introduction - Operating Environment - Usage ====================================================================== Revision History ====================================================================== 2010/01/14 Created ShbinToCsdr. 2010/04/06 Changed the name to CsdrUpdater. Changed the NWCS intermediate file format from a template to a format to be loaded. ====================================================================== Introduction ====================================================================== CsdrUpdater for CTR is a script for Base64 encoding the shader binary and swapping it with the binary part of the template NWCS intermediate file. Note: This script is provisional and may be removed if an equivalent function is implemented for NWCS. ====================================================================== Operating Environment ====================================================================== Python 2.6 System ====================================================================== Using the Tool ====================================================================== CsdrUpdater is executed as follows from the command prompt. python CsdrUpdater.py [option] If not specified by option, DefaultShader.csdr is used for the template NWCS intermediate file. If not specified by option, the output file name is created by removing the file extension from the input binary file name. The following options can be specified. -i, --intermediate= : Specifies the template NWCS intermediate file name. -o, --output= : Specifies the output filename. -h, --help : Displays help. In order to use the output intermediate file with NWCS, it must be edited according to the user shader. ^$ It may not be possible to use the file with NWCS if the format is incorrect. A description of some attributes and elements is given below. ■ ShaderCtr -Name The shader name. This corresponds to the name displayed on the NWCS Contents manager. -Binary The shader binary. Created by the shader assembler, Base64 encoded values are stored here. -ShaderKinds The kind of shader object. According to the number and types of shader objects Give this VertexShader or GeometryShader. Example: VertexShader ■ Descriptions The program object description. ■ Symbols The shader symbol. For the user-defined reserved uniform you can specify bool or Vector1-4 values. Example: -Name The reserved uniform name. -IsEnabled Sets whether to use user-defined values. DefaultValue, given below, is used if false. -DefaultValue The default is used if a user-defined value is not being used or if there is no uniform value corresponding to the shader parameter. Example: true ■ AttributeSymbols The attribute symbols. Specifies the vertex attribute and name. Example: -Name The vertex attribute name. -Usage The vertex attribute.