Constants.cs 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. // Amplify Shader Editor - Visual Shader Editing Tool
  2. // Copyright (c) Amplify Creations, Lda <info@amplify.pt>
  3. using UnityEngine;
  4. using System.Collections.Generic;
  5. namespace AmplifyShaderEditor
  6. {
  7. public struct Constants
  8. {
  9. /*public readonly static string[] CustomASEStandardArgsMacros =
  10. {
  11. "#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC)//ASE Args Macros",
  12. "#define ASE_TEXTURE2D_ARGS(textureName) Texture2D textureName, SamplerState sampler##textureName",
  13. "#define ASE_TEXTURE3D_ARGS(textureName) Texture3D textureName, SamplerState sampler##textureName",
  14. "#define ASE_TEXTURECUBE_ARGS(textureName) TextureCube textureName, SamplerState sampler##textureName",
  15. "#define ASE_TEXTURE2D_PARAMS(textureName) textureName, sampler##textureName",
  16. "#define ASE_TEXTURE3D_PARAMS(textureName) textureName, sampler##textureName",
  17. "#define ASE_TEXTURECUBE_PARAMS(textureName) textureName, sampler##textureName",
  18. "#define ASE_TEXTURE2D_ARRAY_PARAMS(textureName) textureName, sampler##textureName",
  19. "#else//ASE Args Macros",
  20. "#define ASE_TEXTURE2D_ARGS(textureName) sampler2D textureName",
  21. "#define ASE_TEXTURE3D_ARGS(textureName) sampler3D textureName",
  22. "#define ASE_TEXTURECUBE_ARGS(textureName) samplerCUBE textureName",
  23. "#define ASE_TEXTURE2D_PARAMS(textureName) textureName",
  24. "#define ASE_TEXTURE3D_PARAMS(textureName) textureName",
  25. "#define ASE_TEXTURECUBE_PARAMS(textureName) textureName",
  26. "#define ASE_TEXTURE2D_ARRAY_PARAMS(textureName) textureName",
  27. "#endif//ASE Args Macros\n"
  28. };
  29. public readonly static string[] CustomASEDeclararionMacros =
  30. {
  31. "#define ASE_TEXTURE2D(textureName) {0}2D(textureName)",
  32. "#define ASE_TEXTURE2D_ARRAY(textureName) {0}2D_ARRAY(textureName)",
  33. "#define ASE_TEXTURE3D(textureName) {0}3D(textureName)",
  34. "#define ASE_TEXTURECUBE(textureName) {0}CUBE(textureName)\n"
  35. };
  36. public readonly static string[] CustomASEStandarSamplingMacrosHelper =
  37. {
  38. "#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC)//ASE Sampling Macros",
  39. "#else//ASE Sampling Macros",
  40. "#endif//ASE Sampling Macros\n"
  41. };*/
  42. /*public readonly static string[] CustomASESamplingMacros =
  43. {
  44. "#define ASE_SAMPLE_TEXTURE2D(textureName,{0}coords) {1}2D{2}(textureName,{0}coords)",
  45. "#define ASE_SAMPLE_TEXTURE2D_LOD(textureName, {0}coord2, lod) {1}2D{2}_LOD(textureName, {0}coord2, lod)",
  46. "#define ASE_SAMPLE_TEXTURE2D_BIAS(textureName,{0}coord2, bias) {1}2D{2}_BIAS(textureName,{0}coord2, bias)",
  47. "#define ASE_SAMPLE_TEXTURE2D_GRAD(textureName,{0}coord2, dpdx, dpdy) {1}2D{2}_GRAD(textureName,{0}coord2, dpdx, dpdy)",
  48. "#define ASE_SAMPLE_TEXTURE3D(textureName,{0}coord3) {1}3D{2}(textureName,{0}coord3)",
  49. "#define ASE_SAMPLE_TEXTURE3D_LOD(textureName,{0}coord3, lod) {1}3D{2}_LOD(textureName,{0}coord3, lod)",
  50. "#define ASE_SAMPLE_TEXTURE3D_BIAS(textureName,{0}coord3, bias) {1}3D{2}_BIAS(textureName,{0}coord3, bias)",
  51. "#define ASE_SAMPLE_TEXTURE3D_GRAD(textureName,{0}coord3, dpdx, dpdy) {1}3D{2}_GRAD(textureName,{0}coord3, dpdx, dpdy)",
  52. "#define ASE_SAMPLE_TEXTURECUBE(textureName,{0}coord3) {1}CUBE{2}(textureName,{0}coord3)",
  53. "#define ASE_SAMPLE_TEXTURECUBE_LOD(textureName,{0}coord3, lod) {1}CUBE{2}_LOD(textureName,{0}coord3, lod)",
  54. "#define ASE_SAMPLE_TEXTURECUBE_BIAS(textureName,{0}coord3, bias) {1}CUBE{2}_BIAS(textureName,{0}coord3, bias)\n"
  55. };*/
  56. // SRP
  57. /*public readonly static string[] CustomASESRPArgsMacros =
  58. {
  59. "#define ASE_TEXTURE2D_ARGS(textureName) TEXTURE2D(textureName), SAMPLER(textureName)",
  60. "#define ASE_TEXTURE3D_ARGS(textureName) TEXTURE3D(textureName), SAMPLER(textureName)",
  61. "#define ASE_TEXTURECUBE_ARGS(textureName) TEXTURECUBE(textureName), SAMPLER(textureName)",
  62. "#define ASE_TEXTURE2D_PARAMS(textureName) textureName, sampler##textureName",
  63. "#define ASE_TEXTURE3D_PARAMS(textureName) textureName, sampler##textureName",
  64. "#define ASE_TEXTURECUBE_PARAMS(textureName) textureName, sampler##textureName",
  65. "#define ASE_TEXTURE2D_ARRAY_PARAMS(textureName) textureName, sampler##textureName\n"
  66. };*/
  67. public readonly static RenderTextureFormat PreviewFormat = RenderTextureFormat.ARGBFloat;
  68. public readonly static int PreviewSize = 128;
  69. public readonly static List<string> UnityNativeInspectors = new List<string>
  70. {
  71. "Rendering.HighDefinition.LightingShaderGraphGUI",
  72. "Rendering.HighDefinition.HDUnlitGUI",
  73. "UnityEditor.Rendering.HighDefinition.HDLitGUI",
  74. "UnityEditor.ShaderGraph.PBRMasterGUI",
  75. "UnityEditor.Rendering.HighDefinition.DecalGUI",
  76. "UnityEditor.Rendering.HighDefinition.FabricGUI",
  77. "UnityEditor.Experimental.Rendering.HDPipeline.HDLitGUI",
  78. "Rendering.HighDefinition.DecalGUI",
  79. "Rendering.HighDefinition.LitShaderGraphGUI",
  80. "Rendering.HighDefinition.DecalShaderGraphGUI",
  81. "UnityEditor.ShaderGraphUnlitGUI",
  82. "UnityEditor.ShaderGraphLitGUI",
  83. "UnityEditor.Rendering.Universal.DecalShaderGraphGUI"
  84. };
  85. public readonly static Dictionary<string, string> CustomInspectorHD7To10 = new Dictionary<string, string>
  86. {
  87. { "UnityEditor.Rendering.HighDefinition.DecalGUI","Rendering.HighDefinition.DecalGUI"},
  88. { "UnityEditor.Rendering.HighDefinition.FabricGUI","Rendering.HighDefinition.LightingShaderGraphGUI"},
  89. { "UnityEditor.Rendering.HighDefinition.HDLitGUI","Rendering.HighDefinition.LitShaderGraphGUI"},
  90. { "UnityEditor.Experimental.Rendering.HDPipeline.HDLitGUI","Rendering.HighDefinition.LitShaderGraphGUI"},
  91. };
  92. public readonly static Dictionary<string , string> CustomInspectorURP10To12 = new Dictionary<string , string>
  93. {
  94. { "UnityEditor.ShaderGraph.PBRMasterGUI","UnityEditor.ShaderGraphLitGUI"},
  95. };
  96. public readonly static Dictionary<string , string> CustomInspectorHDLegacyTo11 = new Dictionary<string , string>
  97. {
  98. { "UnityEditor.Rendering.HighDefinition.DecalGUI","Rendering.HighDefinition.DecalShaderGraphGUI"},
  99. { "Rendering.HighDefinition.DecalGUI","Rendering.HighDefinition.DecalShaderGraphGUI"},
  100. { "UnityEditor.Rendering.HighDefinition.FabricGUI","Rendering.HighDefinition.LightingShaderGraphGUI"},
  101. { "UnityEditor.Rendering.HighDefinition.HDLitGUI","Rendering.HighDefinition.LitShaderGraphGUI"},
  102. { "UnityEditor.Experimental.Rendering.HDPipeline.HDLitGUI","Rendering.HighDefinition.LitShaderGraphGUI"},
  103. };
  104. public readonly static string CustomASEStandardSamplerParams = "#define ASE_TEXTURE_PARAMS(textureName) textureName\n";
  105. public readonly static string[] CustomASESRPTextureArrayMacros =
  106. {
  107. "#define ASE_TEXTURE2D_ARRAY_ARGS(textureName) TEXTURE2D_ARRAY_ARGS(textureName,sampler##textureName)\n" ,
  108. "#define ASE_TEXTURE2D_ARRAY_PARAM(textureName) TEXTURE2D_ARRAY_PARAM(textureName,sampler##textureName)\n" ,
  109. "#define ASE_SAMPLE_TEXTURE2D_ARRAY(textureName, coord3) textureName.Sample(sampler##textureName, coord3)",
  110. "#define ASE_SAMPLE_TEXTURE2D_ARRAY_LOD(textureName, coord3, lod) textureName.SampleLevel(sampler##textureName, coord3, lod)"
  111. };
  112. public readonly static string CustomASESRPSamplerParams = "#define ASE_TEXTURE_PARAMS(textureName) textureName, sampler##textureName\n";
  113. public readonly static string[] CustomSRPSamplingMacros =
  114. {
  115. "#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER))//3D SRP MACROS",
  116. "#define SAMPLE_TEXTURE3D_GRAD(textureName, samplerName, coord3, dpdx, dpdy) textureName.SampleGrad(samplerName, coord3, dpdx, dpdy)",
  117. "#define SAMPLE_TEXTURE3D_BIAS(textureName, samplerName, coord3, bias) textureName.SampleBias(samplerName, coord3, bias)",
  118. "#else//3D SRP MACROS",
  119. "#define SAMPLE_TEXTURE3D_GRAD(textureName, samplerName, coord3, dpdx, dpdy) SAMPLE_TEXTURE3D(textureName, samplerName, coord3)",
  120. "#define SAMPLE_TEXTURE3D_BIAS(textureName, samplerName, coord3, bias) SAMPLE_TEXTURE3D(textureName, samplerName, coord3)",
  121. "#endif//3D SRP MACROS\n"
  122. };
  123. public readonly static Dictionary<TextureType, string> TexDeclarationSRPMacros = new Dictionary<TextureType, string>
  124. {
  125. { TextureType.Texture2D,"TEXTURE2D({0}); SAMPLER(sampler{0});"},
  126. { TextureType.Texture3D,"TEXTURE3D({0}); SAMPLER(sampler{0});"},
  127. { TextureType.Cube,"TEXTURECUBE({0}); SAMPLER(sampler{0});"},
  128. { TextureType.Texture2DArray,"TEXTURE2D_ARRAY({0}); SAMPLER(sampler{0});"},
  129. };
  130. public readonly static Dictionary<TextureType, string> SamplerDeclarationSRPMacros = new Dictionary<TextureType, string>
  131. {
  132. { TextureType.Texture2D,"SAMPLER(sampler{0});"},
  133. { TextureType.Texture3D,"SAMPLER(sampler{0});"},
  134. { TextureType.Cube,"SAMPLER(sampler{0});"},
  135. { TextureType.Texture2DArray,"SAMPLER(sampler{0});"},
  136. };
  137. public readonly static Dictionary<TextureType, string> TexDeclarationNoSamplerSRPMacros = new Dictionary<TextureType, string>
  138. {
  139. { TextureType.Texture2D,"TEXTURE2D({0})"},
  140. { TextureType.Texture3D,"TEXTURE3D({0})"},
  141. { TextureType.Cube,"TEXTURECUBE({0})"},
  142. { TextureType.Texture2DArray,"TEXTURE2D_ARRAY({0})"},
  143. };
  144. public readonly static Dictionary<TextureType, string> TexSampleSRPMacros = new Dictionary<TextureType, string>
  145. {
  146. { TextureType.Texture2D,"SAMPLE_TEXTURE2D{0}( {1}, {2}, {3} )"},
  147. { TextureType.Texture3D,"SAMPLE_TEXTURE3D{0}( {1}, {2}, {3} )"},
  148. { TextureType.Cube,"SAMPLE_TEXTURECUBE{0}( {1}, {2}, {3} )"},
  149. { TextureType.Texture2DArray,"SAMPLE_TEXTURE2D_ARRAY{0}( {1}, {2}, {3} )"},
  150. };
  151. public readonly static Dictionary<TextureType, string> TexParams = new Dictionary<TextureType, string>
  152. {
  153. { TextureType.Texture2D,"ASE_TEXTURE2D_PARAMS({0})"},
  154. { TextureType.Texture3D,"ASE_TEXTURE3D_PARAMS({0})"},
  155. { TextureType.Cube,"ASE_TEXTURECUBE_PARAMS({0})"},
  156. { TextureType.Texture2DArray,"ASE_TEXTURE2D_ARRAY_PARAMS({0})"},
  157. };
  158. public readonly static Dictionary<WirePortDataType, TextureType> WireToTexture = new Dictionary<WirePortDataType, TextureType>
  159. {
  160. { WirePortDataType.SAMPLER1D,TextureType.Texture1D},
  161. { WirePortDataType.SAMPLER2D,TextureType.Texture2D},
  162. { WirePortDataType.SAMPLER3D,TextureType.Texture3D},
  163. { WirePortDataType.SAMPLERCUBE,TextureType.Cube},
  164. { WirePortDataType.SAMPLER2DARRAY,TextureType.Texture2DArray},
  165. };
  166. public readonly static Dictionary<TextureType, WirePortDataType> TextureToWire = new Dictionary<TextureType, WirePortDataType>
  167. {
  168. { TextureType.Texture1D,WirePortDataType.SAMPLER1D},
  169. { TextureType.Texture2D,WirePortDataType.SAMPLER2D},
  170. { TextureType.Texture3D, WirePortDataType.SAMPLER3D},
  171. { TextureType.Cube,WirePortDataType.SAMPLERCUBE},
  172. { TextureType.Texture2DArray,WirePortDataType.SAMPLER2DARRAY},
  173. { TextureType.ProceduralTexture,WirePortDataType.SAMPLER2D},
  174. };
  175. public readonly static string SamplingMacrosDirective = "#define ASE_USING_SAMPLING_MACROS 1";
  176. // STANDARD
  177. public readonly static string[] CustomASEStandarSamplingMacrosHelper =
  178. {
  179. "#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER))//ASE Sampler Macros",
  180. "#else//ASE Sampling Macros",
  181. "#endif//ASE Sampling Macros\n"
  182. };
  183. public readonly static string[] CustomASEArraySamplingMacrosRecent =
  184. {
  185. "#define UNITY_SAMPLE_TEX2DARRAY(tex,coord) tex.Sample(sampler##tex,coord)",
  186. "#define UNITY_SAMPLE_TEX2DARRAY_LOD(tex,coord,lod) tex.SampleLevel(sampler##tex,coord, lod)",
  187. "#define UNITY_SAMPLE_TEX2DARRAY_BIAS(tex,coord,bias) tex.SampleBias(sampler##tex,coord,bias)",
  188. "#define UNITY_SAMPLE_TEX2DARRAY_GRAD(tex,coord,ddx,ddy) tex.SampleGrad(sampler##tex,coord,ddx,ddy)",
  189. };
  190. public readonly static string[] CustomASEArraySamplingMacrosOlder =
  191. {
  192. "#define UNITY_SAMPLE_TEX2DARRAY(tex,coord) tex2DArray(tex,coord)",
  193. "#define UNITY_SAMPLE_TEX2DARRAY_LOD(tex,coord,lod) tex2DArraylod(tex, float4(coord,lod))",
  194. "#define UNITY_SAMPLE_TEX2DARRAY_BIAS(tex,coord,bias) tex2DArray(tex,coord)",
  195. "#define UNITY_SAMPLE_TEX2DARRAY_GRAD(tex,coord,ddx,ddy) tex2DArray(tex,coord)",
  196. };
  197. public readonly static string[] CustomASEStandarSamplingMacrosRecent =
  198. {
  199. "#define SAMPLE_TEXTURE2D(tex,samplerTex,coord) tex.Sample(samplerTex,coord)",
  200. "#define SAMPLE_TEXTURE2D_LOD(tex,samplerTex,coord,lod) tex.SampleLevel(samplerTex,coord, lod)",
  201. "#define SAMPLE_TEXTURE2D_BIAS(tex,samplerTex,coord,bias) tex.SampleBias(samplerTex,coord,bias)",
  202. "#define SAMPLE_TEXTURE2D_GRAD(tex,samplerTex,coord,ddx,ddy) tex.SampleGrad(samplerTex,coord,ddx,ddy)",
  203. "#define SAMPLE_TEXTURE3D(tex,samplerTex,coord) tex.Sample(samplerTex,coord)",
  204. "#define SAMPLE_TEXTURE3D_LOD(tex,samplerTex,coord,lod) tex.SampleLevel(samplerTex,coord, lod)",
  205. "#define SAMPLE_TEXTURE3D_BIAS(tex,samplerTex,coord,bias) tex.SampleBias(samplerTex,coord,bias)",
  206. "#define SAMPLE_TEXTURE3D_GRAD(tex,samplerTex,coord,ddx,ddy) tex.SampleGrad(samplerTex,coord,ddx,ddy)",
  207. "#define SAMPLE_TEXTURECUBE(tex,samplerTex,coord) tex.Sample(samplerTex,coord)",
  208. "#define SAMPLE_TEXTURECUBE_LOD(tex,samplerTex,coord,lod) tex.SampleLevel(samplerTex,coord, lod)",
  209. "#define SAMPLE_TEXTURECUBE_BIAS(tex,samplerTex,coord,bias) tex.SampleBias(samplerTex,coord,bias)",
  210. "#define SAMPLE_TEXTURECUBE_GRAD(tex,samplerTex,coord,ddx,ddy) tex.SampleGrad(samplerTex,coord,ddx,ddy)",
  211. "#define SAMPLE_TEXTURE2D_ARRAY(tex,samplerTex,coord) tex.Sample(samplerTex,coord)",
  212. "#define SAMPLE_TEXTURE2D_ARRAY_LOD(tex,samplerTex,coord,lod) tex.SampleLevel(samplerTex,coord, lod)",
  213. "#define SAMPLE_TEXTURE2D_ARRAY_BIAS(tex,samplerTex,coord,bias) tex.SampleBias(samplerTex,coord,bias)",
  214. "#define SAMPLE_TEXTURE2D_ARRAY_GRAD(tex,samplerTex,coord,ddx,ddy) tex.SampleGrad(samplerTex,coord,ddx,ddy)",
  215. };
  216. public readonly static string[] CustomASEStandarSamplingMacrosOlder =
  217. {
  218. "#define SAMPLE_TEXTURE2D(tex,samplerTex,coord) tex2D(tex,coord)",
  219. "#define SAMPLE_TEXTURE2D_LOD(tex,samplerTex,coord,lod) tex2Dlod(tex,float4(coord,0,lod))",
  220. "#define SAMPLE_TEXTURE2D_BIAS(tex,samplerTex,coord,bias) tex2Dbias(tex,float4(coord,0,bias))",
  221. "#define SAMPLE_TEXTURE2D_GRAD(tex,samplerTex,coord,ddx,ddy) tex2Dgrad(tex,coord,ddx,ddy)",
  222. "#define SAMPLE_TEXTURE3D(tex,samplerTex,coord) tex3D(tex,coord)",
  223. "#define SAMPLE_TEXTURE3D_LOD(tex,samplerTex,coord,lod) tex3Dlod(tex,float4(coord,lod))",
  224. "#define SAMPLE_TEXTURE3D_BIAS(tex,samplerTex,coord,bias) tex3D(tex,coord)",
  225. "#define SAMPLE_TEXTURE3D_GRAD(tex,samplerTex,coord,ddx,ddy) tex3D(tex,coord)",
  226. "#define SAMPLE_TEXTURECUBE(tex,samplertex,coord) texCUBE(tex,coord)",
  227. "#define SAMPLE_TEXTURECUBE_LOD(tex,samplertex,coord,lod) texCUBElod (tex,half4(coord,lod))",
  228. "#define SAMPLE_TEXTURECUBE_BIAS(tex,samplertex,coord,bias) texCUBE(tex,coord)",
  229. "#define SAMPLE_TEXTURECUBE_GRAD(tex,samplertex,coord,ddx,ddy) texCUBE(tex,coord)",
  230. "#define SAMPLE_TEXTURE2D_ARRAY(tex,samplertex,coord) tex2DArray(tex,coord)",
  231. "#define SAMPLE_TEXTURE2D_ARRAY_LOD(tex,samplertex,coord,lod) tex2DArraylod(tex, float4(coord,lod))",
  232. "#define SAMPLE_TEXTURE2D_ARRAY_BIAS(tex,samplerTex,coord,bias) tex2DArray(tex,coord)",
  233. "#define SAMPLE_TEXTURE2D_ARRAY_GRAD(tex,samplerTex,coord,ddx,ddy) tex2DArray(tex,coord)",
  234. };
  235. public readonly static string[] CustomArraySamplingMacros =
  236. {
  237. "#if defined(UNITY_COMPILER_HLSL2GLSL) || defined(SHADER_TARGET_SURFACE_ANALYSIS)//ASE Array Sampler Macros",
  238. "#define ASE_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) UNITY_SAMPLE_TEX2DARRAY (tex,coord)",
  239. "#else//ASE Array Sampler Macros",
  240. "#define ASE_SAMPLE_TEX2DARRAY_GRAD(tex,coord,dx,dy) tex.SampleGrad (sampler##tex,coord,dx,dy)",
  241. "#endif//ASE Array Sampler Macros\n"
  242. };
  243. public readonly static Dictionary<TextureType, string> TexDeclarationStandardMacros = new Dictionary<TextureType, string>
  244. {
  245. { TextureType.Texture2D,"UNITY_DECLARE_TEX2D({0});"},
  246. { TextureType.Texture3D,"UNITY_DECLARE_TEX3D({0});"},
  247. { TextureType.Cube,"UNITY_DECLARE_TEXCUBE({0});"},
  248. { TextureType.Texture2DArray,"UNITY_DECLARE_TEX2DARRAY({0});"}
  249. };
  250. public readonly static Dictionary<TextureType, string> TexDeclarationNoSamplerStandardMacros = new Dictionary<TextureType, string>
  251. {
  252. { TextureType.Texture2D,"UNITY_DECLARE_TEX2D_NOSAMPLER({0})"},
  253. { TextureType.Texture3D,"UNITY_DECLARE_TEX3D_NOSAMPLER({0})"},
  254. { TextureType.Cube,"UNITY_DECLARE_TEXCUBE_NOSAMPLER({0})"},
  255. { TextureType.Texture2DArray,"UNITY_DECLARE_TEX2DARRAY_NOSAMPLER({0})"}
  256. };
  257. public readonly static Dictionary<TextureType, string> TexSampleStandardMacros = new Dictionary<TextureType, string>
  258. {
  259. { TextureType.Texture2D,"UNITY_SAMPLE_TEX2D{0}( {1}, {3} )"},
  260. { TextureType.Texture3D,"UNITY_SAMPLE_TEX3D{0}( {1}, {3} )"},
  261. { TextureType.Cube,"UNITY_SAMPLE_TEXCUBE{0}( {1}, {3} )"},
  262. { TextureType.Texture2DArray,"UNITY_SAMPLE_TEX2DARRAY{0}( {1}, {3} )"}
  263. };
  264. public readonly static Dictionary<TextureType, string> TexSampleSamplerStandardMacros = new Dictionary<TextureType, string>
  265. {
  266. { TextureType.Texture2D,"SAMPLE_TEXTURE2D{0}( {1}, {2}, {3} )"},
  267. { TextureType.Texture3D,"SAMPLE_TEXTURE3D{0}( {1}, {2}, {3} )"},
  268. { TextureType.Cube,"SAMPLE_TEXTURECUBE{0}( {1}, {2}, {3} )"},
  269. { TextureType.Texture2DArray,"SAMPLE_TEXTURE2D_ARRAY{0}( {1}, {2}, {3} )"}
  270. };
  271. public readonly static Dictionary<TextureType, string> TexSampleStandard = new Dictionary<TextureType, string>
  272. {
  273. { TextureType.Texture2D,"tex2D{0}( {1}, {2} )"},
  274. { TextureType.Texture3D,"tex3D{0}( {1}, {2} )"},
  275. { TextureType.Cube,"texCUBE{0}( {1}, {2} )"},
  276. { TextureType.Texture2DArray,"tex2DArray{0}( {1}, {2} )"}
  277. };
  278. public readonly static char LineFeedSeparator = '$';
  279. public readonly static char SemiColonSeparator = '@';
  280. public readonly static string AppDataFullName = "appdata_full";
  281. public readonly static string CustomAppDataFullName = "appdata_full_custom";
  282. public readonly static string CustomAppDataFullBody =
  283. "\n\t\tstruct appdata_full_custom\n" +
  284. "\t\t{\n" +
  285. "\t\t\tfloat4 vertex : POSITION;\n" +
  286. "\t\t\tfloat4 tangent : TANGENT;\n" +
  287. "\t\t\tfloat3 normal : NORMAL;\n" +
  288. "\t\t\tfloat4 texcoord : TEXCOORD0;\n" +
  289. "\t\t\tfloat4 texcoord1 : TEXCOORD1;\n" +
  290. "\t\t\tfloat4 texcoord2 : TEXCOORD2;\n" +
  291. "\t\t\tfloat4 texcoord3 : TEXCOORD3;\n" +
  292. "\t\t\tfloat4 color : COLOR;\n" +
  293. "\t\t\tUNITY_VERTEX_INPUT_INSTANCE_ID\n";
  294. public readonly static string IncludeFormat = "#include \"{0}\"";
  295. public readonly static string PragmaFormat = "#pragma {0}";
  296. public readonly static string DefineFormat = "#define {0}";
  297. public readonly static string RenderTypeHelperStr = "RenderType";
  298. public readonly static string RenderQueueHelperStr = "Queue";
  299. public readonly static string DisableBatchingHelperStr = "DisableBatching";
  300. public readonly static string DefaultShaderName = "New Amplify Shader";
  301. public readonly static string UndoReplaceMasterNodeId = "Replacing Master Node";
  302. public readonly static string UnityLightingLib = "Lighting.cginc";
  303. public readonly static string UnityAutoLightLib = "AutoLight.cginc";
  304. public readonly static string UnityBRDFLib = "UnityStandardBRDF.cginc";
  305. public readonly static string LocalValueDecWithoutIdent = "{0} {1} = {2};";
  306. public readonly static string CustomTypeLocalValueDecWithoutIdent = "{0} {1} =({0}){2};";
  307. public readonly static string LocalValueDefWithoutIdent = "{0} {1} {2};";
  308. public readonly static string TilingOffsetFormat = "{0} * {1} + {2}";
  309. public static string InvalidPostProcessDatapath = "__DELETED_GUID_Trash";
  310. //TEMPLATES
  311. public static float PlusMinusButtonLayoutWidth = 15;
  312. public static float NodeButtonSizeX = 16;
  313. public static float NodeButtonSizeY = 16;
  314. public static float NodeButtonDeltaX = 5;
  315. public static float NodeButtonDeltaY = 11;
  316. public readonly static string SafeNormalizeInfoStr = "With Safe Normalize division by 0 is prevented over the normalize operation at the expense of additional instructions on shader.";
  317. public readonly static string ReservedPropertyNameStr = "Property name '{0}' is reserved and cannot be used";
  318. public readonly static string NumericPropertyNameStr = "Property name '{0}' is numeric thus cannot be used";
  319. public readonly static string DeprecatedMessageStr = "Node '{0}' is deprecated. Use node '{1}' instead.";
  320. public readonly static string DeprecatedNoAlternativeMessageStr = "Node '{0}' is deprecated and should be removed.";
  321. public readonly static string UndoChangePropertyTypeNodesId = "Changing Property Types";
  322. public readonly static string UndoChangeTypeNodesId = "Changing Nodes Types";
  323. public readonly static string UndoMoveNodesId = "Moving Nodes";
  324. public readonly static string UndoRegisterFullGrapId = "Register Graph";
  325. public readonly static string UndoAddNodeToCommentaryId = "Add node to Commentary";
  326. public readonly static string UndoRemoveNodeFromCommentaryId = "Remove node from Commentary";
  327. public readonly static string UndoCreateDynamicPortId = "Create Dynamic Port";
  328. public readonly static string UndoDeleteDynamicPortId = "Destroy Dynamic Port";
  329. public readonly static string UndoRegisterNodeId = "Register Object";
  330. public readonly static string UndoUnregisterNodeId = "Unregister Object";
  331. public readonly static string UndoCreateNodeId = "Create Object";
  332. public readonly static string UndoPasteNodeId = "Paste Object";
  333. public readonly static string UndoDeleteNodeId = "Destroy Object";
  334. public readonly static string UndoDeleteConnectionId = "Destroy Connection";
  335. public readonly static string UndoCreateConnectionId = "Create Connection";
  336. public readonly static float MenuDragSpeed = -0.5f;
  337. public readonly static string DefaultCustomInspector = "AmplifyShaderEditor.MaterialInspector";
  338. public readonly static string OldCustomInspector = "ASEMaterialInspector";
  339. public readonly static string ReferenceTypeStr = "Mode";
  340. public readonly static string AvailableReferenceStr = "Reference";
  341. public readonly static string InstancePostfixStr = " (Reference) ";
  342. public readonly static string ASEMenuName = "Amplify Shader";
  343. public readonly static string LodCrossFadeOption2017 = "dithercrossfade";
  344. public readonly static string UnityShaderVariables = "UnityShaderVariables.cginc";
  345. public readonly static string UnityCgLibFuncs = "UnityCG.cginc";
  346. public readonly static string UnityStandardUtilsLibFuncs = "UnityStandardUtils.cginc";
  347. public readonly static string UnityPBSLightingLib = "UnityPBSLighting.cginc";
  348. public readonly static string UnityDeferredLightLib = "UnityDeferredLibrary.cginc";
  349. public readonly static string ATSharedLibGUID = "ba242738c4be3324aa88d126f7cc19f9";
  350. public readonly static string CameraDepthTextureValue = "UNITY_DECLARE_DEPTH_TEXTURE( _CameraDepthTexture );";
  351. //public readonly static string CameraDepthTextureSRPVar = "TEXTURE2D(_CameraDepthTexture);";
  352. //public readonly static string CameraDepthTextureSRPSampler = "SAMPLER(sampler_CameraDepthTexture);";
  353. public readonly static string CameraDepthTextureLWEnabler = "REQUIRE_DEPTH_TEXTURE 1";
  354. public readonly static string CameraDepthTextureTexelSize = "uniform float4 _CameraDepthTexture_TexelSize;";
  355. public readonly static string InstanceIdMacro = "UNITY_VERTEX_INPUT_INSTANCE_ID";
  356. public readonly static string InstanceIdVariable = "UNITY_GET_INSTANCE_ID({0})";
  357. public readonly static string HelpURL = "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor";
  358. //public readonly static string NodeCommonUrl = "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Nodes#";
  359. //public readonly static string CommunityNodeCommonUrl = "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Community_Nodes#";
  360. public readonly static string NodeCommonUrl = "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/";
  361. public readonly static string CommunityNodeCommonUrl = "http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/";
  362. public readonly static Color InfiniteLoopColor = Color.red;
  363. public readonly static Color DefaultCategoryColor = new Color( 0.26f, 0.35f, 0.44f, 1.0f );
  364. public readonly static Color NodeBodyColor = new Color( 1f, 1f, 1f, 1.0f );
  365. public readonly static Color ModeTextColor = new Color( 1f, 1f, 1f, 0.25f );
  366. public readonly static Color ModeIconColor = new Color( 1f, 1f, 1f, 0.75f );
  367. public readonly static Color PortTextColor = new Color( 1f, 1f, 1f, 0.5f );
  368. public readonly static Color PortLockedTextColor = new Color( 1f, 1f, 1f, 0.35f );
  369. public readonly static Color BoxSelectionColor = new Color( 0.5f, 0.75f, 1f, 0.33f );
  370. public readonly static Color SpecialRegisterLocalVarSelectionColor = new Color( 0.27f, 0.52f, 1.0f, 1f );
  371. public readonly static Color SpecialGetLocalVarSelectionColor = new Color( 0.2f, 0.8f, 0.4f, 1f );
  372. public readonly static Color NodeSelectedColor = new Color( 0.85f, 0.56f, 0f, 1f );
  373. public readonly static Color NodeDefaultColor = new Color( 1f, 1f, 1f, 1f );
  374. public readonly static Color NodeConnectedColor = new Color( 1.0f, 1f, 0.0f, 1f );
  375. public readonly static Color NodeErrorColor = new Color( 1f, 0.5f, 0.5f, 1f );
  376. public readonly static string NoSpecifiedCategoryStr = "<None>";
  377. public readonly static int MINIMIZE_WINDOW_LOCK_SIZE = 630;
  378. public readonly static int FoldoutMouseId = 0; // Left Mouse Button
  379. public readonly static float SNAP_SQR_DIST = 200f;
  380. public readonly static int INVALID_NODE_ID = -1;
  381. public readonly static float WIRE_WIDTH = 7f;
  382. public readonly static float WIRE_CONTROL_POINT_DIST = 0.7f;
  383. public readonly static float WIRE_CONTROL_POINT_DIST_INV = 1.7f;
  384. public readonly static float IconsLeftRightMargin = 5f;
  385. public readonly static float PropertyPickerWidth = 16f;
  386. public readonly static float PropertyPickerHeight = 16f;
  387. public readonly static float PreviewExpanderWidth = 16f;
  388. public readonly static float PreviewExpanderHeight = 16f;
  389. public readonly static float TextFieldFontSize = 11f;
  390. public readonly static float DefaultFontSize = 14f;
  391. public readonly static float DefaultTitleFontSize = 12f;
  392. public readonly static float PropertiesTitleFontSize = 11f;
  393. public readonly static float MessageFontSize = 40f;
  394. public readonly static float SelectedObjectFontSize = 30f;
  395. public readonly static float PORT_X_ADJUST = 10;
  396. public readonly static float PORT_INITIAL_X = 10;
  397. public readonly static float PORT_INITIAL_Y = 41;
  398. public readonly static float INPUT_PORT_DELTA_Y = 7;
  399. public readonly static float PORT_TO_LABEL_SPACE_X = 4;
  400. public readonly static float NODE_HEADER_HEIGHT = 32;
  401. public readonly static float NODE_HEADER_EXTRA_HEIGHT = 0;
  402. public readonly static float NODE_HEADER_LEFTRIGHT_MARGIN = 10;
  403. public readonly static float MULTIPLE_SELECION_BOX_ALPHA = 0.5f;
  404. public readonly static float RMB_CLICK_DELTA_TIME = 0.1f;
  405. public readonly static float RMB_SCREEN_DIST = 10f;
  406. public readonly static float CAMERA_MAX_ZOOM = 2f;
  407. public readonly static float CAMERA_MIN_ZOOM = 1f;
  408. public readonly static float CAMERA_ZOOM_SPEED = 0.1f;
  409. public readonly static float ALT_CAMERA_ZOOM_SPEED = -0.05f;
  410. public readonly static object INVALID_VALUE = null;
  411. public readonly static float HORIZONTAL_TANGENT_SIZE = 100f;
  412. public readonly static float OUTSIDE_WIRE_MARGIN = 5f;
  413. public readonly static string SubTitleNameFormatStr = "Name( {0} )";
  414. public readonly static string SubTitleSpaceFormatStr = "Space( {0} )";
  415. public readonly static string SubTitleTypeFormatStr = "Type( {0} )";
  416. public readonly static string SubTitleModeFormatStr = "Mode( {0} )";
  417. public readonly static string SubTitleValueFormatStr = "Value( {0} )";
  418. public readonly static string SubTitleConstFormatStr = "Const( {0} )";
  419. public readonly static string SubTitleVarNameFormatStr = "Var( {0} )";
  420. public readonly static string SubTitleRefNameFormatStr = "Ref( {0} )";
  421. public readonly static string SubTitleCurrentFormatStr = "Current( {0} )";
  422. public readonly static string CodeWrapper = "( {0} )";
  423. public readonly static string InlineCodeWrapper = "{{\n{0}\n}}";
  424. public readonly static string NodesDumpFormat = "{0}:,{1},{2}\n";
  425. public readonly static string TagFormat = " \"{0}\" = \"{1}\"";
  426. public readonly static string LocalVarIdentation = "\t\t\t";
  427. public readonly static string SimpleLocalValueDec = LocalVarIdentation + "{0} {1};\n";
  428. public readonly static string LocalValueDec = LocalVarIdentation + LocalValueDecWithoutIdent + '\n';
  429. public readonly static string LocalValueDef = LocalVarIdentation + "{0} = {1};\n";
  430. public readonly static string CastHelper = "({0}).{1}";
  431. public readonly static string PropertyLocalVarDec = "{0} {1} = {0}({2});";
  432. public readonly static string[] UniformDec = { "uniform {0} {1};", "{0} {1};" };
  433. public readonly static string PropertyValueLabel = "Value( {0} )";
  434. public readonly static string ConstantsValueLabel = "Const( {0} )";
  435. public readonly static string PropertyFloatFormatLabel = "0.###";
  436. public readonly static string PropertyBigFloatFormatLabel = "0.###e+0";
  437. public readonly static string PropertyIntFormatLabel = "0";
  438. public readonly static string PropertyBigIntFormatLabel = "0e+0";
  439. public readonly static string PropertyVectorFormatLabel = "0.##";
  440. public readonly static string PropertyBigVectorFormatLabel = "0.##e+0";
  441. public readonly static string PropertyMatrixFormatLabel = "0.#";
  442. public readonly static string PropertyBigMatrixFormatLabel = "0.#e+0";
  443. public readonly static string NoPropertiesLabel = "No assigned properties";
  444. public readonly static string ValueLabel = "Value";
  445. public readonly static string DefaultValueLabel = "Default Value";
  446. public readonly static string MaterialValueLabel = "Material Value";
  447. public readonly static GUIContent DefaultValueLabelContent = new GUIContent( "Default Value" );
  448. public readonly static GUIContent MaterialValueLabelContent = new GUIContent( "Material Value" );
  449. public readonly static string InputVarStr = "i";//"input";
  450. public readonly static string OutputVarStr = "o";//"output";
  451. public readonly static string CustomLightOutputVarStr = "s";
  452. public readonly static string CustomLightStructStr = "Custom";
  453. public readonly static string VertexShaderOutputStr = "o";
  454. public readonly static string VertexShaderInputStr = "v";//"vertexData";
  455. public readonly static string VertexDataFunc = "vertexDataFunc";
  456. public readonly static string VirtualCoordNameStr = "vcoord";
  457. public readonly static string VertexVecNameStr = "vertexVec";
  458. public readonly static string VertexVecDecStr = "float3 " + VertexVecNameStr;
  459. public readonly static string VertexVecVertStr = VertexShaderOutputStr + "." + VertexVecNameStr;
  460. public readonly static string NormalVecNameStr = "normalVec";
  461. public readonly static string NormalVecDecStr = "float3 " + NormalVecNameStr;
  462. public readonly static string NormalVecFragStr = InputVarStr + "." + NormalVecNameStr;
  463. public readonly static string NormalVecVertStr = VertexShaderOutputStr + "." + NormalVecNameStr;
  464. public readonly static string IncidentVecNameStr = "incidentVec";
  465. public readonly static string IncidentVecDecStr = "float3 " + IncidentVecNameStr;
  466. public readonly static string IncidentVecDefStr = VertexShaderOutputStr + "." + IncidentVecNameStr + " = normalize( " + VertexVecNameStr + " - _WorldSpaceCameraPos.xyz)";
  467. public readonly static string IncidentVecFragStr = InputVarStr + "." + IncidentVecNameStr;
  468. public readonly static string IncidentVecVertStr = VertexShaderOutputStr + "." + IncidentVecNameStr;
  469. public readonly static string WorldNormalLocalDecStr = "WorldNormalVector( " + Constants.InputVarStr + " , {0}( 0,0,1 ))";
  470. public readonly static string IsFrontFacingVariable = "ASEIsFrontFacing";
  471. public readonly static string IsFrontFacingInput = "half ASEIsFrontFacing : SV_IsFrontFacing";
  472. public readonly static string IsFrontFacingInputVFACE = "half ASEIsFrontFacing : VFACE";
  473. public readonly static string ColorVariable = "vertexColor";
  474. public readonly static string ColorInput = "float4 vertexColor : COLOR";
  475. public readonly static string NoStringValue = "None";
  476. public readonly static string EmptyPortValue = " ";
  477. public readonly static string[] OverallInvalidChars = { "\r", "\n", "\\", " ", ".", ">", ",", "<", "\'", "\"", ";", ":", "[", "{", "]", "}","|", "=", "+", "`", "~", "/", "?", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-" };
  478. public readonly static string[] RegisterInvalidChars = { "\r", "\n", "\\", ".", ">", ",", "<", "\'", "\"", ";", ":", "[", "{", "]", "}", "|", "=", "+", "`", "~", "?", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-" };
  479. public readonly static string[] ShaderInvalidChars = { "\r", "\n", "\\", "\'", "\"", };
  480. public readonly static string[] EnumInvalidChars = { "\r", "\n", "\\", ".", ">", ",", "<", "\'", "\"", ";", ":", "[", "{", "]", "}", "=", "+", "`", "~", "/", "?", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-" };
  481. public readonly static string[] AttrInvalidChars = { "\r", "\n", "\\", ">", "<", "\'", "\"", ";", ":", "[", "{", "]", "}", "=", "+", "`", "~", "/", "?", "!", "@", "#", "$", "%", "^", "&", "*" };
  482. public readonly static string[] HeaderInvalidChars = { "\r", "\n", "\\", ">", ",", "<", "\'", "\"", ";", ":", "[", "{", "]", "}", "=", "+", "`", "~", "/", "?", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-" };
  483. public readonly static string[] WikiInvalidChars = { "#", "<", ">", "[", "]", "|", "{", "}", "%", "+", "?", "\\", "/", ",", ";", "." };
  484. public readonly static string[,] UrlReplacementStringValues =
  485. {
  486. { " = ", "Equals" },
  487. { " == ", "Equals" },
  488. { " != ", "NotEqual" },
  489. { " \u2260 ", "NotEqual" },
  490. { " > ", "Greater" },
  491. { " \u2265 " , "GreaterOrEqual" },
  492. { " >= ", "GreaterOrEqual" },
  493. { " < ", "Less" },
  494. { " \u2264 ", "LessOrEqual" },
  495. { " <= ", "LessOrEqual" },
  496. { " ", "_" },
  497. { "[", string.Empty },
  498. { "]", string.Empty }
  499. };
  500. public readonly static int UrlReplacementStringValuesLen = UrlReplacementStringValues.Length / 2;
  501. public readonly static string[,] ReplacementStringValues =
  502. {
  503. { " = ", "Equals" },
  504. { " == ", "Equals" },
  505. { " != ", "NotEqual" },
  506. { " \u2260 ", "NotEqual" },
  507. { " > ", "Greater" },
  508. { " \u2265 ", "GreaterOrEqual" },
  509. { " >= ", "GreaterOrEqual" },
  510. { " < ", "Less" },
  511. { " \u2264 ", "LessOrEqual" },
  512. { " <= ", "LessOrEqual" }
  513. };
  514. public readonly static int ReplacementStringValuesLen = ReplacementStringValues.Length / 2;
  515. public readonly static string InternalData = "INTERNAL_DATA";
  516. public readonly static string NoMaterialStr = "None";
  517. public readonly static string OptionalParametersSep = " ";
  518. public readonly static string NodeUndoId = "NODE_UNDO_ID";
  519. public readonly static string NodeCreateUndoId = "NODE_CREATE_UNDO_ID";
  520. public readonly static string NodeDestroyUndoId = "NODE_DESTROY_UNDO_ID";
  521. // Custom node tags
  522. //[InPortBegin:Id:Type:Name:InPortEnd]
  523. public readonly static string CNIP = "#IP";
  524. public readonly static float FLOAT_DRAW_HEIGHT_FIELD_SIZE = 16f;
  525. public readonly static float FLOAT_DRAW_WIDTH_FIELD_SIZE = 45f;
  526. public readonly static float FLOAT_WIDTH_SPACING = 3f;
  527. public readonly static Color LockedPortColor = new Color( 0.3f, 0.3f, 0.3f, 0.5f );
  528. public readonly static int[] AvailableUVChannels = { 0, 1, 2, 3, 4, 5, 6, 7 };
  529. public readonly static string[] AvailableUVChannelsStr = { "0", "1", "2", "3", "4", "5", "6", "7"};
  530. public readonly static string AvailableUVChannelLabel = "UV Channel";
  531. public readonly static int[] AvailableUVSets = { 0, 1, 2, 3, 4, 5, 6, 7 };
  532. public readonly static string[] AvailableUVSetsStr = { "0", "1", "2", "3","4", "5", "6", "7" };
  533. public readonly static string AvailableUVSetsLabel = "UV Set";
  534. public readonly static int[] AvailableUVSizes = { 2, 3, 4 };
  535. public readonly static string[] AvailableUVSizesStr = { "Float 2", "Float 3", "Float 4" };
  536. public readonly static string AvailableUVSizesLabel = "Coord Size";
  537. public readonly static string LineSeparator = "________________________________";
  538. public readonly static Vector2 CopyPasteDeltaPos = new Vector2( 40, 40 );
  539. public readonly static string[] VectorSuffixes = { ".x", ".y", ".z", ".w" };
  540. public readonly static string[] ColorSuffixes = { ".r", ".g", ".b", ".a" };
  541. public const string InternalDataLabelStr = "Internal Data";
  542. public const string AttributesLaberStr = "Attributes";
  543. public const string ParameterLabelStr = "Parameters";
  544. public static readonly string[] ReferenceArrayLabels = { "Object", "Reference" };
  545. public static readonly string[] ChannelNamesVector = { "X", "Y", "Z", "W" };
  546. public static readonly string[] ChannelNamesColor = { "R", "G", "B", "A" };
  547. public static readonly string SamplerFormat = "sampler{0}";
  548. public static readonly string SamplerDeclFormat = "SamplerState {0}";
  549. public static readonly string SamplerDeclSRPFormat = "SAMPLER({0})";
  550. }
  551. }