Guest User

AL_Object.fxsub edit (save in text editor as CP932/Shift-JIS)

a guest
May 19th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.05 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // 発光部位描画エフェクト for AutoLuminous
  4. // Ver.4.2
  5. //
  6. ////////////////////////////////////////////////////////////////////////////////////////////////
  7.  
  8. //#define USE_AL_CODE
  9. //PERFORMANCE (for MWF_ObjectEmit): No difference. With AL code, 22 fps; without AL code, 22 fps; with default shader, 22 fps. But without AL code compiles ~4 times faster.
  10. //Under test condition 2, one CPU at 1.6 GHz (and zoomed in a bit), AL code is 44 fps, no AL code is 51 fps. (default shader 31 fps.)
  11. //Condition 3, maximized window, no code is 39.5 fps, code is 34.5 fps, default is 23 fps.
  12.  
  13. //異方性フィルタリング作業用テクスチャサイズ
  14. // 0で無効化 (MMDx64では0推奨)
  15. #define MIPMAPTEX_SIZE 0 //512
  16.  
  17. //発光部分を少し前面に押し出す
  18. // 0で無効、1で有効
  19. #define POPUP_LIGHT 0
  20.  
  21. //テクスチャ高輝度識別フラグ
  22. //#define TEXTURE_SELECTLIGHT
  23.  
  24. //テクスチャ高輝度識別閾値
  25. float LightThreshold = 0.9; //was 0.9
  26.  
  27. //フレーム数に同期させるかどうか
  28. #define SYNC false
  29.  
  30.  
  31. ////////////////////////////////////////////////////////////////////////////////////////////////
  32. //Clone連携機能
  33.  
  34. //Cloneのパラメータ読み込み指定
  35. #define CLONE_PARAMINCLUDE
  36.  
  37. //以下のコメントアウトを外し、クローンエフェクトファイル名を指定
  38. //include "Clone.fx"
  39.  
  40. //ダミー変数・関数宣言
  41. #ifndef CLONE_MIPMAPTEX_SIZE
  42. int CloneIndex = 0; //ループ変数
  43. int CloneCount = 1; //複製数
  44. float4 ClonePos(float4 Pos) { return Pos; }
  45. #endif
  46.  
  47. ////////////////////////////////////////////////////////////////////////////////////////////////
  48.  
  49.  
  50. #define SPECULAR_BASE 100
  51.  
  52.  
  53.  
  54. bool use_toon; //トゥーンの有無
  55.  
  56.  
  57. // マテリアル色
  58. float4 MaterialDiffuse : DIFFUSE < string Object = "Geometry"; >;
  59. float3 MaterialAmbient : AMBIENT < string Object = "Geometry"; >;
  60. float3 MaterialEmissive : EMISSIVE < string Object = "Geometry"; >;
  61. float3 MaterialSpecular : SPECULAR < string Object = "Geometry"; >;
  62.  
  63. #ifdef MIKUMIKUMOVING
  64. float SpecularPower : SPECULARPOWER < string Object = "Geometry"; >;
  65. static float materialAlpha = MaterialDiffuse.a;
  66. #else
  67. float4 EgColor; // ... how does this do anything
  68. float4 SpcColor;
  69. static float SpecularPower = SpcColor.a;
  70. static float materialAlpha = EgColor.a;
  71. #endif
  72.  
  73. // 座法変換行列
  74. float4x4 WorldViewProjMatrix : WORLDVIEWPROJECTION;
  75. //float4x4 WorldMatrix : WORLD;
  76. //float4x4 ViewMatrix : VIEW;
  77. float4x4 LightWorldViewProjMatrix : WORLDVIEWPROJECTION < string Object = "Light"; >;
  78.  
  79.  
  80. float3 CameraDirection : DIRECTION < string Object = "Camera"; >;
  81.  
  82. #define PI 3.14159
  83.  
  84. float LightUp : CONTROLOBJECT < string name = "(self)"; string item = "LightUp"; >;
  85. float LightUpE : CONTROLOBJECT < string name = "(self)"; string item = "LightUpE"; >;
  86. float LightOff : CONTROLOBJECT < string name = "(self)"; string item = "LightOff"; >;
  87. float Blink : CONTROLOBJECT < string name = "(self)"; string item = "LightBlink"; >;
  88. float BlinkSq : CONTROLOBJECT < string name = "(self)"; string item = "LightBS"; >;
  89. float BlinkDuty : CONTROLOBJECT < string name = "(self)"; string item = "LightDuty"; >;
  90. float BlinkMin : CONTROLOBJECT < string name = "(self)"; string item = "LightMin"; >;
  91. float LClockUp : CONTROLOBJECT < string name = "(self)"; string item = "LClockUp"; >;
  92. float LClockDown : CONTROLOBJECT < string name = "(self)"; string item = "LClockDown"; >;
  93.  
  94. //時間
  95. float ftime : TIME <bool SyncInEditMode = SYNC;>;
  96.  
  97. static float duty = (BlinkDuty <= 0) ? 0.5 : BlinkDuty;
  98. static float timerate = ((Blink > 0) ? ((1 - cos(saturate(frac(ftime / (Blink * 10)) / (duty * 2)) * 2 * PI)) * 0.5) : 1.0)
  99. * ((BlinkSq > 0) ? (frac(ftime / (BlinkSq * 10)) < duty) : 1.0);
  100. static float timerate1 = timerate * (1 - BlinkMin) + BlinkMin;
  101.  
  102. static float ClockShift = (1 + LClockDown * 5) / (1 + LClockUp * 5);
  103.  
  104. static bool IsEmission = (SPECULAR_BASE < SpecularPower)/* && (SpecularPower <= (SPECULAR_BASE + 100))*/ && (length(MaterialSpecular) < 0.01);
  105. static float EmissionPower0 = IsEmission ? ((SpecularPower - SPECULAR_BASE) / 7.0) : 1;
  106. static float EmissionPower1 = EmissionPower0 * (LightUp * 2 + 1.0) * pow(400, LightUpE) * (1.0 - LightOff);
  107.  
  108.  
  109. sampler MMDSamp0 : register(s0);
  110. sampler MMDSamp1 : register(s1);
  111. sampler MMDSamp2 : register(s2);
  112.  
  113.  
  114. // レンダリングターゲットのクリア値
  115. float4 ClearColor = {0,0,0,0};
  116. float ClearDepth = 1.0;
  117.  
  118.  
  119. #if MIPMAPTEX_SIZE==0
  120. #define DRAWSCRIPT "RenderColorTarget0=;" \
  121. "RenderDepthStencilTarget=;" \
  122. "LoopByCount=CloneCount;" \
  123. "LoopGetIndex=CloneIndex;" \
  124. "Pass=DrawObject;" \
  125. "LoopEnd=;"
  126.  
  127. #define MIPMAPSCRIPT "RenderColorTarget0=;" \
  128. "RenderDepthStencilTarget=;" \
  129. "LoopByCount=CloneCount;" \
  130. "LoopGetIndex=CloneIndex;" \
  131. "Pass=DrawObject;" \
  132. "LoopEnd=;"
  133.  
  134. #define CREATEMIPMAP
  135.  
  136. // オブジェクトのテクスチャ
  137. texture ObjectTexture: MATERIALTEXTURE;
  138. sampler ObjTexSampler = sampler_state {
  139. texture = <ObjectTexture>;
  140. MINFILTER = ANISOTROPIC;
  141. MAGFILTER = ANISOTROPIC;
  142. //MINFILTER = LINEAR;
  143. //MAGFILTER = LINEAR;
  144. MIPFILTER = LINEAR;
  145. MAXANISOTROPY = 16;
  146. };
  147.  
  148. #else
  149. #define DRAWSCRIPT "RenderColorTarget0=;" \
  150. "RenderDepthStencilTarget=;" \
  151. "LoopByCount=CloneCount;" \
  152. "LoopGetIndex=CloneIndex;" \
  153. "Pass=DrawObject;" \
  154. "LoopEnd=;"
  155.  
  156. #define MIPMAPSCRIPT "RenderColorTarget0=UseMipmapObjectTexture;" \
  157. "RenderDepthStencilTarget=MipDepthBuffer;" \
  158. "ClearSetColor=ClearColor; Clear=Color;" \
  159. "ClearSetDepth=ClearDepth; Clear=Depth;" \
  160. "Pass=CreateMipmap;" \
  161. "RenderColorTarget0=;" \
  162. "RenderDepthStencilTarget=;" \
  163. "LoopByCount=CloneCount;" \
  164. "LoopGetIndex=CloneIndex;" \
  165. "Pass=DrawObject;" \
  166. "LoopEnd=;"
  167.  
  168. #define CREATEMIPMAP pass CreateMipmap < string Script= "Draw=Buffer;"; > { \
  169. AlphaBlendEnable = FALSE; \
  170. ZEnable = FALSE; \
  171. VertexShader = compile vs_3_0 VS_MipMapCreater(); \
  172. PixelShader = compile ps_3_0 PS_MipMapCreater(); \
  173. }
  174.  
  175. // オブジェクトのテクスチャ
  176. texture ObjectTexture: MATERIALTEXTURE<
  177. int MipLevels = 0;
  178. >;
  179. sampler DefObjTexSampler = sampler_state {
  180. texture = <ObjectTexture>;
  181. MINFILTER = LINEAR;
  182. MAGFILTER = LINEAR;
  183. };
  184.  
  185. texture2D MipDepthBuffer : RenderDepthStencilTarget <
  186. int Width = MIPMAPTEX_SIZE;
  187. int Height = MIPMAPTEX_SIZE;
  188. string Format = "D24S8";
  189. >;
  190. texture UseMipmapObjectTexture : RENDERCOLORTARGET <
  191. int Width = MIPMAPTEX_SIZE;
  192. int Height = MIPMAPTEX_SIZE;
  193. int MipLevels = 0;
  194. string Format = "A8R8G8B8" ;
  195. >;
  196. sampler ObjTexSampler = sampler_state {
  197. texture = <UseMipmapObjectTexture>;
  198. MINFILTER = ANISOTROPIC;
  199. MAGFILTER = ANISOTROPIC;
  200. MIPFILTER = LINEAR;
  201. MAXANISOTROPY = 16;
  202. };
  203.  
  204. // テクセル位置のオフセット
  205. static float2 MipTexOffset = (float2(0.5,0.5)/MIPMAPTEX_SIZE);
  206.  
  207. #endif
  208.  
  209.  
  210. // スフィアマップのテクスチャ
  211. texture ObjectSphereMap: MATERIALSPHEREMAP;
  212. sampler ObjSphareSampler = sampler_state {
  213. texture = <ObjectSphereMap>;
  214. MINFILTER = POINT;
  215. MAGFILTER = POINT;
  216. MIPFILTER = NONE;
  217. AddressU = CLAMP;
  218. AddressV = CLAMP;
  219. };
  220. sampler ObjSphareSampler2 = sampler_state {
  221. texture = <ObjectSphereMap>;
  222. MINFILTER = LINEAR;
  223. MAGFILTER = LINEAR;
  224. MIPFILTER = NONE;
  225. AddressU = CLAMP;
  226. AddressV = CLAMP;
  227. };
  228.  
  229. ////////////////////////////////////////////////////////////////////////////////////////////////
  230. //MMM対応
  231.  
  232. #ifdef MIKUMIKUMOVING
  233.  
  234. #define GETPOS MMM_SkinnedPosition(IN.Pos, IN.BlendWeight, IN.BlendIndices, IN.SdefC, IN.SdefR0, IN.SdefR1)
  235.  
  236. #else
  237.  
  238. struct MMM_SKINNING_INPUT{
  239. float4 Pos : POSITION;
  240. float2 Tex : TEXCOORD0;
  241. float4 AddUV1 : TEXCOORD1;
  242. float4 AddUV2 : TEXCOORD2;
  243. float4 AddUV3 : TEXCOORD3;
  244. float4 Normal : NORMAL;
  245.  
  246. };
  247.  
  248. #define GETPOS (IN.Pos)
  249.  
  250. #endif
  251.  
  252. ////////////////////////////////////////////////////////////////////////////////////////////////
  253. // ミップマップ作成
  254.  
  255. #if MIPMAPTEX_SIZE!=0
  256. struct VS_OUTPUT_MIPMAPCREATER {
  257. float4 Pos : POSITION;
  258. float2 Tex : TEXCOORD0;
  259. };
  260. VS_OUTPUT_MIPMAPCREATER VS_MipMapCreater( float4 Pos : POSITION, float4 Tex : TEXCOORD0 ){
  261. VS_OUTPUT_MIPMAPCREATER Out;
  262. Out.Pos = Pos;
  263. Out.Tex = Tex + MipTexOffset;
  264. return Out;
  265. }
  266.  
  267. float4 PS_MipMapCreater(float2 Tex: TEXCOORD0) : COLOR0
  268. {
  269. return tex2D(DefObjTexSampler,Tex);
  270. }
  271.  
  272. #endif
  273.  
  274. ///////////////////////////////////////////////////////////////////////////////////////////////
  275.  
  276. float texlight(float3 rgb){
  277. float val = saturate((length(rgb) - LightThreshold) * 3);
  278.  
  279. val *= 0.2;
  280.  
  281. return val;
  282. }
  283.  
  284. ///////////////////////////////////////////////////////////////////////////////////////////////
  285.  
  286. float3 HSV_to_RGB(float3 hsv){
  287. float H = frac(hsv.x);
  288. float S = hsv.y;
  289. float V = hsv.z;
  290.  
  291. float3 Color = 0;
  292.  
  293. float Hp3 = H * 6.0;
  294. float h = floor(Hp3);
  295. float P = V * (1 - S);
  296. float Q = V * (1 - S * (Hp3 - h));
  297. float T = V * (1 - S * (1 - (Hp3 - h)));
  298.  
  299. /*if(h <= 0.01) { Color.rgb = float3(V, T, P); }
  300. else if(h <= 1.01) { Color.rgb = float3(Q, V, P); }
  301. else if(h <= 2.01) { Color.rgb = float3(P, V, T); }
  302. else if(h <= 3.01) { Color.rgb = float3(P, Q, V); }
  303. else if(h <= 4.01) { Color.rgb = float3(T, P, V); }
  304. else { Color.rgb = float3(V, P, Q); }*/
  305.  
  306. Color.rgb += float3(V, T, P) * max(0, 1 - abs(h - 0));
  307. Color.rgb += float3(Q, V, P) * max(0, 1 - abs(h - 1));
  308. Color.rgb += float3(P, V, T) * max(0, 1 - abs(h - 2));
  309. Color.rgb += float3(P, Q, V) * max(0, 1 - abs(h - 3));
  310. Color.rgb += float3(T, P, V) * max(0, 1 - abs(h - 4));
  311. Color.rgb += float3(V, P, Q) * max(0, 1 - abs(h - 5));
  312.  
  313. return Color;
  314. }
  315.  
  316. ///////////////////////////////////////////////////////////////////////////////////////////////
  317. // 追加UVがAL用データかどうか判別
  318.  
  319. bool DecisionSystemCode(float4 SystemCode){
  320. bool val = (0.199 < SystemCode.r) && (SystemCode.r < 0.201)
  321. && (0.699 < SystemCode.g) && (SystemCode.g < 0.701);
  322. return val;
  323. }
  324.  
  325.  
  326. float4 getFlags(float flagcode){
  327. float4 val = frac(flagcode * float4(0.1, 0.01, 0.001, 0.0001));
  328. val = floor(val * 10 + 0.001);
  329. return val;
  330. }
  331.  
  332.  
  333. float2 DecisionSequenceCode(float4 color){
  334. bool val = (color.r > 0.99) && (abs(color.g - 0.5) < 0.02)
  335. && ((color.b < 0.01) || (color.g > 0.99));
  336.  
  337. return float2(val, (color.b < 0.01));
  338. }
  339.  
  340. ///////////////////////////////////////////////////////////////////////////////////////////////
  341. // オブジェクト描画
  342.  
  343. struct VS_OUTPUT {
  344. float4 Pos : POSITION; // 射影変換座標
  345. float4 Color : TEXCOORD0; // 色
  346. float4 Tex : TEXCOORD1; // UV
  347. };
  348.  
  349.  
  350. // 頂点シェーダ
  351. VS_OUTPUT Basic_VS(MMM_SKINNING_INPUT IN)
  352. {
  353. VS_OUTPUT Out = (VS_OUTPUT)0;
  354.  
  355. #ifdef USE_AL_CODE
  356. float4 SystemCode = IN.AddUV1;
  357. float4 ColorCode = IN.AddUV2;
  358. float4 AppendCode = IN.AddUV3;
  359.  
  360. bool IsALCode = DecisionSystemCode(SystemCode);
  361. float4 flags = getFlags(SystemCode.w);
  362. #endif
  363.  
  364. // カメラ視点のワールドビュー射影変換
  365. float4 pos = GETPOS; //位置取得
  366. pos = ClonePos(pos);
  367.  
  368. #ifdef USE_AL_CODE
  369. pos.xyz += IsALCode * AppendCode.z * IN.Normal.xyz;
  370. #endif
  371.  
  372. Out.Pos = mul( pos, WorldViewProjMatrix );
  373.  
  374. Out.Color = MaterialDiffuse;
  375. Out.Color.a = materialAlpha;
  376. Out.Color.rgb += MaterialEmissive / 2;
  377. Out.Color.rgb *= 0.5;
  378. Out.Color.rgb = IsEmission ? Out.Color.rgb : float3(0,0,0);
  379.  
  380. #ifdef USE_AL_CODE
  381. // 頂点発光 ////////////////////////
  382.  
  383. float3 UVColor = ColorCode.rgb;
  384. UVColor = lerp(UVColor, HSV_to_RGB(UVColor), flags.y);
  385. UVColor *= ColorCode.a;
  386.  
  387. Out.Color.rgb += IsALCode ? UVColor : float3(0,0,0);
  388.  
  389. float Tv = SystemCode.z * ClockShift;
  390. float Ph = AppendCode.y * ClockShift;
  391. float timerate2 = (Tv > 0) ? ((1 - cos(saturate(frac((ftime + Ph) / Tv) / (duty * 2)) * 2 * PI)) * 0.5)
  392. : ((Tv < 0) ? (frac((ftime + Ph) / (-Tv / PI * 180)) < duty) : 1.0);
  393. Out.Color.rgb *= max(timerate2 * (1 - BlinkMin) + BlinkMin, !IsALCode);
  394. Out.Color.rgb *= max(timerate1, SystemCode.z != 0);
  395. #else
  396. Out.Color.rgb *= timerate1;
  397. #endif
  398.  
  399. ////////////////////////
  400.  
  401. Out.Tex.xy = IN.Tex; //テクスチャUV
  402. #ifdef USE_AL_CODE
  403. Out.Tex.z = IsALCode * AppendCode.x;
  404. Out.Tex.w = IsALCode * flags.x;
  405. #endif
  406.  
  407. #if POPUP_LIGHT
  408. Out.Pos.z -= 0.01 * saturate(length(Out.Color.rgb));
  409. #endif
  410.  
  411. return Out;
  412. }
  413.  
  414. ///////////////////////////////////////////////////////////////////////////////////////////////
  415.  
  416. // ピクセルシェーダ
  417. float4 Basic_PS(VS_OUTPUT IN, uniform bool useTexture, uniform bool useSphereMap) : COLOR0
  418. {
  419. float4 Color = IN.Color;
  420. float4 texcolor;
  421.  
  422.  
  423. #ifdef USE_AL_CODE
  424. // 発光シーケンス ////////////////////////
  425.  
  426. if(useSphereMap){
  427. //float4 spcolor1 = tex2Dlod(ObjSphareSampler, float4(1,0,0,0));
  428. float4 spcolor2 = tex2Dlod(ObjSphareSampler, float4(1,1,0,0));
  429.  
  430. float4 spcolor3 = tex2Dlod(ObjSphareSampler, float4(0,1,0,0));
  431.  
  432. float Ts = spcolor3.r * (255 * 60) + spcolor3.g * 255 + spcolor3.b * (255 / 100.0);
  433. Ts *= ClockShift;
  434.  
  435. float t1 = frac((ftime/* + Ph * IsALCode*/) / Ts);
  436. float4 spcolor4 = tex2Dlod(ObjSphareSampler, float4(t1 * 0.25,0,0,0));
  437. float4 spcolor5 = tex2Dlod(ObjSphareSampler2, float4(t1 * 0.25,0,0,0));
  438.  
  439. float2 sel = DecisionSequenceCode(spcolor2);
  440.  
  441. Color.rgb *= lerp(float3(1,1,1), lerp(spcolor5.rgb, spcolor4.rgb, sel.y), sel.x);
  442.  
  443. }
  444. #endif
  445.  
  446.  
  447. if(useTexture){
  448.  
  449. texcolor = tex2D(ObjTexSampler,IN.Tex.xy);
  450. #ifdef USE_AL_CODE
  451. texcolor.rgb = saturate(texcolor.rgb - IN.Tex.z);
  452. #endif
  453.  
  454. #ifdef TEXTURE_SELECTLIGHT
  455. Color = texcolor;
  456. Color.rgb *= texlight(Color.rgb);
  457. #else
  458. #ifdef USE_AL_CODE
  459. float4 Color2, Color3;
  460.  
  461. Color2 = Color * texcolor;
  462. Color3 = Color * texcolor;
  463. Color3.rgb *= texlight(texcolor.rgb);
  464.  
  465. Color = (IN.Tex.w < 0.1) ? Color2 : ((IN.Tex.w < 1.1) ? Color : Color3);
  466. #else
  467. Color *= texcolor;
  468. #endif //USE_AL_CODE
  469.  
  470. #endif //TEXTURE_SELECTLIGHT
  471.  
  472. }
  473.  
  474. //Color.rgb *= lerp(EmissionPower0, EmissionPower1, (float)use_toon);
  475. Color.rgb *= use_toon ? EmissionPower1 : EmissionPower0;
  476.  
  477. return Color;
  478. }
  479.  
  480. ///////////////////////////////////////////////////////////////////////////////////////////////
  481.  
  482. // オブジェクト描画用テクニック
  483.  
  484. #ifdef USE_AL_CODE
  485. #define SPHERE bool UseSphereMap = false;
  486. #else
  487. #define SPHERE
  488. #endif
  489.  
  490. technique MainTec1 < string MMDPass = "object"; bool UseTexture = false; SPHERE
  491. string Script = DRAWSCRIPT;
  492. > {
  493. pass DrawObject {
  494. VertexShader = compile vs_3_0 Basic_VS();
  495. PixelShader = compile ps_3_0 Basic_PS(false, false);
  496. }
  497. }
  498.  
  499. technique MainTec2 < string MMDPass = "object"; bool UseTexture = true; SPHERE
  500. string Script = MIPMAPSCRIPT;
  501. > {
  502.  
  503. CREATEMIPMAP
  504.  
  505. pass DrawObject {
  506. VertexShader = compile vs_3_0 Basic_VS();
  507. PixelShader = compile ps_3_0 Basic_PS(true, false);
  508. }
  509. }
  510.  
  511. #ifdef USE_AL_CODE
  512. technique MainTec3 < string MMDPass = "object"; bool UseTexture = false; bool UseSphereMap = true;
  513. string Script = DRAWSCRIPT;
  514. > {
  515. pass DrawObject {
  516. VertexShader = compile vs_3_0 Basic_VS();
  517. PixelShader = compile ps_3_0 Basic_PS(false, true);
  518. }
  519. }
  520.  
  521. technique MainTec4 < string MMDPass = "object"; bool UseTexture = true; bool UseSphereMap = true;
  522. string Script = MIPMAPSCRIPT;
  523. > {
  524.  
  525. CREATEMIPMAP
  526.  
  527. pass DrawObject {
  528. VertexShader = compile vs_3_0 Basic_VS();
  529. PixelShader = compile ps_3_0 Basic_PS(true, true);
  530. }
  531. }
  532. #endif
  533.  
  534. technique MainTecBS1 < string MMDPass = "object_ss"; bool UseTexture = false; SPHERE
  535. string Script = DRAWSCRIPT;
  536. > {
  537. pass DrawObject {
  538. VertexShader = compile vs_3_0 Basic_VS();
  539. PixelShader = compile ps_3_0 Basic_PS(false, false);
  540. }
  541. }
  542.  
  543. technique MainTecBS2 < string MMDPass = "object_ss"; bool UseTexture = true; SPHERE
  544. string Script = MIPMAPSCRIPT;
  545. > {
  546.  
  547. CREATEMIPMAP
  548.  
  549. pass DrawObject {
  550. VertexShader = compile vs_3_0 Basic_VS();
  551. PixelShader = compile ps_3_0 Basic_PS(true, false);
  552. }
  553. }
  554.  
  555. #ifdef USE_AL_CODE
  556. technique MainTecBS3 < string MMDPass = "object_ss"; bool UseTexture = false; bool UseSphereMap = true;
  557. string Script = DRAWSCRIPT;
  558. > {
  559. pass DrawObject {
  560. VertexShader = compile vs_3_0 Basic_VS();
  561. PixelShader = compile ps_3_0 Basic_PS(false, true);
  562. }
  563. }
  564.  
  565. technique MainTecBS4 < string MMDPass = "object_ss"; bool UseTexture = true; bool UseSphereMap = true;
  566. string Script = MIPMAPSCRIPT;
  567. > {
  568.  
  569. CREATEMIPMAP
  570.  
  571. pass DrawObject {
  572. VertexShader = compile vs_3_0 Basic_VS();
  573. PixelShader = compile ps_3_0 Basic_PS(true, true);
  574. }
  575. }
  576. #endif
  577.  
  578. ///////////////////////////////////////////////////////////////////////////////////////////////
  579.  
  580. //影や輪郭は描画しない
  581. technique EdgeTec < string MMDPass = "edge"; > { }
  582. technique ShadowTec < string MMDPass = "shadow"; > { }
  583. technique ZplotTec < string MMDPass = "zplot"; > { }
  584.  
Add Comment
Please, Sign In to add comment