Welcome, Guest.
Username: Password: Remember me

TOPIC: Ganossa's GemFX/ReShade Assistant/Framework Dev Blog

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #1

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Work Done::
- Ported Simple Motion Blur Shader
- Implemented A Generic Algorithm To Find The Brightest Pixel on Screen
- Implemented A Sample Algorithm To Derive Normals From Depth Texture (thanks to Ceejay's reference) for further use
- Implemented/Ported The Advanced Generic Motion Blur Algorithm (DX11) From GEMFX
- Implemented/Ported Smart GEMFX Blur Algorithm
- Designed A First Team - Friendly FrameWork Concept For ReShade Shader Suites
- Implemented/Ported First GEMFX Ambient Light Algorithm
- Implemented A Generic Algorithm For Eye Adaptation And Day/Night Detection
- Implemented/Ported DX11 GEMFX Ambient Light Algorithm
- Implemented/Ported DX11 God Ray Algorithm
- Implemented/Ported DX11 Natural Light Algorithm

Currently Working On::
- Testing ReShade Language Features (thanks Crosire for all the important information)
- Port Of Advanced GEMFX Lightning Features
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: Wicked Sick, Omnipotus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #2

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Thanks to many quick introductions to the ReShade shader language extensions by Crosire I was able to successfully port the first shader which lets me test how easy/hard it will be to port my other shaders.

The Simple Motion Blur Shader (GEMFX DX9) port is therefore done :cheer:

Lets show the progress on pictures.
Not much to see though with the first shader :P
Last Edit: 1 year 10 months ago by Ganossa.
The topic has been locked.

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #3

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Implemented a first (but already very fast) proof of concept for a generic algorithm to find the brightest pixel on screen::

https://www.youtube.com/watch?v=wyPJD2deap4
Last Edit: 1 year 10 months ago by Ganossa.
The topic has been locked.

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #4

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Thanks to Ceejay who pointed us yesterday to algorithm that derives normals from depth textures, I did a sample implementation that shows the vanilla picture (left), ReShade + own algorithm normals (middle) and ReShade + enb algorithm normals (right). Both algorithms might be valuable for different things.

https://www.youtube.com/watch?v=vnQ4nJM7VOE
The topic has been locked.
The following user(s) said Thank You: Wicked Sick, strelokgunslinger

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #5

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Implemented/ported the advanced generic motion blur algorithm (DX11) from GEMFX::

https://www.youtube.com/watch?v=PmEPs5iJvKY
The topic has been locked.

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #6

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
I successfully ported GEMFX's SMARTBlur :cheer: (with some improvements)
The topic has been locked.
The following user(s) said Thank You: Wicked Sick, strelokgunslinger

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #7

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
As a result of yesterdays discussion in the team we concluded to organize the entirety of shaders in more distinct modules. Therefore, I designed a first framework which should allow a smooth combination of shader suites and at the same time a simple transition for everyone to apply our newly discussed concept. After reviewing the design, we will most likely explain how that framework will work. Stay tuned :side:
Last Edit: 1 year 10 months ago by Ganossa.
The topic has been locked.

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 10 months ago #8

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
The New ReShade Framework

[Binary Folder]
The binary folder contains the game specific ReShade binary file, the upcoming ReShade_Configurator and the licence/readme files. The ReShade.fx file moved to another folder, more information to this change in the following sections.

..binary folder..



[ReShade Folder]
The ReShade folder contains core files and optional effect modules that combine all the effects the user can select. The CustomFX folder can be used by any shader developer to distribute and develop his custom effects. The remaining three folders will contain a wide range of distinct base effects that can be useful for any preset developer::
The GemFX module (by LuciferHawk) comprises all lightning effects and probably also motion blur effects.
The McFX module (by Marty McFly) comprises all depth of field and screen space ambient occlusion effects.
The SweetFX module (by Ceejay) comprises all color correction and any other cool effects that are not covered by GemFX and McFX.

..ReShade folder..



[Core Folder]
The core folder contains all global resources used by any other shader module. Therefore, the ReShade.fx shader is a shared shader, which combines effects from the 4 effect modules (CustomFX, GemFX, McFx, SweetFX) that are able to share similar variables and samplers. Therefore, only those effects should be shared, which do not use up too many samplers. The new structure of the framework file also allows for custom ordering of any effect in the shared ReShade.fx shader. To enable shared resources and effects, it is necessary to assign specific IDs for naming (e.g. RFX (global), CFX (custom)) to each individual module uses .

..core folder..


..ReShade.fx..
/*-----------------------------------------------------------.
  /               global/ReShade Suite (Id:: RFX)               /
  '-----------------------------------------------------------*/
//Global Variables
#define RFX_pixelSize float2(1.0f/BUFFER_WIDTH, 1.0f/BUFFER_HEIGHT)

//Global Textures
texture2D RFX_backbufferTex : COLOR;

//Global Samplers
sampler2D RFX_backbufferColor { Texture = RFX_backbufferTex; };

//Vertex Shader
void RFX_VS_PostProcess(in uint id : SV_VertexID, out float4 pos : SV_Position, out float2 texcoord : TEXCOORD)
{
	texcoord.x = (id == 2) ? 2.0 : 0.0;
	texcoord.y = (id == 1) ? 2.0 : 0.0;
	pos = float4(texcoord * float2(2.0, -2.0) + float2(-1.0, 1.0), 0.0, 1.0);
}

   /*-----------------------------------------------------------.
  /                 customFX Suite (Id:: CFX)                   /
  '-----------------------------------------------------------*/
#include "ReShade\CustomFX\CFX_settings.cfg" 		//Distinct settings of CustomFX suite
#include "ReShade\CustomFX\Shaders\CFX_sUtil_shader.h" 	//Stuff all/most of CustomFX shared shaders need
#if (USE_CFX_sMB == 1)
	#include "ReShade\CustomFX\Shaders\CFX_sCustom_shader.h"
#endif

   /*-----------------------------------------------------------.
  /                   GemFX Suite (Id:: GFX)                    /
  '-----------------------------------------------------------*/
#include "ReShade\GemFX\GFX_settings.cfg" 		//Distinct settings of GemFX suite
#include "ReShade\GemFX\Shaders\GFX_sUtil_shader.h" 	//Stuff all/most of GemFX shared shaders need
#if (USE_GFX_sMB == 1)
	#include "ReShade\GemFX\Shaders\GFX_sMB_shader.h"
#endif

   /*-----------------------------------------------------------.
  /                    McFX Suite (Id:: MFX)                    /
  '-----------------------------------------------------------*/
#include "ReShade\McFX\MFX_settings.cfg"		//Distinct settings of McFX suite
#include "ReShade\McFX\Shaders\MFX_sUtil_shader.h" 	//Stuff all/most of McFX shared shaders need
#if (USE_MFX_sMagicDoF == 1)
	#include "ReShade\McFX\Shaders\MFX_sMagicDoF_shader.h"
#endif

   /*-----------------------------------------------------------.
  /                  SweetFX Suite (Id:: SFX)                   /
  '-----------------------------------------------------------*/
#include "ReShade\SweetFX\SFX_settings.cfg"		//Distinct settings of SweetFX suite
#include "ReShade\SweetFX\Shaders\SFX_sUtil_shader.h" 	//Stuff all/most of SweetFX shared shaders need
#if (USE_SFX_sCRT == 1)
	#include "ReShade\SweetFX\Shaders\SFX_sCRT_shader.h"
#endif

   /*-----------------------------------------------------------.
  /                    ReShade Shared Passes                    /
  '-----------------------------------------------------------*/
//user presets can have different ordering of shaders here which will later be supported by the configurator
//all also ordering of ReShade.fx, Custom.fx, Gem.fx, Mc.fx and Sweet.fx shaders in source should be supported
technique RFX_shared < enabled = true; >
{
	#if (USE_CFX_sCustom == 1)
		#include "ReShade\CustomFX\Shaders\CFX_sCustom_pass.h"
	#endif

	#if (USE_GFX_sMB == 1)
		#include "ReShade\GemFX\Shaders\GFX_sMB_pass.h"
	#endif

	#if (USE_MFX_sMagicDoF == 1)
		#include "ReShade\McFX\Shaders\MFX_sMagicDoF_pass.h"
	#endif

	#if (USE_SFX_sCRT == 1)
		#include "ReShade\SweetFX\Shaders\SFX_sCRT_pass.h"
	#endif
}


[Effect Module Folders]
All module folders are structured in the same manner::
They contain a <moduleID>_settings.cfg file which allows module specific options and toggling of effects. Their effects are stored in the Shaders folder and are separated into shader and pass files to allow reordering in the shared ReShade.fx file. An 's' indicates that an effect is used in the shared ReShade.fx file. A utility file can further be used to specify values that are valid for most of the shared shaders in a module.
The <module_name>.fx file is a not shared shader file which allows more demanding/complex effects to use another 16 samplers.

..module folder..


..shader folder..
Last Edit: 1 year 10 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: crosire, SunBroDave, Nekrik, MaxG3D, SAM609, brussell, Omnipotus, Constantine PC, Iris Lux, BrandonHortman and this user have 1 others thankyou

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 9 months ago #9

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Ambient Light Port Progress B)

:woohoo: So, I was finally able to finish a first version of the ported Ambient Light shader. I tried a lot with my DX11 implementation and also got some tips from Ceejay and Crosire to workaround the problems but in the end DX9 boundaries for DX11 implementations will just limit any future ideas and render it useless. Therefore, I decided to port my DX9 implementation instead which lacked some quality compared to DX11 but also had some advantages considering soft lenses. Nevertheless, I struggled also with that port which made me re-implement quiet a few things. The results however are splendid :lol: I could increase the overall quality, add some features from the not yet released natural light shader and integrate simple bloom into the composition. The current version is far from being tweaked perfectly and also most values are not kept in check but visually, it got far beyond previous DX9 implementations::

In the teaser I also used the previously ported motion blur and blur shader with some depth information so you get an idea how far I came and because SD looks rather dull otherwise. However, note that blur/DoF will be part of Marty's shader suit ;) . For the same reason I also left out any color correction cause this will be the part of Ceejay's SweetFX :)

Anyway, its already 9 am here, so I will probably sleep all day now :silly: Have a nice one guys :side:
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: crosire, Wicked Sick, SAM609, Omnipotus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 9 months ago #10

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Sort Of Eye Adaptation Algorithm B)

I implemented a conceptual generic sort of eye adaptation algorithm. It will control all lightning effects. "Sort of" eye adaptation because this algorithm can do much more than just the usual mimic of eye adjustments. It is also able to generically detect night/day time and therefore adjust the lightning accordingly.
I will show more of it soon, stay tuned :lol:
The topic has been locked.
The following user(s) said Thank You: crosire, GroinShooter, sajittarius, SAM609, klotim, GerahJiwo, jas01

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #11

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
DX11 Ambient Light & God Ray Port

Due to some problems/limitations with the previous DX9 port of GEMFX, I had to redo a bunch of work. This and some work on another project are the reason there was some delay in news, my apologies :lol:
However, so far everything worked out just fine and as always not everything previously done is lost as I can use all newly gained knowledge and advancements in the current DX11 port. The result is a further visually improved ambient light shader (with natural light and god rays).
The following video showcases the current state using also basic DoF, motion blur, grain shader. However, there are no color changes applied, all you see is the dynamic light in action :cheer:
Enjoy!
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: klotim, jas01, Aelius Maximus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #12

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
God Rays, Particle Effects, Gradient Mask for SplitScreen and Borders

Since some people requested a showcase to the above effects, here it is (but very WIP)::
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: crosire, sajittarius, klotim, Aelius Maximus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #13

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Framework Update

So I finally ported the entire SweetFX stack into the SweetFX suite of the new ReShade framework, while allowing at the same time arbitrary reordering of its shaders. YaY :cheer:
I also started porting ME shaders but that will take some more time before I will be done with it. (the last update to ME 1.1.111 helped a lot)
So far the framework maintains the original performance, which -I hope- help everyone to get more attached to it.
Also the framework structure changed again to fit the taste of everyone involved. Thanks to Crosire we might even introduce namespaces with the next ReShade update which would further ease the work with the framework (thanks Crosire ;) )

In the following you can see effects from all suites (SweetFX, McFX and GemFX) applied to Sleeping Dogs.


Stay tuned guys :side:
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: MaxG3D, Alex_outer, BillyAlt, klotim, BrandonHortman, jas01, jmp909, Aelius Maximus, GhostRider521

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #14

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Split Screen Algorithms

I quickly implemented a few split screen algorithms for the new framework. Since I often edit my own screenshots, I actually felt myself I would need something like this to skip the editor for most use cases :silly:
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: crosire, JPulowski, Alex_outer, SpinelessJelly, klotim, jas01, TinchO, GhostRider521, PetkaGtA

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #15

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
ME/McFX SSAO Algorithms

All of Marty McFly's latest and amazing SSAO techniques made it into the McFX suite now :cheer:
The port also helps with noticing what is important to mention in the developer tutorial.

A little break, then its time to finish the DoF port and after that I have also some time to finish my own stuff...

---EDIT---
--McFX Implementation is DONE--

We are almost there guys and gals. :side:
Stay tuned!
Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: SunBroDave, MaxG3D, Alex_outer, SAM609, Aelius Maximus, GhostRider521

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #16

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
ReShade Framework, final Test

The framework implementation is done :woohoo: and we run the last few checks.
My first AL implementation made it barely into the framework (for the other one I need a little more time).
We are very busy with setting everything up and I hope you can enjoy our work soon enough :lol:

Here one last sneak peak on the final GemFX ambient light shader, together with other shader from the suite. (all default settings)

I did not have any time for music editing or similar :P
The topic has been locked.
The following user(s) said Thank You: Alex_outer, BrandonHortman, jas01, GhostRider521

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #17

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Eye Adaptation

As planned, I continued working on my eye adaptation algorithm which was already (partly) introduced with the current releases of my ambient light shader. However, there have been some issues that made it not as effective as is should have been. Therefore, I changed parts of the previous algorithm (now plus exponential dependencies) and also added true eye adaptation based on the original image in conjunction with ambient light adaptation (they kind of balance each other).

I hope later today, I can give you a short showcase on how it works/looks.

Stay tuned! :side:
The topic has been locked.
The following user(s) said Thank You: Wicked Sick, SunBroDave, BillyAlt

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #18

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Eye Adaptation #2

Sneak Peak::
On the top of the screen you can see the light detected by the eye adaptation algorithm (orange) and the -by the algorithm- selected adaptation amount (green).

Note that I did not use any color correction in this video. Due to AL's eye adaptation, one could say AL replaces the original lighting. Further, eye adaptation is a good way to keep the brightness of some games in check (especially when applying more effects).
Last Edit: 1 year 7 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: crosire, SunBroDave, GERgta, BrandonHortman, jas01, Aelius Maximus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #19

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Fusion:: Ambient Light (GemFX) - HeatHaze (McFX)

Very early WIP :blush: but you get the point
Last Edit: 1 year 7 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: BrandonHortman, jas01, TinchO, Aelius Maximus

Lucifer's GemFX/Mediator/Framework Dev Blog 1 year 8 months ago #20

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Ambient Light Controled HeatHaze

Some improvements on the algorithm in motion. If it gets better like this, I might be able to release something with the next update? :woohoo:

Last Edit: 1 year 8 months ago by Ganossa.
The topic has been locked.
The following user(s) said Thank You: BrandonHortman, jas01, YOBA, jmp909