Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. // ENBSeries Fallout 4 hlsl DX11 format, sample file
  3. // visit http://enbdev.com for updates
  4. // Author: Boris Vorontsov
  5. // It's similar to effect.txt shaders and works with ldr input and output
  6. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7.  
  8.  
  9.  
  10. //+++++++++++++++++++++++++++++
  11. //internal parameters, modify or add new
  12. //+++++++++++++++++++++++++++++
  13.  
  14.  
  15.  
  16.  
  17. //+++++++++++++++++++++++++++++
  18. //external enb parameters, do not modify
  19. //+++++++++++++++++++++++++++++
  20. //x = generic timer in range 0..1, period of 16777216 ms (4.6 hours), y = average fps, w = frame time elapsed (in seconds)
  21. float4 Timer;
  22. //x = Width, y = 1/Width, z = aspect, w = 1/aspect, aspect is Width/Height
  23. float4 ScreenSize;
  24. //changes in range 0..1, 0 means full quality, 1 lowest dynamic quality (0.33, 0.66 are limits for quality levels)
  25. float AdaptiveQuality;
  26. //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.
  27. float4 Weather;
  28. //x = dawn, y = sunrise, z = day, w = sunset. Interpolators range from 0..1
  29. float4 TimeOfDay1;
  30. //x = dusk, y = night. Interpolators range from 0..1
  31. float4 TimeOfDay2;
  32. //changes in range 0..1, 0 means that night time, 1 - day time
  33. float ENightDayFactor;
  34. //changes 0 or 1. 0 means that exterior, 1 - interior
  35. float EInteriorFactor;
  36.  
  37. //+++++++++++++++++++++++++++++
  38. //external enb debugging parameters for shader programmers, do not modify
  39. //+++++++++++++++++++++++++++++
  40. //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
  41. float4 tempF1; //0,1,2,3
  42. float4 tempF2; //5,6,7,8
  43. float4 tempF3; //9,0
  44. // xy = cursor position in range 0..1 of screen;
  45. // z = is shader editor window active;
  46. // w = mouse buttons with values 0..7 as follows:
  47. // 0 = none
  48. // 1 = left
  49. // 2 = right
  50. // 3 = left+right
  51. // 4 = middle
  52. // 5 = left+middle
  53. // 6 = right+middle
  54. // 7 = left+right+middle (or rather cat is sitting on your mouse)
  55. float4 tempInfo1;
  56. // xy = cursor position of previous left mouse button click
  57. // zw = cursor position of previous right mouse button click
  58. float4 tempInfo2;
  59.  
  60.  
  61.  
  62. //+++++++++++++++++++++++++++++
  63. //mod parameters, do not modify
  64. //+++++++++++++++++++++++++++++
  65. Texture2D TextureOriginal; //color R10B10G10A2 32 bit ldr format
  66. Texture2D TextureColor; //color which is output of previous technique (except when drawed to temporary render target), R10B10G10A2 32 bit ldr format
  67. Texture2D TextureDepth; //scene depth R32F 32 bit hdr format
  68.  
  69. //temporary textures which can be set as render target for techniques via annotations like <string RenderTarget="RenderTargetRGBA32";>
  70. Texture2D RenderTargetRGBA32; //R8G8B8A8 32 bit ldr format
  71. Texture2D RenderTargetRGBA64; //R16B16G16A16 64 bit ldr format
  72. Texture2D RenderTargetRGBA64F; //R16B16G16A16F 64 bit hdr format
  73. Texture2D RenderTargetR16F; //R16F 16 bit hdr format with red channel only
  74. Texture2D RenderTargetR32F; //R32F 32 bit hdr format with red channel only
  75. Texture2D RenderTargetRGB32F; //32 bit hdr format without alpha
  76.  
  77. SamplerState Sampler0
  78. {
  79. Filter = MIN_MAG_MIP_POINT;//MIN_MAG_MIP_LINEAR;
  80. AddressU = Clamp;
  81. AddressV = Clamp;
  82. };
  83. SamplerState Sampler1
  84. {
  85. Filter = MIN_MAG_MIP_LINEAR;
  86. AddressU = Clamp;
  87. AddressV = Clamp;
  88. };
  89.  
  90.  
  91.  
  92. //+++++++++++++++++++++++++++++
  93. //
  94. //+++++++++++++++++++++++++++++
  95. struct VS_INPUT_POST
  96. {
  97. float3 pos : POSITION;
  98. float2 txcoord : TEXCOORD0;
  99. };
  100. struct VS_OUTPUT_POST
  101. {
  102. float4 pos : SV_POSITION;
  103. float2 txcoord0 : TEXCOORD0;
  104. };
  105.  
  106.  
  107.  
  108. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  109. //
  110. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  111. VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
  112. {
  113. VS_OUTPUT_POST OUT;
  114. float4 pos;
  115. pos.xyz=IN.pos.xyz;
  116. pos.w=1.0;
  117. OUT.pos=pos;
  118. OUT.txcoord0.xy=IN.txcoord.xy;
  119. return OUT;
  120. }
  121.  
  122.  
  123.  
  124. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  125. // Techniques are drawn one after another and they use the result of
  126. // the previous technique as input color to the next one. The number
  127. // of techniques is limited to 255. If UIName is specified, then it
  128. // is a base technique which may have extra techniques with indexing
  129. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  130.  
  131. #define SMAA_EDGE_TEX RenderTargetRGBA64 // default is RenderTargetRGB32F (only require RG channel)
  132. #define SMAA_BLEND_TEX RenderTargetRGBA64F // default is RenderTargetRGBA64 (RGBA requred)
  133.  
  134. #define PASSNAME0 TemporaryTarget1
  135. #define PASSNAME1 TemporaryTarget2
  136. #define PASSNAME2 TemporaryTarget3
  137. #include "enbsmaa.fx"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement