-
Notifications
You must be signed in to change notification settings - Fork 0
/
shader-visualstudio-fxc.rules
108 lines (108 loc) · 3.08 KB
/
shader-visualstudio-fxc.rules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
Name="ShaderCompile"
Version="8.00"
>
<Rules>
<CustomBuildRule
Name="FXC"
DisplayName="FXC"
CommandLine="fxc.exe [output] [target] [strict] [compat] [perf] [noopt] [nopre] [child] [Inputs]"
Outputs="[outputdir]\$(InputName).o"
FileExtensions="*.fx"
ExecutionDescription="Executing tool..."
>
<Properties>
<EnumProperty
Name="output"
DisplayName="Compiler Output"
Category="Default"
Description="Output to an object file or to stdout if you wish to see the assembler."
>
<Values>
<EnumValue
Value="0"
Switch="/Fo [outputdir]\$(InputName).o"
DisplayName="Object File"
/>
<EnumValue
Value="1"
Switch="/Cc"
DisplayName="No output. Just compile to STDOUT."
/>
</Values>
</EnumProperty>
<EnumProperty
Name="target"
DisplayName="Compiler Target"
Category="Default"
Description="Which shader model target to compile against."
>
<Values>
<EnumValue
Value="0"
Switch="/T fx_4_0"
DisplayName="FX 4.0 ( DX10 for shader model 4 and up )"
/>
<EnumValue
Value="1"
Switch="/T fx_2_0"
DisplayName="FX 2.0 ( DX9 for shader model 3 and down )"
/>
</Values>
</EnumProperty>
<BooleanProperty
Name="strict"
DisplayName="Enable Strict Mode"
Category="Default"
Description="Enables strict mode."
Switch="/Ges"
DefaultValue="true"
/>
<BooleanProperty
Name="compat"
DisplayName="Backwards Compatibility ( DX9 syntax )"
Category="Dx10"
Description="Allows shaders written in SM 3.0 and lower syntax to be compiled for SM 4.0 targets. Useful for moving DX9 content over to DX10."
Switch="/Gec"
/>
<BooleanProperty
Name="perf"
DisplayName="Disable Performance Mode"
Category="Default"
Description="Disabiling performance mode allows the application to update state object members among other things. "
Switch="/Gdp"
/>
<BooleanProperty
Name="noopt"
DisplayName="Disable Optimizations"
Category="Debug"
Description="Turns off shader optimizations."
Switch="/Od"
/>
<BooleanProperty
Name="nopre"
DisplayName="Disable Preshaders"
Category="Debug"
Description="Disables preshaders. By default preshaders should be enabled because they can greatly improve performance."
Switch="/Op"
/>
<BooleanProperty
Name="child"
DisplayName="Child Effect"
Category="Dx10"
Description="Allows a shader to be compiled as a child effect which allows it to be added to a pool. "
Switch="/Gch"
/>
<StringProperty
Name="outputdir"
DisplayName="Output Directory"
Category="Default"
Description="The directory to place the compiled object file in (when not compiling to STDOUT). The default value is the project's temp folder."
Switch="[value]"
DefaultValue="$(IntDir)"
/>
</Properties>
</CustomBuildRule>
</Rules>
</VisualStudioToolFile>