Please use english language
It is currently 24 Jun 2017, 20:32

All times are UTC





Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: 11 Dec 2015, 15:58 
Offline
*sensei*

Joined: 05 Apr 2014, 10:29
Posts: 484
Location: Taiwan
SMAA 1x for 0.288+
Image
Code:
/*===========================================================================================
 *                                 file descriptions
=============================================================================================
 * implemented to enbeffectpostpass.fx by kingeric1992 for Fallout 4 ENB mod 0.288+
 *                                                                      update.  Sep/29/2016
 *      for more detail, visit http://enbseries.enbdev.com/forum/viewtopic.php?f=7&t=4721
 *
 ** 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
 *              #define  SMAA_UINAME 0  // 1 == use smaa method independently
 *              #define  PASSNAME0   targetname
 *              #define  PASSNAME1   targetname1
 *              #define  PASSNAME2   targetname2
 *              #include "enbsmaa.fx"
 *                                          at the end of enbeffectpostpass.fx.
 * where the targetname(N) is follow up the technique chain and increment to one before, if
 * the last technique is called THISPASS4, then set targetname to THISPASS5 and the rest with
 * increasing index.  ( targetname index "0" is empty )
 *
 * If you wish to have SMAA as standalone effect that doesn't chain after other technique, set
 * SMAA_UINAME to 1 and have the pass index start from empty (which means "0").
 *
 * in addition, you can change internal rendertarget with :
 * (they will be cleard, so change to other texture if any of the default tex is in used to pass
 * along data, otherwise, ignore this.)
 *
 *              #define  SMAA_EDGE_TEX      texture0name   // default is RenderTargetRGB32F (only require 2bit-RG channel)
 *              #define  SMAA_BLEND_TEX     texture1name   // default is RenderTargetRGBA64 (requred RGBA [0,1] )
 *
 *                                          prior to inclueing "enbsmaa.fx"
 *
 * Loading multiple times with different PASSNAME is possible (under same name is not recommended).
 *
==============================================================================================
 *                              Settings
============================================================================================*/

#define SMAA_PRESET      5  // 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



THIS IS NOT SMAA 4x, read descriptions above. (☄◣ω◢)☄
parameter descriptions in enbsmaa.fx

Attachment:
File comment: Sep/29/2016
enb smaa.zip [63.85 KiB]
Downloaded 147 times

file history:
Dec/11/2015
**initial upload

Dec/12/2015
**hotfix on typo with rendertarget.

Sep/29/2016
**replace stencil test with alpha, (stencil is not working in previous release, which is causing some extra fps drop)
**various change in macros setup so that the file now use reference SMAA.h.
**added standalone support for enbsmaa.fx (see the demo enbeffectpostpass.fx).
**added constant setting to increase performance if UI tweaker is not required.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Last edited by kingeric1992 on 12 Jan 2017, 07:23, edited 5 times in total.

Top
 Profile  
 
Tomoko
PostPosted: 11 Dec 2015, 17:38 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 05 Mar 2012, 02:08
Posts: 1910
Location: Sweden
A wonderful addition, now there really is no reason to use ReShade ;)


Top
 Profile  
 
PostPosted: 11 Dec 2015, 17:56 
Offline
*sensei*

Joined: 05 Apr 2014, 10:29
Posts: 484
Location: Taiwan
--JawZ--
still, it doesn't apply on hud like Reshade and power armor hud looks pretty aliased.

and it can't handle thin lines (such as power cables in a distance) without some of the 4x subpixel feature.


a demo from smaa doc
Image

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 11 Dec 2015, 18:03 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 05 Mar 2012, 02:08
Posts: 1910
Location: Sweden
SMAA with ReShade, and most other effects that utilize a blur event, causes flickering. So far I have yet to see such flickering being caused when ported to ENBSeries, so that is something I could easily live with, if just to remove the flickering.
SMAA isn't handling thin lines in general very good, from my testing at least.

Just a possible solution, mix in a bit of depth functionality, close depth SMAA x1, far depth SMAA x4.
Not sure how good it would be or how the performance would be affected as this was just a quick "while-reading-comment-post" idea.


Top
 Profile  
 
PostPosted: 11 Dec 2015, 20:05 
Offline
*sensei*
User avatar

Joined: 27 Dec 2011, 21:33
Posts: 313
Location: Poland, Gdańsk
Could you send your postpass? I'm having trouble figuring out how to implement it.

_________________
OS: Windows 10
CPU: Intel Core i7 3770 @4.2GHz
RAM: DDR3 24GB 1333 MHz
GPU: GeForce GTX 980TI MSI Gaming 6GB
Sound Card: X-FI Titanium HD
Mobo: Asrock Z77 EXTREME4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor


Top
 Profile  
 
PostPosted: 11 Dec 2015, 20:47 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 05 Mar 2012, 02:08
Posts: 1910
Location: Sweden
The instructions for adding it is in the enbsmaa.fx file.

If i'm reading the instructions correct, this should be how it should look with the default enbeffectpostpass.fx.
I have not implemented it yet myself, so might have done something wrong here.


Code:
//+++++++++++++++++++++++++++++
//internal parameters, modify or add new
//+++++++++++++++++++++++++++++
#define  PASSNAME0   TemporaryTarget  // These are the additions to the file
#define  PASSNAME1   TemporaryTarget1  // These are the additions to the file
#define  PASSNAME2   TemporaryTarget2  // These are the additions to the file

-----------------------------

#include "enbsmaa.fx"  // These are the additions to the file

//+++++++++++++++++++++++++++++
//
//+++++++++++++++++++++++++++++
struct VS_INPUT_POST


Top
 Profile  
 
PostPosted: 11 Dec 2015, 21:09 
Offline
*sensei*

Joined: 05 Apr 2014, 10:29
Posts: 484
Location: Taiwan
file update fix typo. (I need to stop doing that!!)

and the place to add it: any where after this.
Code:
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Techniques are drawn one after another and they use the result of
// the previous technique as input color to the next one.  The number
// of techniques is limited to 255.  If UIName is specified, then it
// is a base technique which may have extra techniques with indexing
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


examples on integrating vanilla enbeffectpostpass.fx
Code:
// if wish to change default render target, need to set here before any enbsmaa.fx includes.
//(currently texture setting is shared between multiple includes, will come up some better idea in future update)
        #define  SMAA_EDGE_TEX      RenderTargetRGBA64     // default is RenderTargetRGB32F (only require RG channel)
        #define  SMAA_BLEND_TEX     RenderTargetRGBA64F  // default is RenderTargetRGBA64 (RGBA requred)

// set sharp amount to 0 to bypass sharpen.
        #define  PASSNAME0   Sharp1
        #define  PASSNAME1   Sharp2
        #define  PASSNAME2   Sharp3
        #include "enbsmaa.fx"


//adding it to different technique profile in same postpass:
//do not reset texture here.

        #define  PASSNAME0   TemporaryTarget3
        #define  PASSNAME1   TemporaryTarget4
        #define  PASSNAME2   TemporaryTarget5
        #include "enbsmaa.fx"





also the notations are only for chaining after others, require modification on enbsmaa.fx if you wish to use it as standalong effect.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 11 Dec 2015, 21:34 
Offline
*master*

Joined: 10 May 2015, 04:33
Posts: 143
Awesome. This was one of the things I was going to try and add. I've been reading as much as I can on writing shaders and trying to get a good resource, but they always seem to be in a different context than how we are using them. Great work by the way and I look forward to seeing what else you can do. Reading your stuff, even the Skyrim stuff, always seems to help me siphon though the noise, sometimes.


Top
 Profile  
 
PostPosted: 11 Dec 2015, 21:40 
Offline
*sensei*

Joined: 05 Apr 2014, 10:29
Posts: 484
Location: Taiwan
--JawZ-- wrote:
Just a possible solution, mix in a bit of depth functionality, close depth SMAA x1, far depth SMAA x4.


it is not that, 4x is not a term of scale, it use some of the concepts from TXAA and MSAA on top of 1x. and those require special resource besides color & depth.

_________________
Intel Xeon L5639 6C12T @3.96GHz // Gigabyte ga-x58a-ud3r// MSI GTX680 4G// 24G RAM
Flickr
YouTube


Top
 Profile  
 
PostPosted: 11 Dec 2015, 21:47 
Offline
*master*

Joined: 10 May 2015, 04:33
Posts: 143
Question, can those .dds files be placed inside the enbseries folder, or do they have to reside in the Main folder, along with the .fx files? Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 41 posts ]  Go to page 1, 2, 3, 4, 5  Next

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:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group