UltraEdit中配置编译HLSL的环境

1. 在UltraEdit安装目录下找到wordfiles目录,新建文件HLSL.uew,文件中拷贝入下面的配置。这样只是完成的语法着色的配置,配置并没有应用上。

    a. UltraEdit 高级->配置->编辑器显示->语法着色  配置wordfiles目录为UltraEdit安装目录中的wordfiles,重启UltraEdit

    b. UltraEdit 视图->查看方式(着色文件类型),选择HLSL

2. 配置编译命令

    a. UltraEdit  高级->工具栏配置

fxc /Zi /Tfx_2_0 /Fo"%p%n.fxo"  "%p%n.fx"   (该配置只适合编译.fx文件,若是要编译VertexShader,需要修改点东西)

fxc /Zi /Tvs_2_0 /Fo"%p%n.vso"  "%p%n.vsh" (适合编译VertexShader,其它配置类似)

工作目录设置到:/Microsoft DirectX SDK (December 2005)/Utilities/Bin/x86/ (注:fxc.exe只有2005之前的DirectX SDK中才有)


3. 编译输出文件:会在UltraEdit中新建一个文件来显示输出。

4. 配置编译快捷键:UltraEdit->高级->配置->键盘映射  找到AdvancedUserTool1,删除已存在的快捷键,输入新快捷键,再点击“分配”即可。


HLSL.uew配置:

/L20"HLSL" HLSL_LANG Line Comment = // Block Comment On = /* Block Comment Off = */ Escape Char = \ String Chars = "' File Extensions = fx hlsl FX HLSL
/Delimiters = ~!@%^&*()-+=|\/{}[]:;"'<> ,    .?
/Function String = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]+([^p*&:, ^t^[^]a-zA-Z_0-9.!]++)[~;]"
/Function String 1 = "%[a-zA-Z_0-9*]*::^([a-zA-Z_0-9^~]+^)[ ^t^p]++([^p*&:, ^t^[^]/*^-'=:&a-zA-Z_0-9./(!]++)[~;]"
/Function String 2 = "%[a-zA-Z_0-9][a-zA-Z_0-9^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
/Function String 3 = "%[a-zA-Z_0-9*&$^[^]*]+[ ^t]+[a-zA-Z_0-9*&$^[^]]+[ ^t*]+^([a-zA-Z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./(!]++)[~;]"
/Function String 4 = "%[a-z_0-9^[^]*]++ [a-z_0-9*^[^]]+[ ^t]++[a-z_0-9*^[^]]+[ ^t]++^([*a-z_0-9]+^)[ ^t]++([^p*&:, ^t^[^]a-z_0-9./(!]++)[~;]"
/Function String 5 = "%^([a-zA-Z_0-9^[^]*]+^)[ ^t]++([^p*&:, ^t^[^]a-zA-Z_0-9./()!]++)[~;]"
/Member String = "^([A-Za-z0-9_:.]+^)[ ^t^*&]+$S[ ^t^[^]A-Za-z0-9_]++[(-);,]"
/Variable String = "%[ ^t]++^([!-~ ^t<>]+*[~a-z^p]^)$S[ ^t;,()^-]"
/Indent Strings = "{" "if" "else" ":"
/Unindent Strings = "}"
/Open Brace Strings =  "{" "(" "["
/Close Brace Strings = "}" ")" "]"
/Open Fold Strings = "{"
/Close Fold Strings = "}"
/C1"Keywords" STYLE_KEYWORD
#define #include
bool void int true false
float float2 float3 float4 float2x2 float3x3 float4x4 float2x4 float3x4 float4x3 float4x2 float2x3 float3x2
half half2 half3 half4 half2x2 half3x3 half4x4
double double2 double2x2
vector matrix string texture
struct
return typedef uniform in out inout extern shared static volatile const
if for while do else inline
sampler2D sampler3D samplerCUBE
COLOR COLOR0 COLOR1 COLOR2 COLOR3 COLOR4 COLOR5 COLOR6 COLOR7 COLOR8 COLOR9 COLOR10 COLOR11
TEXCOORD TEXCOORD0 TEXCOORD1 TEXCOORD2 TEXCOORD3 TEXCOORD4 TEXCOORD5 TEXCOORD6 TEXCOORD7 TEXCOORD8 TEXCOORD9 TEXCOORD10 TEXCOORD11
NORMAL NORMAL0 NORMAL1 NORMAL2 NORMAL3 NORMAL4 NORMAL5 NORMAL6 NORMAL7 NORMAL8 NORMAL9 NORMAL10 NORMAL11
/C2"Effect Framework" STYLE_EXTENSION
sampler_state
asm compile decl VertexShader PixelShader
technique Pass
vs_1_1 vs_2_0 vs_2_x vs_2_sw vs_3_0
ps_1_1 ps_1_2 ps_1_3 ps_1_4 ps_2_0 ps_2_x ps_2_sw ps_3_0
/C3"Cg extensions" STYLE_EXTENSION
/C4"Functions" STYLE_FUNCTION
abs acos all any asin atan
atan2 ceil clamp clip cos cosh
cross D3DCOLORtoUBYTE4 ddx ddy degrees determinant
distance dot exp exp2 faceforward floor
fmod frac frexp fwidth isfinite isinf
isnan ldexp length lerp lit log
log10 log2 max min modf mul
noise normalize pow radians reflect refract
round rsqrt saturate sign sin sincos
sinh smoothstep sqrt step tan tanh
tex1D tex1Dgrad tex1Dbias tex1Dgrad tex1Dlog tex1Dproj
tex2D tex2Dbias tex2Dgrad tex2Dlod tex2Dproj tex3D
tex3Dbias tex3Dgrad tex3Dlod tex3Dproj texCUBE texCUBEbias
texCUBEgrad texCUBElod  texCUBEproj transpose



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值