Please use english language
It is currently 26 Feb 2020, 12:22

All times are UTC





Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: 23 Aug 2014, 14:13 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
Replace enbeffectprepass.fx with this code and turn on depth of field in enbseries.ini or in editor. Do you see visualized depth data as gradient lines? If not, issue occur not because of external shaders and rather other software, drivers or skyrimprefs.ini.

Code:
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ENBSeries effect file
// visit http://enbdev.com for updates
// Copyright (c) 2007-2014 Boris Vorontsov
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#ifndef E_DOF_EQ
 #ifndef E_DOF_HQ
  #ifndef E_DOF_MQ
   #ifndef E_DOF_LQ
#define E_DOF_MQ
   #endif
  #endif
 #endif
#endif


//+++++++++++++++++++++++++++++
//internal parameters, can be modified
//+++++++++++++++++++++++++++++
float   EBlurSamplingRange=4.0;
float   EApertureScale=4.0;



//+++++++++++++++++++++++++++++
//external parameters, do not modify
//+++++++++++++++++++++++++++++
//keyboard controlled temporary variables (in some versions exists in the config file). Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. By default all set to 1.0
float4   tempF1; //0,1,2,3
float4   tempF2; //5,6,7,8
float4   tempF3; //9,0
//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float4   ScreenSize;
//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4   Timer;
//changes in range 0..1, 0 means that night time, 1 - day time
float   ENightDayFactor;
//changes 0 or 1. 0 means that exterior, 1 - interior
float   EInteriorFactor;
//adaptation delta time for focusing
float   FadeFactor;
//fov in degrees
float   FieldOfView;



//textures
texture2D texColor;
texture2D texDepth;
texture2D texNoise;
texture2D texPalette;
texture2D texFocus; //computed focusing depth
texture2D texCurr; //4*4 texture for focusing
texture2D texPrev; //4*4 texture for focusing

sampler2D SamplerColor = sampler_state
{
   Texture   = <texColor>;
   MinFilter = LINEAR;
   MagFilter = LINEAR;
   MipFilter = NONE;//NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

sampler2D SamplerDepth = sampler_state
{
   Texture   = <texDepth>;
   MinFilter = POINT;
   MagFilter = POINT;
   MipFilter = NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

sampler2D SamplerNoise = sampler_state
{
   Texture   = <texNoise>;
   MinFilter = POINT;
   MagFilter = POINT;
   MipFilter = NONE;//NONE;
   AddressU  = Wrap;
   AddressV  = Wrap;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

sampler2D SamplerPalette = sampler_state
{
   Texture   = <texPalette>;
   MinFilter = LINEAR;
   MagFilter = LINEAR;
   MipFilter = NONE;//NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

//for focus computation
sampler2D SamplerCurr = sampler_state
{
   Texture   = <texCurr>;
   MinFilter = LINEAR;
   MagFilter = LINEAR;
   MipFilter = LINEAR;//NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

//for focus computation
sampler2D SamplerPrev = sampler_state
{
   Texture   = <texPrev>;
   MinFilter = LINEAR;
   MagFilter = LINEAR;
   MipFilter = NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};
//for dof only in PostProcess techniques
sampler2D SamplerFocus = sampler_state
{
   Texture   = <texFocus>;
   MinFilter = LINEAR;
   MagFilter = LINEAR;
   MipFilter = NONE;
   AddressU  = Clamp;
   AddressV  = Clamp;
   SRGBTexture=FALSE;
   MaxMipLevel=0;
   MipMapLodBias=0;
};

struct VS_OUTPUT_POST
{
   float4 vpos  : POSITION;
   float2 txcoord : TEXCOORD0;
};

struct VS_INPUT_POST
{
   float3 pos  : POSITION;
   float2 txcoord : TEXCOORD0;
};



////////////////////////////////////////////////////////////////////
//begin focusing code
////////////////////////////////////////////////////////////////////
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_Focus(VS_INPUT_POST IN)
{
   VS_OUTPUT_POST OUT;

   float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);

   OUT.vpos=pos;
   OUT.txcoord.xy=IN.txcoord.xy;

   return OUT;
}



//SRCpass1X=ScreenWidth;
//SRCpass1Y=ScreenHeight;
//DESTpass2X=4;
//DESTpass2Y=4;
float4 PS_ReadFocus(VS_OUTPUT_POST IN) : COLOR
{
   float2 uvsrc=IN.txcoord.xy;

   const float2 offset[4]=
   {
      float2(0.0, 0.3),
      float2(0.0, -0.3),
      float2(0.3, 0.0),
      float2(-0.3, 0.0)
   };

   float res=tex2D(SamplerDepth, uvsrc).x;
   for (int i=0; i<4; i++)
   {
      uvsrc.xy=offset[i];
      uvsrc.xy+=IN.txcoord;
      res+=tex2D(SamplerDepth, uvsrc).x;
   }
   res*=0.2;

   return res;
}



//SRCpass1X=4;
//SRCpass1Y=4;
//DESTpass2X=4;
//DESTpass2Y=4;
float4 PS_WriteFocus(VS_OUTPUT_POST IN) : COLOR
{
   float2 uvsrc=0.0;//IN.txcoord0.xy;

   //const float pixsizex=4.0;
//   uvsrc.xy-=(0.5+0.0625)/4.0;
//   const float step=0.125/4.0;
   float   pos=0.0001;
   float   res=0.0;
   float   curr=0.0;
   float   prev=0.0;
   float   currmax=0.0;
   float   prevmax=0.0;
   for (int ix=0; ix<16; ix++)
   {
      float   tcurr=tex2D(SamplerCurr, (uvsrc.xy*0.25+0.125)).x;//the same for all 4 pixels
      float   tprev=tex2D(SamplerPrev, (uvsrc.xy*0.25+0.125)).x;//the same for all 4 pixels
      currmax=max(currmax, tcurr);
      prevmax=max(prevmax, tprev);
      curr+=tcurr;
      prev+=tprev;
      uvsrc.x+=1.0;
      if (uvsrc.x>4.0)
      {
         uvsrc.x=0.0;
         uvsrc.y+=1.0;
      }
   }
   curr*=0.0625;
   prev*=0.0625;

   res=lerp(prev, curr, saturate(FadeFactor));//time elapsed factor
   res=max(res, 0.0);

   return res;
}



//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
technique ReadFocus
{
   pass P0
   {
      VertexShader = compile vs_3_0 VS_Focus();
      PixelShader  = compile ps_3_0 PS_ReadFocus();

      ZEnable=FALSE;
      CullMode=NONE;
      ALPHATESTENABLE=FALSE;
      SEPARATEALPHABLENDENABLE=FALSE;
      AlphaBlendEnable=FALSE;
      FogEnable=FALSE;
      SRGBWRITEENABLE=FALSE;
   }
}



technique WriteFocus
{
   pass P0
   {
      VertexShader = compile vs_3_0 VS_Focus();
      PixelShader  = compile ps_3_0 PS_WriteFocus();

      ZEnable=FALSE;
      CullMode=NONE;
      ALPHATESTENABLE=FALSE;
      SEPARATEALPHABLENDENABLE=FALSE;
      AlphaBlendEnable=FALSE;
      FogEnable=FALSE;
      SRGBWRITEENABLE=FALSE;
   }
}
////////////////////////////////////////////////////////////////////
//end focusing code
////////////////////////////////////////////////////////////////////



//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
{
   VS_OUTPUT_POST OUT;

   float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);

   OUT.vpos=pos;
   OUT.txcoord.xy=IN.txcoord.xy;

   return OUT;
}



//1 blur
float4 PS_ProcessPass1(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
   float4 res;
   float2 coord=IN.txcoord.xy;

   float4 origcolor=tex2D(SamplerColor, coord.xy);

   float2 offset[16]=
   {
    float2(1.0, 1.0),
    float2(-1.0, -1.0),
    float2(-1.0, 1.0),
    float2(1.0, -1.0),

    float2(1.0, 0.0),
    float2(-1.0, 0.0),
    float2(0.0, 1.0),
    float2(0.0, -1.0),

    float2(1.41, 0.0),
    float2(-1.41, 0.0),
    float2(0.0, 1.41),
    float2(0.0, -1.41),

    float2(1.41, 1.41),
    float2(-1.41, -1.41),
    float2(-1.41, 1.41),
    float2(1.41, -1.41)
   };

   float4 tcol=origcolor;
   float2 invscreensize=ScreenSize.y;
   invscreensize.y*=ScreenSize.w;
   invscreensize*=EBlurSamplingRange;
   for (int i=0; i<16; i++)
   {
      float2 tdir=offset[i].xy;
      coord.xy=IN.txcoord.xy+tdir.xy*invscreensize;
      float4 ct=tex2D(SamplerColor, coord.xy);

      tcol+=ct;
   }
   tcol*=0.05882353;
   res.xyz=tcol.xyz;


   float   scenedepth=tex2D(SamplerDepth, IN.txcoord.xy).x;
//   float   scenefocus=tex2D(SamplerFocus, IN.txcoord.xy+0.125).x;
   float   scenefocus=tex2D(SamplerFocus, 0.6125).x;
   float   position=EApertureScale*abs(scenedepth-scenefocus);
   res.xyz=lerp(origcolor, res.xyz, saturate(position)*pow(tempF2,4));
//res.xyz=origcolor;

res=5*frac(0.005/(1-scenedepth));

   res.w=1.0;
   return res;
}



//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
technique PostProcess
{
   pass P0
   {

      VertexShader = compile vs_3_0 VS_PostProcess();
      PixelShader  = compile ps_3_0 PS_ProcessPass1();

      DitherEnable=FALSE;
      ZEnable=FALSE;
      CullMode=NONE;
      ALPHATESTENABLE=FALSE;
      SEPARATEALPHABLENDENABLE=FALSE;
      AlphaBlendEnable=FALSE;
      StencilEnable=FALSE;
      FogEnable=FALSE;
      SRGBWRITEENABLE=FALSE;
   }
}

_________________
i5-4690k, 16Gb RAM, GTX 1060 6Gb, X-Fi Titanium, Win7 x128
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
Tomoko
PostPosted: 23 Aug 2014, 14:46 
Offline

Joined: 22 Aug 2014, 10:41
Posts: 4
Yes I see black and white gradients with DOF enabled and the file you posted.

Thanks for helping to solve this issue.


Top
 Profile  
 
PostPosted: 23 Aug 2014, 16:31 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
Then mod works properly, in general, so it's not bFloatingPointTarget issue and not antialiasing. Just presets, external shaders, driver bug. But with all my default files this should not happen. Post screenshot of your game folder files, of course if you run the mod with my setting.

_________________
i5-4690k, 16Gb RAM, GTX 1060 6Gb, X-Fi Titanium, Win7 x128
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
PostPosted: 24 Aug 2014, 12:42 
Offline

Joined: 22 Aug 2014, 10:41
Posts: 4
Here's the list of files for the main Skyrim folder and the enbseries folder inside it (taken with cygwin on Windows).
enbeffectprepass.fx.debug is the file you posted a few post above.

Code:
$ ls -l . enbseries
.:
total 22888
drwx------+ 1 bob None        0 Aug 22 00:59 _sample_enbraindrops
-rwx------+ 1 bob None   165304 Nov 11  2011 atimgpud.dll
-rwx------+ 1 bob None   214016 Nov 11  2011 binkw32.dll
-rwx------+ 1 bob None      329 Feb  6  2013 ControlMap_Custom.txt
-rwx------+ 1 bob None   946688 Aug 21 22:36 d3d9.dll
drwx------+ 1 bob None        0 Aug 22 02:22 Data
-rwx------+ 1 bob None    10019 Aug 22 00:59 enbbloom.fx
-rwx------+ 1 bob None    16472 Aug 22 00:59 enbeffect.fx
-rwx------+ 1 bob None    10860 Aug 22 00:59 enbeffectprepass.fx
-rwx------+ 1 bob None     9178 Aug 23 16:40 enbeffectprepass.fx.debug
-rwx------+ 1 bob None   450560 Aug 23 11:58 enbhost.exe
-rwx------+ 1 bob None     8000 Aug 22 00:59 enblens.fx
-rwx------+ 1 bob None    68700 Aug 22 00:59 enblensmask.png
-rwx------+ 1 bob None     1558 Aug 23 12:00 enblocal.ini
drwx------+ 1 bob None        0 Aug 23 16:39 enbseries
-rwx------+ 1 bob None    20551 Aug 23 16:48 enbseries.ini
-rwx------+ 1 bob None     8993 Aug 22 00:59 enbsunsprite.fx
-rwx------+ 1 bob None   262188 Aug 22 00:59 enbsunsprite.tga
-rwx------+ 1 bob None      365 Aug 21 22:36 FixForBrightObjects.txt
-rwx------+ 1 bob None     1159 Nov 11  2011 high.ini
-rwx------+ 1 bob None      463 Aug 21 22:36 INSTALL.txt
-rwx------+ 1 bob None     1257 Aug 23 16:51 installscript.vdf
-rwx------+ 1 bob None     1429 Aug 22 00:59 license_en.txt
-rwx------+ 1 bob None     1765 Aug 22 00:59 license_ru.txt
-rwx------+ 1 bob None       26 Feb  6  2013 log.log
-rwx------+ 1 bob None     1132 Nov 11  2011 low.ini
-rwx------+ 1 bob None     1150 Nov 11  2011 medium.ini
-rwx------+ 1 bob None     1548 Aug 21 22:36 ParallaxMod.txt
-rwx------+ 1 bob None     4453 Mar  7  2012 readme.txt
-rwx------+ 1 bob None    38080 Aug 22 00:59 readme_en.txt
drwx------+ 1 bob None        0 Feb  1  2013 reslists
-rwx------+ 1 bob None   723456 Jul  8 06:06 skse_1_9_32.dll
-r-x------+ 1 bob None     8315 Jun 29 20:47 skse_docs.txt
-rwx------+ 1 bob None   134144 Jul  8 06:04 skse_loader.exe
-r-x------+ 1 bob None     5033 Aug 20  2012 skse_papyrus_docs.txt
-r-x------+ 1 bob None     5988 Jun 29 20:47 skse_readme.txt
-rwx------+ 1 bob None   125440 Jul  8 06:04 skse_steam_loader.dll
-r-x------+ 1 bob None    15939 Jul  8 06:00 skse_whatsnew.txt
drwx------+ 1 bob None        0 Aug 23 11:34 Skyrim
-rwx------+ 1 bob None     1055 Nov 11  2011 Skyrim_default.ini
-rwx------+ 1 bob None  1911120 Mar  7  2012 SkyrimLauncher.exe
-rwx------+ 1 bob None   120616 Feb  4  2012 steam_api.dll
-rwx------+ 1 bob None 18024240 May  9  2013 TESV.exe
-rwx------+ 1 bob None     1181 Nov 11  2011 VeryHigh.ini

enbseries:
total 101
-rwx------+ 1 bob None  2634 Aug 22 00:59 _weatherlist.ini
-rwx------+ 1 bob None 16361 Aug 22 00:59 aaa.ini
-rwx------+ 1 bob None 16361 Aug 22 00:59 bbb.ini
-rwx------+ 1 bob None    28 Aug 21 23:14 enbbloom.fx.ini
-rwx------+ 1 bob None   417 Aug 21 23:14 enbeffect.fx.ini
-rwx------+ 1 bob None    36 Aug 21 23:14 enbeffectprepass.fx.ini
-rwx------+ 1 bob None 60928 Aug 21 23:00 enbhelper.dll
-rwx------+ 1 bob None    27 Aug 21 23:14 enblens.fx.ini
-rwx------+ 1 bob None    59 Aug 21 23:14 enbsunsprite.fx.ini



Top
 Profile  
 
PostPosted: 24 Aug 2014, 16:31 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
Totally fine, nothing suspicious. You can try to delete _weatherlist.ini, but this is not the problem for sure. With my default files no reason to show me their content. Don't know what to suggest.

Btw, FixForBrightObjects.txt and ParallaxMod.txt are just text files, you don't need them.

_________________
i5-4690k, 16Gb RAM, GTX 1060 6Gb, X-Fi Titanium, Win7 x128
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group