Hitmantb

Untitled

Mar 17th, 2023
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.28 KB | None | 0 0
  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. // ENBSeries TES Skyrim SE hlsl DX11 format, post process
  3. // visit http://enbdev.com for updates
  4. // Author: Boris Vorontsov
  5. //-----------------------CREDITS-----------------------
  6.  
  7.  
  8. // Post process file for Rudy ENB SE edited by Rudy102
  9. // [HLSL CODE] 3D LUT by Kingeric1992
  10. // Fade u/O-Deka-K and Kingeric1992
  11. // Separation code Boris and Tapioks
  12. // Integration of Night Eye code by Phinix - https://www.nexusmods.com/skyrimspecialedition/mods/9162
  13.  
  14.  
  15. //Warning! In this version Weather index is not yet implemented
  16.  
  17.  
  18.  
  19.  
  20. //========== GUI ==========================================
  21.  
  22. float Empty_Row0 <
  23. string UIName="---------NIGHT BRIGHTNESS LEVEL"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  24. > = {0.0};
  25.  
  26. float fNightlevel
  27. <
  28. string UIName="Nights: 0.5:Brighter 1.0:Normal 1.5:Darker";
  29. string UIWidget="Spinner"; float UIMin=0.5; float UIMax=1.5; float UIStep=0.1;
  30. > = {1.0};
  31.  
  32. float Empty_Row1 <
  33. string UIName="---------INTERIORS BRIGHTNESS LEVEL"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  34. > = {0.0};
  35.  
  36. float fInteriorlevel
  37. <
  38. string UIName="Interiors: 0.5:Brighter 1.0:Normal 2.0:Darker";
  39. string UIWidget="Spinner"; float UIMin=0.5; float UIMax=2.0; float UIStep=0.1;
  40. > = {1.0};
  41.  
  42. float Empty_Row2 <
  43. string UIName="-------------------BRIGHTNESS"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  44. > = {0.0};
  45.  
  46. float EBrightnessV2Dawn
  47. <
  48. string UIName="Brightness - Dawn";
  49. string UIWidget="Spinner";
  50. float UIMin=0.0;
  51. float UIMax=2.0;
  52. > = {0.9};
  53.  
  54. float EBrightnessV2Sunrise
  55. <
  56. string UIName="Brightness - Sunrise";
  57. string UIWidget="Spinner";
  58. float UIMin=0.0;
  59. float UIMax=2.0;
  60. > = {1.0};
  61.  
  62. float EBrightnessV2Day
  63. <
  64. string UIName="Brightness - Day";
  65. string UIWidget="Spinner";
  66. float UIMin=0.0;
  67. float UIMax=2.0;
  68. > = {1.0};
  69.  
  70. float EBrightnessV2Sunset
  71. <
  72. string UIName="Brightness - Sunset";
  73. string UIWidget="Spinner";
  74. float UIMin=0.0;
  75. float UIMax=2.0;
  76. > = {1.00};
  77.  
  78. float EBrightnessV2Dusk
  79. <
  80. string UIName="Brightness - Dusk";
  81. string UIWidget="Spinner";
  82. float UIMin=0.0;
  83. float UIMax=2.0;
  84. > = {0.9};
  85.  
  86. float EBrightnessV2Night
  87. <
  88. string UIName="Brightness - Night";
  89. string UIWidget="Spinner";
  90. float UIMin=0.0;
  91. float UIMax=2.0;
  92. > = {0.75};
  93.  
  94. float Empty_Row3 <
  95. string UIName="-------------------ADAPTATION MIN"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  96. > = {0.0};
  97.  
  98. float EAdaptationMinV2Dawn
  99. <
  100. string UIName="Adaptation Min - Dawn ";
  101. string UIWidget="Spinner";
  102. float UIStep=0.001;
  103. float UIMin=0.0;
  104. float UIMax=1.0;
  105. > = {0.09};
  106.  
  107. float EAdaptationMinV2Sunrise
  108. <
  109. string UIName="Adaptation Min - Sunrise ";
  110. string UIWidget="Spinner";
  111. float UIStep=0.001;
  112. float UIMin=0.0;
  113. float UIMax=1.0;
  114. > = {0.09};
  115.  
  116. float EAdaptationMinV2Day
  117. <
  118. string UIName="Adaptation Min - Day ";
  119. string UIWidget="Spinner";
  120. float UIStep=0.001;
  121. float UIMin=0.0;
  122. float UIMax=1.0;
  123. > = {0.09};
  124.  
  125. float EAdaptationMinV2Sunset
  126. <
  127. string UIName="Adaptation Min - Sunset";
  128. string UIWidget="Spinner";
  129. float UIStep=0.001;
  130. float UIMin=0.0;
  131. float UIMax=1.0;
  132. > = {0.05};
  133.  
  134. float EAdaptationMinV2Dusk
  135. <
  136. string UIName="Adaptation Min - Dusk";
  137. string UIWidget="Spinner";
  138. float UIStep=0.001;
  139. float UIMin=0.0;
  140. float UIMax=1.0;
  141. > = {0.05};
  142.  
  143. float EAdaptationMinV2Night
  144. <
  145. string UIName="Adaptation Min - Night";
  146. string UIWidget="Spinner";
  147. float UIStep=0.001;
  148. float UIMin=0.0;
  149. float UIMax=1.0;
  150. > = {0.05};
  151.  
  152. float Empty_Row4 <
  153. string UIName="-------------------ADAPTATION MAX"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  154. > = {0.0};
  155.  
  156.  
  157. float EAdaptationMaxV2Dawn
  158. <
  159. string UIName="Adaptation Max - Dawn";
  160. string UIWidget="Spinner";
  161. float UIStep=0.001;
  162. float UIMin=0.0;
  163. float UIMax=1.0;
  164. > = {0.09};
  165.  
  166. float EAdaptationMaxV2Sunrise
  167. <
  168. string UIName="Adaptation Max - Sunrise";
  169. string UIWidget="Spinner";
  170. float UIStep=0.001;
  171. float UIMin=0.0;
  172. float UIMax=1.0;
  173. > = {0.09};
  174.  
  175. float EAdaptationMaxV2Day
  176. <
  177. string UIName="Adaptation Max - Day";
  178. string UIWidget="Spinner";
  179. float UIStep=0.001;
  180. float UIMin=0.0;
  181. float UIMax=1.0;
  182. > = {0.09};
  183.  
  184. float EAdaptationMaxV2Sunset
  185. <
  186. string UIName="Adaptation Max - Sunset";
  187. string UIWidget="Spinner";
  188. float UIStep=0.001;
  189. float UIMin=0.0;
  190. float UIMax=1.0;
  191. > = {0.1};
  192.  
  193. float EAdaptationMaxV2Dusk
  194. <
  195. string UIName="Adaptation Max - Dusk";
  196. string UIWidget="Spinner";
  197. float UIStep=0.001;
  198. float UIMin=0.0;
  199. float UIMax=1.0;
  200. > = {0.1};
  201.  
  202. float EAdaptationMaxV2Night
  203. <
  204. string UIName="Adaptation Max - Night";
  205. string UIWidget="Spinner";
  206. float UIStep=0.001;
  207. float UIMin=0.0;
  208. float UIMax=1.0;
  209. > = {0.1};
  210.  
  211. float Empty_Row5 <
  212. string UIName="-------------------TONEMAPPING CURVE"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  213. > = {0.0};
  214.  
  215. float EToneMappingCurveV2Dawn
  216. <
  217. string UIName="ToneMapping Curve - Dawn";
  218. string UIWidget="Spinner";
  219. float UIMin=0.0;
  220. float UIMax=100.0;
  221. > = {7.0};
  222.  
  223. float EToneMappingCurveV2Sunrise
  224. <
  225. string UIName="ToneMapping Curve - Sunrise";
  226. string UIWidget="Spinner";
  227. float UIMin=0.0;
  228. float UIMax=100.0;
  229. > = {6.0};
  230.  
  231. float EToneMappingCurveV2Day
  232. <
  233. string UIName="ToneMapping Curve - Day";
  234. string UIWidget="Spinner";
  235. float UIMin=0.0;
  236. float UIMax=100.0;
  237. > = {5.0};
  238.  
  239. float EToneMappingCurveV2Sunset
  240. <
  241. string UIName="ToneMapping Curve - Sunset";
  242. string UIWidget="Spinner";
  243. float UIMin=0.0;
  244. float UIMax=100.0;
  245. > = {6.0};
  246.  
  247. float EToneMappingCurveV2Dusk
  248. <
  249. string UIName="ToneMapping Curve - Dusk";
  250. string UIWidget="Spinner";
  251. float UIMin=0.0;
  252. float UIMax=100.0;
  253. > = {8.0};
  254.  
  255. float EToneMappingCurveV2Night
  256. <
  257. string UIName="ToneMapping Curve - Night";
  258. string UIWidget="Spinner";
  259. float UIMin=0.0;
  260. float UIMax=100.0;
  261. > = {10.0};
  262.  
  263. float Empty_Row6 <
  264. string UIName="-------------------CONTRAST"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  265. > = {0.0};
  266.  
  267. float EIntensityContrastV2Dawn
  268. <
  269. string UIName="Contrast - Dawn";
  270. string UIWidget="Spinner";
  271. float UIMin=0.0;
  272. float UIMax=10.0;
  273. > = {1.5};
  274.  
  275. float EIntensityContrastV2Sunrise
  276. <
  277. string UIName="Contrast - Sunrise";
  278. string UIWidget="Spinner";
  279. float UIMin=0.0;
  280. float UIMax=10.0;
  281. > = {1.5};
  282.  
  283. float EIntensityContrastV2Day
  284. <
  285. string UIName="Contrast - Day";
  286. string UIWidget="Spinner";
  287. float UIMin=0.0;
  288. float UIMax=10.0;
  289. > = {1.5};
  290.  
  291. float EIntensityContrastV2Sunset
  292. <
  293. string UIName="Contrast - Sunset";
  294. string UIWidget="Spinner";
  295. float UIMin=0.0;
  296. float UIMax=10.0;
  297. > = {1.35};
  298.  
  299. float EIntensityContrastV2Dusk
  300. <
  301. string UIName="Contrast - Dusk";
  302. string UIWidget="Spinner";
  303. float UIMin=0.0;
  304. float UIMax=10.0;
  305. > = {1.35};
  306.  
  307. float EIntensityContrastV2Night
  308. <
  309. string UIName="Contrast - Night";
  310. string UIWidget="Spinner";
  311. float UIMin=0.0;
  312. float UIMax=10.0;
  313. > = {1.35};
  314.  
  315. float Empty_Row7 <
  316. string UIName="-------------------SATURATION"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  317. > = {0.0};
  318.  
  319. float EColorSaturationV2Dawn
  320. <
  321. string UIName="Saturation - Dawn";
  322. string UIWidget="Spinner";
  323. float UIMin=0.0;
  324. float UIMax=10.0;
  325. > = {1.5};
  326.  
  327. float EColorSaturationV2Sunrise
  328. <
  329. string UIName="Saturation - Sunrise";
  330. string UIWidget="Spinner";
  331. float UIMin=0.0;
  332. float UIMax=10.0;
  333. > = {1.5};
  334.  
  335. float EColorSaturationV2Day
  336. <
  337. string UIName="Saturation - Day";
  338. string UIWidget="Spinner";
  339. float UIMin=0.0;
  340. float UIMax=10.0;
  341. > = {1.5};
  342.  
  343. float EColorSaturationV2Sunset
  344. <
  345. string UIName="Saturation - Sunset";
  346. string UIWidget="Spinner";
  347. float UIMin=0.0;
  348. float UIMax=10.0;
  349. > = {0.9};
  350.  
  351. float EColorSaturationV2Dusk
  352. <
  353. string UIName="Saturation - Dusk";
  354. string UIWidget="Spinner";
  355. float UIMin=0.0;
  356. float UIMax=10.0;
  357. > = {0.9};
  358.  
  359. float EColorSaturationV2Night
  360. <
  361. string UIName="Saturation - Night";
  362. string UIWidget="Spinner";
  363. float UIMin=0.0;
  364. float UIMax=10.0;
  365. > = {0.9};
  366.  
  367. float Empty_Row8 <
  368. string UIName="-------------------OVERBRIGHT DAMP"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  369. > = {0.0};
  370.  
  371. float EToneMappingOversaturationV2Dawn
  372. <
  373. string UIName="Overbright Dampening - Dawn";
  374. string UIWidget="Spinner";
  375. float UIMin=0.0;
  376. float UIMax=200.0;
  377. > = {60.0};
  378.  
  379. float EToneMappingOversaturationV2Sunrise
  380. <
  381. string UIName="Overbright Dampening - Sunrise";
  382. string UIWidget="Spinner";
  383. float UIMin=0.0;
  384. float UIMax=200.0;
  385. > = {60.0};
  386.  
  387. float EToneMappingOversaturationV2Day
  388. <
  389. string UIName="Overbright Dampening - Day";
  390. string UIWidget="Spinner";
  391. float UIMin=0.0;
  392. float UIMax=200.0;
  393. > = {60.0};
  394.  
  395. float EToneMappingOversaturationV2Sunset
  396. <
  397. string UIName="Overbright Dampening - Sunset";
  398. string UIWidget="Spinner";
  399. float UIMin=0.0;
  400. float UIMax=200.0;
  401. > = {50.0};
  402.  
  403. float EToneMappingOversaturationV2Dusk
  404. <
  405. string UIName="Overbright Dampening - Dusk";
  406. string UIWidget="Spinner";
  407. float UIMin=0.0;
  408. float UIMax=200.0;
  409. > = {50.0};
  410.  
  411. float EToneMappingOversaturationV2Night
  412. <
  413. string UIName="Overbright Dampening - Night";
  414. string UIWidget="Spinner";
  415. float UIMin=0.0;
  416. float UIMax=200.0;
  417. > = {50.0};
  418.  
  419. float Empty_Row9 <
  420. string UIName="-------------------INTERIORS"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  421. > = {0.0};
  422.  
  423. float EBrightnessV2Interior
  424. <
  425. string UIName="Brightness - Interior";
  426. string UIWidget="Spinner";
  427. float UIMin=0.0;
  428. float UIMax=2.0;
  429. > = {0.35};
  430.  
  431. float EAdaptationMinV2Interior
  432. <
  433. string UIName="Adaptation Min - Interior";
  434. string UIWidget="Spinner";
  435. float UIStep=0.001;
  436. float UIMin=0.0;
  437. float UIMax=1.0;
  438. > = {0.025};
  439.  
  440. float EAdaptationMaxV2Interior
  441. <
  442. string UIName="Adaptation Max - Interior";
  443. string UIWidget="Spinner";
  444. float UIStep=0.001;
  445. float UIMin=0.0;
  446. float UIMax=1.0;
  447. > = {0.3};
  448.  
  449. float EToneMappingCurveV2Interior
  450. <
  451. string UIName="ToneMapping Curve - Interior";
  452. string UIWidget="Spinner";
  453. float UIMin=0.0;
  454. float UIMax=100.0;
  455. > = {0.95};
  456.  
  457. float EIntensityContrastV2Interior
  458. <
  459. string UIName="Contrast - Interior";
  460. string UIWidget="Spinner";
  461. float UIMin=0.0;
  462. float UIMax=10.0;
  463. > = {1.1};
  464.  
  465. float EColorSaturationV2Interior
  466. <
  467. string UIName="Saturation - Interior";
  468. string UIWidget="Spinner";
  469. float UIMin=0.0;
  470. float UIMax=10.0;
  471. > = {1.1};
  472.  
  473. float EToneMappingOversaturationV2Interior
  474. <
  475. string UIName="Overbright Dampening - Interior";
  476. string UIWidget="Spinner";
  477. float UIMin=0.0;
  478. float UIMax=200.0;
  479. > = {30.0};
  480.  
  481. float Empty_Row10 <
  482. string UIName="-------------------FADE"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  483. > = {0.0};
  484.  
  485. bool EnableFade
  486. <
  487. string UIName="Enable Fade Transition";
  488. > = {true};
  489.  
  490.  
  491.  
  492. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  493. //Khajiit Nighteye Adjustment
  494. int KNEA < string UIName="-------------------NIGHTEYE ADJUSTMENT"; string UIWidget="spinner"; int UIMin=0; int UIMax=0;> = {0.0};
  495. bool KNEnable <string UIName = "Use Nighteye Fix";> = {false};
  496. float KNDetect1 <string UIName="Params01[5].w > VALUE*0.1";string UIWidget="Spinner";float UIMin=0.0;float UIMax=6.0;> = {0.97};
  497. float KNDetect2 <string UIName="Params01[5].w < VALUE*0.1";string UIWidget="Spinner";float UIMin=0.0;float UIMax=11.0;> = {0.99};
  498. float KNDetect3 <string UIName="Params01[4].w > VALUE";string UIWidget="Spinner";float UIMin=0.0;float UIMax=1.0;> = {0.3};
  499. float KNDetect4 <string UIName="Params01[4].w < VALUE";string UIWidget="Spinner";float UIMin=0.0;float UIMax=1.0;> = {0.8};
  500. float3 KNBalance <string UIName="Nighteye Balance";string UIWidget="Color";> = {0.537, 0.647, 1};
  501. float KNSaturationInterior <string UIName="Nighteye SaturationInterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=10.0;> = {1.0};
  502. float KNSaturationExterior <string UIName="Nighteye SaturationExterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=10.0;> = {1.0};
  503. float KNBrightnessInterior <string UIName="Nighteye BrightnessInterior";string UIWidget="Spinner";float UIMin=-5.0;float UIMax=5.0;> = {0.0};
  504. float KNBrightnessExterior <string UIName="Nighteye BrightnessExterior";string UIWidget="Spinner";float UIMin=-5.0;float UIMax=5.0;> = {0.0};
  505. float KNContrastInterior <string UIName="Nighteye ContrastInterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=5.0;> = {0.99};
  506. float KNContrastExterior <string UIName="Nighteye ContrastExterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=5.0;> = {0.99};
  507. float KNInBlackInterior <string UIName="Nighteye Low ClipInterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=1.0;> = {0.0};
  508. float KNInBlackExterior <string UIName="Nighteye Low ClipExterior";string UIWidget="Spinner";float UIMin=0.0;float UIMax=1.0;> = {0.0};
  509. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  510.  
  511.  
  512.  
  513. #ifdef E_CC_PROCEDURAL
  514. //parameters for ldr color correction
  515. float Empty_Row11 <
  516. string UIName="-------------------LDR COLOR CORRECTION"; string UIWidget="spinner"; float UIMin=0.0; float UIMax=0.0;
  517. > = {0.0};
  518. float ECCGamma
  519. <
  520. string UIName="CC: Gamma";
  521. string UIWidget="Spinner";
  522. float UIMin=0.2;//not zero!!!
  523. float UIMax=5.0;
  524. > = {1.5};
  525.  
  526. float ECCInBlack
  527. <
  528. string UIName="CC: In black";
  529. string UIWidget="Spinner";
  530. float UIMin=0.0;
  531. float UIMax=1.0;
  532. > = {0.0};
  533.  
  534. float ECCInWhite
  535. <
  536. string UIName="CC: In white";
  537. string UIWidget="Spinner";
  538. float UIMin=0.0;
  539. float UIMax=1.0;
  540. > = {1.0};
  541.  
  542. float ECCOutBlack
  543. <
  544. string UIName="CC: Out black";
  545. string UIWidget="Spinner";
  546. float UIMin=0.0;
  547. float UIMax=1.0;
  548. > = {0.0};
  549.  
  550. float ECCOutWhite
  551. <
  552. string UIName="CC: Out white";
  553. string UIWidget="Spinner";
  554. float UIMin=0.0;
  555. float UIMax=1.0;
  556. > = {1.0};
  557.  
  558. float ECCBrightness
  559. <
  560. string UIName="CC: Brightness";
  561. string UIWidget="Spinner";
  562. float UIMin=0.0;
  563. float UIMax=10.0;
  564. > = {1.0};
  565.  
  566. float ECCContrastGrayLevel
  567. <
  568. string UIName="CC: Contrast gray level";
  569. string UIWidget="Spinner";
  570. float UIMin=0.01;
  571. float UIMax=0.99;
  572. > = {0.5};
  573.  
  574. float ECCContrast
  575. <
  576. string UIName="CC: Contrast";
  577. string UIWidget="Spinner";
  578. float UIMin=0.0;
  579. float UIMax=10.0;
  580. > = {1.0};
  581.  
  582. float ECCSaturation
  583. <
  584. string UIName="CC: Saturation";
  585. string UIWidget="Spinner";
  586. float UIMin=0.0;
  587. float UIMax=10.0;
  588. > = {1.0};
  589.  
  590. float ECCDesaturateShadows
  591. <
  592. string UIName="CC: Desaturate shadows";
  593. string UIWidget="Spinner";
  594. float UIMin=0.0;
  595. float UIMax=1.0;
  596. > = {0.0};
  597.  
  598. float3 ECCColorBalanceShadows <
  599. string UIName="CC: Color balance shadows";
  600. string UIWidget="Color";
  601. > = {0.5, 0.5, 0.5};
  602.  
  603. float3 ECCColorBalanceHighlights <
  604. string UIName="CC: Color balance highlights";
  605. string UIWidget="Color";
  606. > = {0.5, 0.5, 0.5};
  607.  
  608. float3 ECCChannelMixerR <
  609. string UIName="CC: Channel mixer R";
  610. string UIWidget="Color";
  611. > = {1.0, 0.0, 0.0};
  612.  
  613. float3 ECCChannelMixerG <
  614. string UIName="CC: Channel mixer G";
  615. string UIWidget="Color";
  616. > = {0.0, 1.0, 0.0};
  617.  
  618. float3 ECCChannelMixerB <
  619. string UIName="CC: Channel mixer B";
  620. string UIWidget="Color";
  621. > = {0.0, 0.0, 1.0};
  622. #endif //E_CC_PROCEDURAL
  623.  
  624. //bool enablelut < string UIName="Enable LUT"; > = {true};
  625.  
  626. /*
  627. //example parameters with annotations for in-game editor
  628. float ExampleScalar
  629. <
  630. string UIName="Example scalar";
  631. string UIWidget="spinner";
  632. float UIMin=0.0;
  633. float UIMax=1000.0;
  634. > = {1.0};
  635.  
  636. float3 ExampleColor
  637. <
  638. string UIName = "Example color";
  639. string UIWidget = "color";
  640. > = {0.0, 1.0, 0.0};
  641.  
  642. float4 ExampleVector
  643. <
  644. string UIName="Example vector";
  645. string UIWidget="vector";
  646. > = {0.0, 1.0, 0.0, 0.0};
  647.  
  648. int ExampleQuality
  649. <
  650. string UIName="Example quality";
  651. string UIWidget="quality";
  652. int UIMin=0;
  653. int UIMax=3;
  654. > = {1};
  655.  
  656. Texture2D ExampleTexture
  657. <
  658. string UIName = "Example texture";
  659. string ResourceName = "test.bmp";
  660. >;
  661. SamplerState ExampleSampler
  662. {
  663. Filter = MIN_MAG_MIP_LINEAR;
  664. AddressU = Clamp;
  665. AddressV = Clamp;
  666. };
  667. */
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. //+++++++++++++++++++++++++++++
  675. //external enb parameters, do not modify
  676. //+++++++++++++++++++++++++++++
  677. //x = generic timer in range 0..1, period of 16777216 ms (4.6 hours), y = average fps, w = frame time elapsed (in seconds)
  678. float4 Timer;
  679. //x = Width, y = 1/Width, z = aspect, w = 1/aspect, aspect is Width/Height
  680. float4 ScreenSize;
  681. //changes in range 0..1, 0 means full quality, 1 lowest dynamic quality (0.33, 0.66 are limits for quality levels)
  682. float AdaptiveQuality;
  683. //x = current weather index, y = outgoing weather index, z = weather transition, w = time of the day in 24 standart hours. Weather index is value from weather ini file, for example WEATHER002 means index==2, but index==0 means that weather not captured.
  684. float4 Weather;
  685. //x = dawn, y = sunrise, z = day, w = sunset. Interpolators range from 0..1
  686. float4 TimeOfDay1;
  687. //x = dusk, y = night. Interpolators range from 0..1
  688. float4 TimeOfDay2;
  689. //changes in range 0..1, 0 means that night time, 1 - day time
  690. float ENightDayFactor;
  691. //changes 0 or 1. 0 means that exterior, 1 - interior
  692. float EInteriorFactor;
  693.  
  694. //+++++++++++++++++++++++++++++
  695. //external enb debugging parameters for shader programmers, do not modify
  696. //+++++++++++++++++++++++++++++
  697. //keyboard controlled temporary variables. Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
  698. float4 tempF1; //0,1,2,3
  699. float4 tempF2; //5,6,7,8
  700. float4 tempF3; //9,0
  701. // xy = cursor position in range 0..1 of screen;
  702. // z = is shader editor window active;
  703. // w = mouse buttons with values 0..7 as follows:
  704. // 0 = none
  705. // 1 = left
  706. // 2 = right
  707. // 3 = left+right
  708. // 4 = middle
  709. // 5 = left+middle
  710. // 6 = right+middle
  711. // 7 = left+right+middle (or rather cat is sitting on your mouse)
  712. float4 tempInfo1;
  713. // xy = cursor position of previous left mouse button click
  714. // zw = cursor position of previous right mouse button click
  715. float4 tempInfo2;
  716.  
  717.  
  718.  
  719. //+++++++++++++++++++++++++++++
  720. //game and mod parameters, do not modify
  721. //+++++++++++++++++++++++++++++
  722. float4 Params01[7]; //skyrimse parameters
  723. //x - bloom amount; y - lens amount
  724. float4 ENBParams01; //enb parameters
  725.  
  726. float3 LumCoeff = float3(0.2125, 0.7154, 0.0721);
  727.  
  728. Texture2D TextureColor; //hdr color
  729. Texture2D TextureBloom; //vanilla or enb bloom
  730. Texture2D TextureLens; //enb lens fx
  731. Texture2D TextureDepth; //scene depth
  732. Texture2D TextureAdaptation; //vanilla or enb adaptation
  733. Texture2D TextureAperture; //this frame aperture 1*1 R32F hdr red channel only. computed in depth of field shader file
  734.  
  735. SamplerState Sampler0
  736. {
  737. Filter = MIN_MAG_MIP_POINT;//MIN_MAG_MIP_LINEAR;
  738. AddressU = Clamp;
  739. AddressV = Clamp;
  740. };
  741. SamplerState Sampler1
  742. {
  743. Filter = MIN_MAG_MIP_LINEAR;
  744. AddressU = Clamp;
  745. AddressV = Clamp;
  746. };
  747.  
  748.  
  749.  
  750. //+++++++++++++++++++++++++++++
  751. //
  752. //+++++++++++++++++++++++++++++
  753. struct VS_INPUT_POST
  754. {
  755. float3 pos : POSITION;
  756. float2 txcoord : TEXCOORD0;
  757. };
  758. struct VS_OUTPUT_POST
  759. {
  760. float4 pos : SV_POSITION;
  761. float2 txcoord0 : TEXCOORD0;
  762. };
  763.  
  764. #include "/Modular Shaders/enbeffect_AdaptTool.fxh"
  765.  
  766. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  767. //
  768. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  769. VS_OUTPUT_POST VS_Draw(VS_INPUT_POST IN)
  770. {
  771. VS_OUTPUT_POST OUT;
  772. float4 pos;
  773. pos.xyz=IN.pos.xyz;
  774. pos.w=1.0;
  775. OUT.pos=pos;
  776. OUT.txcoord0.xy=IN.txcoord.xy;
  777. return OUT;
  778. }
  779.  
  780. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  781. // BEGIN PIXEL SHADER
  782. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  783.  
  784. float4 PS_Draw(VS_OUTPUT_POST IN, float4 v0 : SV_Position0, uniform Texture2D LUTtex, uniform bool enablelut) : SV_Target
  785. {
  786. // Add Border Fix depth check code here (don't modify anything else)
  787. // Start Border Fix depth check code
  788. float depthValue = TextureDepth.Sample(Sampler0, IN.txcoord0).r;
  789.  
  790. if (depthValue == 0.0f) {
  791. return float4(0, 0, 0, 1);
  792. }
  793. // End Border Fix depth check code
  794. // Normal code continues below
  795.  
  796. float4 res;
  797. float4 color;
  798.  
  799. color=TextureColor.Sample(Sampler0, IN.txcoord0.xy); //hdr scene color
  800.  
  801.  
  802.  
  803. float3 lens;
  804. lens.xyz=TextureLens.Sample(Sampler1, IN.txcoord0.xy).xyz;
  805. color.xyz+=lens.xyz * ENBParams01.y; //lens amount
  806.  
  807. float3 bloom=TextureBloom.Sample(Sampler1, IN.txcoord0.xy);
  808.  
  809. // bloom.xyz=bloom-color; // disabled for additive bloom
  810. bloom.xyz=max(bloom, 0.0);
  811. color.xyz+=bloom*ENBParams01.x; //bloom amount
  812.  
  813. float hnd = ENightDayFactor;
  814. float pi = (1-EInteriorFactor);
  815.  
  816. float grayadaptation=TextureAdaptation.Sample(Sampler0, IN.txcoord0.xy).x;
  817.  
  818. if (EnableFade && Params01[4].w<KNDetect3)
  819. {
  820. float3 fade = Params01[5].xyz; // fade current scene to specified color, mostly used in special effects
  821. float fade_weight = Params01[5].w; // 0 == no fade
  822.  
  823. color.rgb = lerp(color.rgb, fade, fade_weight);
  824. }
  825.  
  826.  
  827. //========== Tapioks Separation =================================
  828.  
  829.  
  830. float timeweight;
  831. float timevalue;
  832.  
  833. //FIRST
  834. timeweight=0.000001;
  835. timevalue=0.0;
  836.  
  837. timevalue+=TimeOfDay1.x * EBrightnessV2Dawn;
  838. timevalue+=TimeOfDay1.y * EBrightnessV2Sunrise;
  839. timevalue+=TimeOfDay1.z * EBrightnessV2Day;
  840. timevalue+=TimeOfDay1.w * EBrightnessV2Sunset;
  841. timevalue+=TimeOfDay2.x * EBrightnessV2Dusk;
  842. timevalue+=TimeOfDay2.y * EBrightnessV2Night;
  843.  
  844. timeweight+=TimeOfDay1.x;
  845. timeweight+=TimeOfDay1.y;
  846. timeweight+=TimeOfDay1.z;
  847. timeweight+=TimeOfDay1.w;
  848. timeweight+=TimeOfDay2.x;
  849. timeweight+=TimeOfDay2.y;
  850.  
  851. float newEBrightnessV2;
  852. newEBrightnessV2=lerp((timevalue / timeweight), EBrightnessV2Interior, EInteriorFactor );
  853.  
  854. //SECOND
  855. timeweight=0.000001;
  856. timevalue=0.0;
  857.  
  858.  
  859. timevalue+=TimeOfDay1.x * EColorSaturationV2Dawn;
  860. timevalue+=TimeOfDay1.y * EColorSaturationV2Sunrise;
  861. timevalue+=TimeOfDay1.z * EColorSaturationV2Day;
  862. timevalue+=TimeOfDay1.w * EColorSaturationV2Sunset;
  863. timevalue+=TimeOfDay2.x * EColorSaturationV2Dusk;
  864. timevalue+=TimeOfDay2.y * EColorSaturationV2Night;
  865.  
  866. timeweight+=TimeOfDay1.x;
  867. timeweight+=TimeOfDay1.y;
  868. timeweight+=TimeOfDay1.z;
  869. timeweight+=TimeOfDay1.w;
  870. timeweight+=TimeOfDay2.x;
  871. timeweight+=TimeOfDay2.y;
  872.  
  873. float newEColorSaturationV2;
  874. newEColorSaturationV2=lerp((timevalue / timeweight), EColorSaturationV2Interior, EInteriorFactor );
  875.  
  876. //Third
  877. timeweight=0.000001;
  878. timevalue=0.0;
  879.  
  880. timevalue+=TimeOfDay1.x * EAdaptationMaxV2Dawn;
  881. timevalue+=TimeOfDay1.y * EAdaptationMaxV2Sunrise;
  882. timevalue+=TimeOfDay1.z * EAdaptationMaxV2Day;
  883. timevalue+=TimeOfDay1.w * EAdaptationMaxV2Sunset;
  884. timevalue+=TimeOfDay2.x * EAdaptationMaxV2Dusk;
  885. timevalue+=TimeOfDay2.y * EAdaptationMaxV2Night;
  886.  
  887. timeweight+=TimeOfDay1.x;
  888. timeweight+=TimeOfDay1.y;
  889. timeweight+=TimeOfDay1.z;
  890. timeweight+=TimeOfDay1.w;
  891. timeweight+=TimeOfDay2.x;
  892. timeweight+=TimeOfDay2.y;
  893.  
  894. float newEAdaptationMax;
  895. newEAdaptationMax=lerp((timevalue / timeweight), EAdaptationMaxV2Interior, EInteriorFactor );
  896.  
  897. //Fourth
  898. timeweight=0.000001;
  899. timevalue=0.0;
  900.  
  901. timevalue+=TimeOfDay1.x * EAdaptationMinV2Dawn;
  902. timevalue+=TimeOfDay1.y * EAdaptationMinV2Sunrise;
  903. timevalue+=TimeOfDay1.z * EAdaptationMinV2Day;
  904. timevalue+=TimeOfDay1.w * EAdaptationMinV2Sunset;
  905. timevalue+=TimeOfDay2.x * EAdaptationMinV2Dusk;
  906. timevalue+=TimeOfDay2.y * EAdaptationMinV2Night;
  907.  
  908. timeweight+=TimeOfDay1.x;
  909. timeweight+=TimeOfDay1.y;
  910. timeweight+=TimeOfDay1.z;
  911. timeweight+=TimeOfDay1.w;
  912. timeweight+=TimeOfDay2.x;
  913. timeweight+=TimeOfDay2.y;
  914.  
  915. float newEAdaptationMin;
  916. newEAdaptationMin=lerp( (timevalue / timeweight), EAdaptationMinV2Interior, EInteriorFactor );
  917.  
  918. //Fourth
  919. timeweight=0.000001;
  920. timevalue=0.0;
  921.  
  922. timevalue+=TimeOfDay1.x * EToneMappingCurveV2Dawn;
  923. timevalue+=TimeOfDay1.y * EToneMappingCurveV2Sunrise;
  924. timevalue+=TimeOfDay1.z * EToneMappingCurveV2Day;
  925. timevalue+=TimeOfDay1.w * EToneMappingCurveV2Sunset;
  926. timevalue+=TimeOfDay2.x * EToneMappingCurveV2Dusk;
  927. timevalue+=TimeOfDay2.y * (EToneMappingCurveV2Night*fNightlevel);
  928.  
  929. timeweight+=TimeOfDay1.x;
  930. timeweight+=TimeOfDay1.y;
  931. timeweight+=TimeOfDay1.z;
  932. timeweight+=TimeOfDay1.w;
  933. timeweight+=TimeOfDay2.x;
  934. timeweight+=TimeOfDay2.y;
  935.  
  936. float newEToneMappingCurve;
  937. newEToneMappingCurve=lerp( (timevalue / timeweight), EToneMappingCurveV2Interior*fInteriorlevel, EInteriorFactor );
  938.  
  939. //Fifth
  940. timeweight=0.000001;
  941. timevalue=0.0;
  942.  
  943. timevalue+=TimeOfDay1.x * EIntensityContrastV2Dawn;
  944. timevalue+=TimeOfDay1.y * EIntensityContrastV2Sunrise;
  945. timevalue+=TimeOfDay1.z * EIntensityContrastV2Day;
  946. timevalue+=TimeOfDay1.w * EIntensityContrastV2Sunset;
  947. timevalue+=TimeOfDay2.x * EIntensityContrastV2Dusk;
  948. timevalue+=TimeOfDay2.y * EIntensityContrastV2Night;
  949.  
  950. timeweight+=TimeOfDay1.x;
  951. timeweight+=TimeOfDay1.y;
  952. timeweight+=TimeOfDay1.z;
  953. timeweight+=TimeOfDay1.w;
  954. timeweight+=TimeOfDay2.x;
  955. timeweight+=TimeOfDay2.y;
  956.  
  957. float newEIntensityContrastV2;
  958. newEIntensityContrastV2=lerp( (timevalue / timeweight), EIntensityContrastV2Interior, EInteriorFactor );
  959.  
  960. //Sixth
  961. timeweight=0.000001;
  962. timevalue=0.0;
  963.  
  964. timevalue+=TimeOfDay1.x * EToneMappingOversaturationV2Dawn;
  965. timevalue+=TimeOfDay1.y * EToneMappingOversaturationV2Sunrise;
  966. timevalue+=TimeOfDay1.z * EToneMappingOversaturationV2Day;
  967. timevalue+=TimeOfDay1.w * EToneMappingOversaturationV2Sunset;
  968. timevalue+=TimeOfDay2.x * EToneMappingOversaturationV2Dusk;
  969. timevalue+=TimeOfDay2.y * EToneMappingOversaturationV2Night;
  970.  
  971. timeweight+=TimeOfDay1.x;
  972. timeweight+=TimeOfDay1.y;
  973. timeweight+=TimeOfDay1.z;
  974. timeweight+=TimeOfDay1.w;
  975. timeweight+=TimeOfDay2.x;
  976. timeweight+=TimeOfDay2.y;
  977.  
  978. float newEToneMappingOversaturationV2;
  979. newEToneMappingOversaturationV2=lerp( (timevalue / timeweight), EToneMappingOversaturationV2Interior, EInteriorFactor );
  980.  
  981.  
  982. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  983.  
  984. float KNSaturation = lerp( KNSaturationExterior, KNSaturationInterior, EInteriorFactor );
  985. float KNBrightness = lerp( KNBrightnessExterior, KNBrightnessInterior, EInteriorFactor );
  986. float KNContrast = lerp( KNContrastExterior, KNContrastInterior, EInteriorFactor );
  987. float KNInBlack = lerp( KNInBlackExterior, KNInBlackInterior, EInteriorFactor );
  988. //Khajiit Nighteye Correction by Phinix
  989. float4 kncolor = color;
  990. // color balance
  991. float3 knsat = KNBalance;
  992. float3 knoldcol=kncolor.xyz;
  993. kncolor.xyz *= knsat;
  994. float3 kngrey = float3(0.333,0.333,0.333);
  995. kncolor.xyz += (knoldcol.x-(knoldcol.x*knsat.x)) * kngrey.x;
  996. kncolor.xyz += (knoldcol.y-(knoldcol.y*knsat.y)) * kngrey.y;
  997. kncolor.xyz += (knoldcol.z-(knoldcol.z*knsat.z)) * kngrey.z;
  998. // saturation
  999. float3 intensity = dot(kncolor.rgb, LumCoeff);
  1000. kncolor.rgb = lerp(intensity, kncolor.rgb, KNSaturation);
  1001. kncolor.rgb /= kncolor.a;
  1002. // contrast
  1003. kncolor.rgb = ((kncolor.rgb - 0.5) * max(KNContrast, 0)) + 0.5;
  1004. // brightness
  1005. kncolor.rgb += (KNBrightness*0.1);
  1006. kncolor.rgb *= kncolor.a;
  1007. // low clip
  1008. kncolor=max(kncolor-(KNInBlack*0.1), 0.0) / max(1.0-(KNInBlack*0.1), 0.0001);
  1009. // bool for output - check whitefactor (Params01[2].y) as well as fade weight (Params01[5].w)
  1010. //
  1011. // to avoid activating for wrong image space (may need tweaking)
  1012. bool knactive = ((Params01[5].w>KNDetect1*0.1)*(Params01[5].w<KNDetect2*0.1)*(Params01[4].w>KNDetect3)*(Params01[4].w<KNDetect4));
  1013.  
  1014. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1015.  
  1016. //return color;
  1017. color = lerp(color,kncolor,(knactive)*(KNEnable));
  1018.  
  1019. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1020.  
  1021. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1022.  
  1023. //MIXING
  1024. grayadaptation=max(grayadaptation, 0.0);
  1025. grayadaptation=min(grayadaptation, 50.0);
  1026. color.xyz=color.xyz/(grayadaptation*newEAdaptationMax+newEAdaptationMin);//*tempF1.x
  1027.  
  1028. color.xyz*=(newEBrightnessV2);
  1029. color.xyz+=0.000001;
  1030. float3 xncol=normalize(color.xyz);
  1031. float3 scl=color.xyz/xncol.xyz;
  1032. scl=pow(scl, newEIntensityContrastV2);
  1033. xncol.xyz=pow(xncol.xyz, newEColorSaturationV2);
  1034. color.xyz=scl*xncol.xyz;
  1035.  
  1036. float lumamax=newEToneMappingOversaturationV2;
  1037. color.xyz=(color.xyz * (1.0 + color.xyz/lumamax))/(color.xyz + newEToneMappingCurve);
  1038.  
  1039.  
  1040.  
  1041. #ifdef E_CC_PROCEDURAL
  1042. //activated by UseProceduralCorrection=true
  1043. float tempgray;
  1044. float4 tempvar;
  1045. float3 tempcolor;
  1046.  
  1047. //+++ levels like in photoshop, including gamma, lightness, additive brightness
  1048. color=max(color-ECCInBlack, 0.0) / max(ECCInWhite-ECCInBlack, 0.0001);
  1049. if (ECCGamma!=1.0) color=pow(color, ECCGamma);
  1050. color=color*(ECCOutWhite-ECCOutBlack) + ECCOutBlack;
  1051.  
  1052. //+++ brightness
  1053. color=color*ECCBrightness;
  1054.  
  1055. //+++ contrast
  1056. color=(color-ECCContrastGrayLevel) * ECCContrast + ECCContrastGrayLevel;
  1057.  
  1058. //+++ saturation
  1059. tempgray=dot(color, 0.3333);
  1060. color=lerp(tempgray, color, ECCSaturation);
  1061.  
  1062. //+++ desaturate shadows
  1063. tempgray=dot(color, 0.3333);
  1064. tempvar.x=saturate(1.0-tempgray);
  1065. tempvar.x*=tempvar.x;
  1066. tempvar.x*=tempvar.x;
  1067. color=lerp(color, tempgray, ECCDesaturateShadows*tempvar.x);
  1068.  
  1069. //+++ color balance
  1070. color=saturate(color);
  1071. tempgray=dot(color, 0.3333);
  1072. float2 shadow_highlight=float2(1.0-tempgray, tempgray);
  1073. shadow_highlight*=shadow_highlight;
  1074. color.rgb+=(ECCColorBalanceHighlights*2.0-1.0)*color * shadow_highlight.x;
  1075. color.rgb+=(ECCColorBalanceShadows*2.0-1.0)*(1.0-color) * shadow_highlight.y;
  1076.  
  1077. //+++ channel mixer
  1078. tempcolor=color;
  1079. color.r=dot(tempcolor, ECCChannelMixerR);
  1080. color.g=dot(tempcolor, ECCChannelMixerG);
  1081. color.b=dot(tempcolor, ECCChannelMixerB);
  1082. #endif //E_CC_PROCEDURAL
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091. //========== LUT =================================
  1092.  
  1093. //if(enablelut)
  1094. {
  1095. float2 CLut_pSize = 1 / float2(1024, 32);
  1096. color.rgb = saturate(color.rgb) * 31;
  1097. float4 CLut_UV;
  1098. CLut_UV.w = floor(color.b);
  1099. CLut_UV.xy = (color.rg + 0.5) * CLut_pSize;
  1100. CLut_UV.x += CLut_UV.w * CLut_pSize.y;
  1101. CLut_UV.z = CLut_UV.x + CLut_pSize.y;
  1102. color.rgb = lerp(LUTtex.SampleLevel(Sampler1, CLut_UV.xy, 0).rgb, LUTtex.SampleLevel(Sampler1, CLut_UV.zy, 0).rgb, color.b - CLut_UV.w);
  1103. }
  1104.  
  1105. res.xyz=saturate(color);
  1106. res.w=1.0;
  1107. return res;
  1108. }
  1109.  
  1110.  
  1111.  
  1112. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1113. //Vanilla post process. Do not modify
  1114. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1115. float4 PS_DrawOriginal(VS_OUTPUT_POST IN, float4 v0 : SV_Position0) : SV_Target
  1116. {
  1117. float4 res;
  1118. float4 color;
  1119.  
  1120. float2 scaleduv=Params01[6].xy*IN.txcoord0.xy;
  1121. scaleduv=max(scaleduv, 0.0);
  1122. scaleduv=min(scaleduv, Params01[6].zy);
  1123.  
  1124. color=TextureColor.Sample(Sampler0, IN.txcoord0.xy); //hdr scene color
  1125.  
  1126. float4 r0, r1, r2, r3;
  1127. r1.xy=scaleduv;
  1128. r0.xyz = color.xyz;
  1129. if (0.5<=Params01[0].x) r1.xy=IN.txcoord0.xy;
  1130. r1.xyz = TextureBloom.Sample(Sampler1, r1.xy).xyz;
  1131. r2.xy = TextureAdaptation.Sample(Sampler1, IN.txcoord0.xy).xy; //in skyrimse it two component
  1132.  
  1133. r0.w=dot(float3(2.125000e-001, 7.154000e-001, 7.210000e-002), r0.xyz);
  1134. r0.w=max(r0.w, 1.000000e-005);
  1135. r1.w=r2.y/r2.x;
  1136. r2.y=r0.w * r1.w;
  1137. if (0.5<Params01[2].z) r2.z=0xffffffff; else r2.z=0;
  1138. r3.xy=r1.w * r0.w + float2(-4.000000e-003, 1.000000e+000);
  1139. r1.w=max(r3.x, 0.0);
  1140. r3.xz=r1.w * 6.2 + float2(5.000000e-001, 1.700000e+000);
  1141. r2.w=r1.w * r3.x;
  1142. r1.w=r1.w * r3.z + 6.000000e-002;
  1143. r1.w=r2.w / r1.w;
  1144. r1.w=pow(r1.w, 2.2);
  1145. r1.w=r1.w * Params01[2].y;
  1146. r2.w=r2.y * Params01[2].y + 1.0;
  1147. r2.y=r2.w * r2.y;
  1148. r2.y=r2.y / r3.y;
  1149. if (r2.z==0) r1.w=r2.y; else r1.w=r1.w;
  1150. r0.w=r1.w / r0.w;
  1151. r1.w=saturate(Params01[2].x - r1.w);
  1152. r1.xyz=r1 * r1.w;
  1153. r0.xyz=r0 * r0.w + r1;
  1154. r1.x=dot(r0.xyz, float3(2.125000e-001, 7.154000e-001, 7.210000e-002));
  1155. r0.w=1.0;
  1156. r0=r0 - r1.x;
  1157. r0=Params01[3].x * r0 + r1.x;
  1158. r1=Params01[4] * r1.x - r0;
  1159. r0=Params01[4].w * r1 + r0;
  1160. r0=Params01[3].w * r0 - r2.x;
  1161. r0=Params01[3].z * r0 + r2.x;
  1162. r0.xyz=saturate(r0);
  1163. r1.xyz=pow(r1.xyz, Params01[6].w);
  1164. //active only in certain modes, like khajiit vision, otherwise Params01[5].w=0
  1165. r1=Params01[5] - r0;
  1166. res=Params01[5].w * r1 + r0;
  1167.  
  1168. // res.xyz = color.xyz;
  1169. // res.w=1.0;
  1170. return res;
  1171. }
  1172.  
  1173.  
  1174.  
  1175. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1176. //techniques
  1177. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1178. Texture2D LUT_DEFAULT < string UIName = "3DLut0"; string ResourceName = "LUT_DEFAULT.png"; >; // default Lut
  1179. technique11 Draw <string UIName="CW RUDY DEFAULT";>
  1180. {
  1181. pass p0
  1182. {
  1183. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1184. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_DEFAULT, true)));
  1185. }
  1186. pass ADAPT_TOOL_PASS
  1187. }
  1188.  
  1189. Texture2D LUT_Preset1 < string UIName = "3DLut1"; string ResourceName = "LUT_Preset1.png"; >; // Preset1 Lut
  1190. technique11 Preset1 <string UIName="CW VARIANT 1";>
  1191. {
  1192. pass p0
  1193. {
  1194. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1195. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_Preset1, true)));
  1196. }
  1197. }
  1198.  
  1199. Texture2D LUT_Preset2 < string UIName = "3DLut1"; string ResourceName = "LUT_Preset2.png"; >; // Preset2 Lut
  1200. technique11 Preset2 <string UIName="CW VARIANT 2";>
  1201. {
  1202. pass p0
  1203. {
  1204. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1205. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_Preset2, true)));
  1206. }
  1207. }
  1208.  
  1209. Texture2D LUT_Preset3 < string UIName = "3DLut1"; string ResourceName = "LUT_Preset3.png"; >; // Preset3 Lut
  1210. technique11 Preset3 <string UIName="CW VARIANT 3";>
  1211. {
  1212. pass p0
  1213. {
  1214. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1215. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_Preset3, true)));
  1216. }
  1217. }
  1218.  
  1219. Texture2D LUT_BW < string UIName = "3DLut1"; string ResourceName = "LUT_BW.png"; >; // BW Lut
  1220. technique11 BW <string UIName="BW";>
  1221. {
  1222. pass p0
  1223. {
  1224. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1225. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_BW, true)));
  1226. }
  1227. }
  1228.  
  1229. Texture2D LUT_NEUTRAL < string UIName = "3DLut1"; string ResourceName = "LUT_NEUTRAL.png"; >; // Neutral Lut
  1230. technique11 NEUTRAL <string UIName="NEUTRAL";>
  1231. {
  1232. pass p0
  1233. {
  1234. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1235. SetPixelShader(CompileShader(ps_5_0, PS_Draw(LUT_NEUTRAL, true)));
  1236. }
  1237. }
  1238.  
  1239.  
  1240.  
  1241.  
  1242. technique11 ORIGINALPOSTPROCESS <string UIName="Vanilla";> //do not modify this technique
  1243. {
  1244. pass p0
  1245. {
  1246. SetVertexShader(CompileShader(vs_5_0, VS_Draw()));
  1247. SetPixelShader(CompileShader(ps_5_0, PS_DrawOriginal()));
  1248. }
  1249. }
  1250.  
  1251.  
  1252.  
Advertisement
Add Comment
Please, Sign In to add comment