[Skyrim] SMAA 1x for 0.251+

share shaders here
Post Reply
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

[Skyrim] SMAA 1x for 0.251+

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 1508 times
file history:
Sep/30/2016
**initial upload
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: [Skyrim] SMAA 1x for 0.251+

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.

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [Skyrim] SMAA 1x for 0.251+

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.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
Posts: 2
Joined: 23 Jul 2017, 17:56
Location: Russia

Re: [Skyrim] SMAA 1x for 0.251+

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.

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [Skyrim] SMAA 1x for 0.251+

the image link is broken.

and what is your techniques setup?
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17566
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: [Skyrim] SMAA 1x for 0.251+

_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [Skyrim] SMAA 1x for 0.251+

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.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
Posts: 2
Joined: 23 Jul 2017, 17:56
Location: Russia

Re: [Skyrim] SMAA 1x for 0.251+

Thanks, now it works. My inattention is to blame. I checked all the float variables except the texture2D variables.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 17566
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: [Skyrim] SMAA 1x for 0.251+

No, i increased amount of passes to 128 in new version
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [Skyrim] SMAA 1x for 0.251+

That's amazing!
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply