1====================================================================== 2 CsdrUpdater for CTR 3 2010/04/06 4====================================================================== 5 6Contents 7 - Revision History 8 - Introduction 9 - Operating Environment 10 - Usage 11 12====================================================================== 13 Revision History 14====================================================================== 152010/01/14 Created ShbinToCsdr. 162010/04/06 Changed the name to CsdrUpdater. 17 Changed the NWCS intermediate file format from a template to a format to be loaded. 18====================================================================== 19 Introduction 20====================================================================== 21CsdrUpdater for CTR is a script for Base64 encoding the shader binary and swapping it with the binary part of the template NWCS intermediate file. 22 23Note: This script is provisional and may be removed if an equivalent function is implemented for NWCS. 24====================================================================== 25 Operating Environment 26====================================================================== 27Python 2.6 System 28 29====================================================================== 30 Using the Tool 31====================================================================== 32CsdrUpdater is executed as follows from the command prompt. 33 34 python CsdrUpdater.py [option] <input binary file name> 35 36If not specified by option, DefaultShader.csdr is used for the template NWCS intermediate file. 37 38If not specified by option, the output file name is created by removing the file extension from the input binary file name. 39 40The following options can be specified. 41 -i, --intermediate= : Specifies the template NWCS intermediate file name. 42 -o, --output= : Specifies the output filename. 43 -h, --help : Displays help. 44In order to use the output intermediate file with NWCS, it must be edited according to the user shader. 45^$ 46It may not be possible to use the file with NWCS if the format is incorrect. 47A description of some attributes and elements is given below. 48 49■ ShaderCtr 50 -Name 51 The shader name. 52 This corresponds to the name displayed on the NWCS Contents manager. 53 -Binary 54 The shader binary. 55 Created by the shader assembler, Base64 encoded values are stored here. 56 57 -ShaderKinds 58 The kind of shader object. 59 According to the number and types of shader objects 60 Give this VertexShader or GeometryShader. 61 62 <B>Example:</B> <ShaderKindCtr>VertexShader</ShaderKindCtr> 63 64 ■ Descriptions 65 The program object description. 66 67 ■ Symbols 68 The shader symbol. 69 For the user-defined reserved uniform 70 you can specify bool or Vector1-4 values. 71 72 <B>Example:</B> <Vector4ShaderSymbolCtr> 73 <Vector4Xml X="1" Y="1" Z="1" W="1" /> 74 </Vector4ShaderSymbolCtr> 75 76 -Name 77 The reserved uniform name. 78 79 -IsEnabled 80 Sets whether to use user-defined values. 81 DefaultValue, given below, is used if false. 82 83 -DefaultValue 84 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. 85 86 <B>Example:</B> <Vector1Xml X="0" /> 87 <Vector2Xml X="0" Y="1" /> 88 <Vector3Xml X="0" Y="1" Z="2" /> 89 <Vector4Xml X="0" Y="1" Z="2" W="3" /> 90 <boolean>true</boolean> 91 92 ■ AttributeSymbols 93 The attribute symbols. 94 Specifies the vertex attribute and name. 95 96 <B>Example:</B> <AttributeSymbolCtr Usage="Position" Name="aPosition" /> 97 98 -Name 99 The vertex attribute name. 100 101 -Usage 102 The vertex attribute. 103