Page 1 of 1

[Skyrim] SMAA 1x for 0.251+

Posted: 29 Sep 2016, 19:00
by kingeric1992
SMAA 1x for skyrim enbseries 0.251+
Image

Code: Select all

/*===========================================================================================
 *                                 file descriptions
=============================================================================================
 * implemented to effect.txt by kingeric1992 for TESV Skyrim ENB mod 0.288+
 *                                                                      update.  Sep/29/2016
 *      for more detail, visit http://enbseries.enbdev.com/forum/viewtopic.php?f=7&t=5232
 *
 ** Only SMAA 1x is avaliable
 *
 * SMAA T2x requires moving camera in sub pixel jitters.
 * SMAA S2x requires MSAA 2x buffer
 * SMAA 4x  requires both of the above
 *
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 * Usage:
 * add
 *          #include "enbsmaa.fx"
 *                                     at the end of effect.txt prior to any other techniques.
 * To chain other techniques after it, set their name to PostProcess4, PostProcess5, ...etc 
 *
==============================================================================================
 *                              Settings
============================================================================================*/

#define SMAA_PRESET      3  // 0 == low, 1 == medium, 2 == high, 3 == ultra, 4 == custom preset, 5 == runtime UI tweak
#define SMAA_PREDICATION 1  // 0 == off, see descriptions below
#define SMAA_EDGE_MODE   0  // 0 == color(quality), 1 == luma, 2 == depth(performance)
#define SMAA_DEBUG       1  // 0 == off, enable additional options to display texture in each stage
Warning! preset 5 (the one with UI) will cause extended compiling time. Recommend to switch to custom preset after tweaking.
Also, the texture resource here is dx9 specific and is different to the one in Fallout4.

The file also contains a effect.txt to demonstrate the usage.
enb smaa.zip
Update: 9.30.2016
(56.04 KiB) Downloaded 1475 times
file history:
Sep/30/2016
**initial upload

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 30 Sep 2016, 01:05
by Marty McFly
Awesome! Knew this was coming after you asked Boris about Stencil buffers in the other thread.
Just curious, as I'm not familiar with Skyrim ENB feature set, what prevents you from making it compatible to ENB versions below 0.251?

Also if you find out which GUI variable causes the compile time you can maybe fool the compiler. Loops for example, for (int i=0; i < GUIvar && i < hardcodedlimit; i++) is from my tests a reliable tool to control the compilation time for loops that can only take a low iteration count without going crazy.

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 30 Sep 2016, 03:02
by kingeric1992
texOriginal is the minimum requirement, according the the update history, 0.251 is the first one to introduce that.

About compiling time, I'm still prefer not to change reference header for consistency and the UI is really not that useful in this case but to help setup the effect.

Chances are the UI is just gonna sit there untouched through out the playthrough, wasting FPS out of nothing.
I mean, ppl are using this with LOW MEDIUM HIGH ULTRA for years...and those presets are actually doing pretty well.


Btw, the statement for loop control is [unroll(limit)], the && i<limit trick might cause trouble on some machine.
Got a feedback on dof shader from preset author awhile back.

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 23 Jul 2017, 19:22
by Andrew
Hi, thanks for sharing, it's a excellent job! Unlike a proxy SMAA, it does not affect the text, and the UI mode with "Tex" is killer feature. I can configure the filtering as I want!

I tried to add your file to "Ultimate Shader Addon for ENB" according to the instructions: "add #include "enbsmaa.fx" at the end of effect.txt prior to any other techniques. To chain other techniques after it, set their name to PostProcess4, PostProcess5, ...etc".
And I got the following:
Image

Your example "effect.txt" works great.
Is it possible to do this?
Thanks again.

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 08:51
by kingeric1992
the image link is broken.

and what is your techniques setup?

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 10:31
by ENBSeries

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 13:00
by kingeric1992
thx, boris. guess it was region thing.

Anyway, you're missing these lines,

Code: Select all

Texture2D texDepth;
Texture2D texOriginal;
Add them before including the .fx would fix it.

Code: Select all

Texture2D texDepth;
Texture2D texOriginal;

#include "enbsmaa.fx"
Also, the ULTIMATE SHADER ADDON has 8 pass already, adding additional 3 pass from smaa will exceed the pass limit.

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 14:59
by Andrew
Thanks, now it works. My inattention is to blame. I checked all the float variables except the texture2D variables.

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 19:18
by ENBSeries
No, i increased amount of passes to 128 in new version

Re: [Skyrim] SMAA 1x for 0.251+

Posted: 24 Jul 2017, 21:07
by kingeric1992
That's amazing!