• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

GeDoSaTo - Downsampling from Infinity and Beyond!

Durante

Member
I believe I just fixed the memory leak I've been chasing basically ever since the Final Fantasy 13-2 release.

Fuck yeah. It's always so nice to figure out just how much of an asshat the you from a few months ago was when writing code.
 

BONKERS

Member
Figured out today that you can use GeDoSaTo with DSR.

Have only tested when using for post-processing though. (EDIT: It does work for downsampling too! Neato, this is actually a great thing for games that still have problems with only 2x2 with DSR. As DSR falls apart in quality after 2x2, 3x3 is usable but less than desireable. So you can essentially do 2 stage downsampling with DSR! Comparison > http://screenshotcomparison.com/comparison/105672 )


In a specific example, I was able to fix the horrible point scaling for 2D images in Ninja Blade, while also using GeDo Film Grain and using DSR+4xSGSSAA for AA.

http://screenshotcomparison.com/comparison/105670

^ Comparison at rendering resolution

I previously thought that Ninja Blade on PC was unplayable, well i've made great strides tonight to getting basically stable performance and patience to deal with the game's quirks (On for example is the 30FPS cap is on by default, but it's RIDICULOUSLY unstable. The game will drop into the 20s with it enabled for no reason. Where as an unlocked framerate + a 30FPS cap+1/2 refresh= no problem. The larger problem is that this is enabled by default no matter what. So you have to disable it every time you start the game. )

Which also makes me wish I knew how to do what Durante did for FFXIII/DP with Shadow maps. The highest setting here is "Average" and they are ugly as sin, low resolution, lots of aliasing and flickering issues. So i end up just disabling them.

Also: As much as I love the grain you guys ported to GeDo, sometimes i'd rather use the old SweetFX grain with my texture for it just based on the look and how it applies for example. And in the case of Ninja Blade , I can't get SweetFX to work for whatever reason when using DSR.

Here's the source for that shader> It's not as simple as adding what's here to the post.fx file right?
/**
* Copyright (C) 2012 Jorge Jimenez (jorge@iryoku.com). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holders.
*/

#include "..\..\SweetFX_preset.txt"

cbuffer UpdatedOncePerFrame {
float2 pixelSize;
float noiseIntensity;
float exposure;
float t;
}

Texture2D srcTex;
Texture3D noiseTex;

sampler2D LinearSampler {
Texture = <srcTex>;
AddressU = Clamp;
AddressV = Clamp;
MipFilter = Point; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};

sampler2D LinearSamplerWrap {
Texture = <noiseTex>;
AddressU = Wrap;
AddressV = Wrap;
AddressW = Wrap;
MipFilter = Point; MinFilter = Linear; MagFilter = Linear;
SRGBTexture = false;
};


void PassVS(float4 position : POSITION,
out float4 svposition : SV_POSITION,
inout float2 texcoord : TEXCOORD0) {
svposition = position;
}


float3 Overlay(float3 a, float3 b) {
return pow(abs(b), 2.2) < 0.5? 2 * a * b : 1.0 - 2 * (1.0 - a) * (1.0 - b);
}


float3 AddNoise(float3 color, float2 texcoord) {
float2 coord = texcoord * FilmGrainSize;
coord.x *= pixelSize.y / pixelSize.x;
//float noise = noiseTex.Sample(LinearSamplerWrap, float3(coord, t)).r;
float noise = tex2D(LinearSamplerWrap, coord + float2(t, t *4)).r;
float exposureFactor = exposure / 2.0;
exposureFactor = sqrt(exposureFactor);
float t = lerp(3.5 * noiseIntensity, 1.13 * noiseIntensity, exposureFactor);
return Overlay(color, lerp(0.5, noise, t));
}


float4 FilmGrainPS(float4 position : SV_POSITION,
float2 texcoord : TEXCOORD0) : COLOR {
float3 color = tex2D(LinearSampler, texcoord).rgb;
color = AddNoise(color, texcoord);
return float4(color, 1.0);
}


technique FilmGrain {
pass FilmGrain {
VertexShader = compile vs_3_0 PassVS();
PixelShader = compile ps_3_0 FilmGrainPS();

SRGBWriteEnable = false;
AlphaBlendEnable = false;
StencilEnable = false;
}
}
 

Durante

Member
Awesome! I wasn't using this with XIII-2 because of the crashing I saw in XIII, but now I should go back to using it. Hurray for HUDless screen shots!
That's exactly why I was hounding this bug for weeks now. Having the choice between playing FF13-2 in 20 minute intervals and restarting or not taking hudless shots is terrible!

Are there any workarounds for games with max 1080p resolution like Dynasty Warriors 8 XL?
The workaround is to write a custom plugin for GeDoSaTo. Which is almost always non-trivial, but sometimes relatively easy (pre-patch FF13) and at other times very hard (Deadly Premonition).

... as I just bought exactly that game (DW8XL) in the Steam sale with no one warning me that it's resolution locked maybe you'll get lucky.
 

gblues

Banned
When I use GeDoSaTo with Skyrim, I get a permanent "LEVEL UP" text on my HUD. It doesn't seem to be tied to any particular feature--I've tried disabling SSAO, post-processing, so the only thing it's doing is downsampling. Is there a setting to use to fix, or is it a bug?

(If it's a bug, it was in the previous version prior to today's release too).
 

Dr Dogg

Member
I've released a new version for Christmas!

It fixes a long-standing memory leak/crash issue which only really became obvious in FF13 and FF13-2. Yay stability!

Ooooh nice. Saying that outside of trying to take 8k screenshots I didn't have either crash but I probabaly was only playing in 10 min bursts :p

I'll have a look when I get back after Christmas but did you find a better hash for FF XIII-2 in the end?

As always awesome work.
 

Bebpo

Banned
That's exactly why I was hounding this bug for weeks now. Having the choice between playing FF13-2 in 20 minute intervals and restarting or not taking hudless shots is terrible!

The workaround is to write a custom plugin for GeDoSaTo. Which is almost always non-trivial, but sometimes relatively easy (pre-patch FF13) and at other times very hard (Deadly Premonition).

... as I just bought exactly that game (DW8XL) in the Steam sale with no one warning me that it's resolution locked maybe you'll get lucky.

Gotcha. Thanks for all the work you've done so far!
 

cwistofu

Member
That's exactly why I was hounding this bug for weeks now. Having the choice between playing FF13-2 in 20 minute intervals and restarting or not taking hudless shots is terrible!

The workaround is to write a custom plugin for GeDoSaTo. Which is almost always non-trivial, but sometimes relatively easy (pre-patch FF13) and at other times very hard (Deadly Premonition).

... as I just bought exactly that game (DW8XL) in the Steam sale with no one warning me that it's resolution locked maybe you'll get lucky.

It's a great game, enjoy!
 

Durante

Member
Gotcha. Thanks for all the work you've done so far!
Well, I gave it a try today, and it doesn't look like it's happening. Getting the game to render at arbitrary resolutions was easy enough, but due to the way it handles HuDs and the menu getting all those right (at least with the ideas I have now) would take days of "grinding" (that is, boring, repetitive work). I don't think that's worth it, especially since you can use SGSSAA in the game (on NV at least).

So, enjoy the only >1080p shot of DW8XL that is ever likely to exist:
dump066_framedump_pretwuna.jpg
 
Well, I gave it a try today, and it doesn't look like it's happening. Getting the game to render at arbitrary resolutions was easy enough, but due to the way it handles HuDs and the menu getting all those right (at least with the ideas I have now) would take days of "grinding" (that is, boring, repetitive work). I don't think that's worth it, especially since you can use SGSSAA in the game (on NV at least).

So, enjoy the only >1080p shot of DW8XL that is ever likely to exist:
dump066_framedump_pretwuna.jpg

Oh whoa I'm sorry to hear that DW8XL would be that much work but it's still impressive to see! :eek: Any chance you can release the plugin as-is for others to play around? After 60 hours of play I wouldn't mind a misaligned HUD at all :p
 

BONKERS

Member
Well, I gave it a try today, and it doesn't look like it's happening. Getting the game to render at arbitrary resolutions was easy enough, but due to the way it handles HuDs and the menu getting all those right (at least with the ideas I have now) would take days of "grinding" (that is, boring, repetitive work). I don't think that's worth it, especially since you can use SGSSAA in the game (on NV at least).

So, enjoy the only >1080p shot of DW8XL that is ever likely to exist:
dump066_framedump_pretwuna.jpg



I don't know if anyone ever tried, but using 4x4 OGSSAA instead of 8xSGSSAA for the game may provide better results when upscaling to higher resolutions or if someone wants decent AA but a sharper picture. That is of course, if it works. Person who reported the working flag never mentioned if they tried for OGSSAA.
 

ryan0991

Banned
This may be an odd question, but is there any way to use the screenshot functionality of Gedosato, but without using the down-sampling and without any of its graphical changes?
 

Alo81

Low Poly Gynecologist
This may be an odd question, but is there any way to use the screenshot functionality of Gedosato, but without using the down-sampling and without any of its graphical changes?

Yeah, just set your in game resolution to your monitors native resolution.
 

ryan0991

Banned
Yeah, just set your in game resolution to your monitors native resolution.
Okay let me make the question even weirder.

Is there any way to use Nvidia DSR to achieve 4k, but still use gedosato strictly for screenshots? I have to select 3840 x 2160 from the FFXIII-2 launcher for DSR to function, but that also triggers gedosato downsampling.
 

Alo81

Low Poly Gynecologist
Okay let me make the question even weirder.

Is there any way to use Nvidia DSR to achieve 4k, but still use gedosato strictly for screenshots? I have to select 3840 x 2160 from the FFXIII-2 launcher for DSR to function, but that also triggers gedosato downsampling.

Set gedosato's present resolution to 3840x2160
 

Parsnip

Member
Okay let me make the question even weirder.

Is there any way to use Nvidia DSR to achieve 4k, but still use gedosato strictly for screenshots? I have to select 3840 x 2160 from the FFXIII-2 launcher for DSR to function, but that also triggers gedosato downsampling.

Afaik GeDoSaTo overrides DSR if they both have same resolution options.
What you can do is plop something like this in the GeDoSaTo_user.ini.
Code:
clearRenderResolutions
renderResolution 5120x2880@60
renderResolution 5760x3240@60
renderResolution 7680x4320@60

This way 4K and below uses DSR and 2880p and above is gedo.
clearRenderResolutions is there so that the various resolutions from default ini are cleared before only applying the _user resolutions.

Only downside of this method is that the gedo gui is super tiny at 4K DSR.
 

Durante

Member
I don't really see the point of using DSR instead of GeDoSaTo for downsampling for a well-supported game like FF13-2. But whatever floats your boat, Parsnip posted the correct approach to doing it.

Oh whoa I'm sorry to hear that DW8XL would be that much work but it's still impressive to see! :eek: Any chance you can release the plugin as-is for others to play around? After 60 hours of play I wouldn't mind a misaligned HUD at all :p
I'll certainly not delete it, the code is there. But I don't really want to activate the plugin by default. Will have to think of a solution.
 

BONKERS

Member
I don't really see the point of using DSR instead of GeDoSaTo for downsampling for a well-supported game like FF13-2. But whatever floats your boat, Parsnip posted the correct approach to doing it.

I'll certainly not delete it, the code is there. But I don't really want to activate the plugin by default. Will have to think of a solution.

DSR has a superior filter IMO with greater ease of making sharper if you like. And ease of use in general for several things.

AND it works with HBAO+ and driver forced AA without issue or having to resort to trickery with setbacks. You can get objectively better AA and temporal stability with forced AA+DSR than any amount of playable downsampling in the most aliasing ridden games.

AND you can use GeDoSaTo at the same time for post processing if you like or if you need to force 16xAF specifically for certain scenarios.

For FFXIII specifically, 4xSGSSAA+DSR beats everything.

For games where forced or HQ enhanced AA is possible in conjunction. There is no contest. For games where it's not, GeDo is a better option due to 2x2 by itself being somewhat inadequate.

Afaik GeDoSaTo overrides DSR if they both have same resolution options.
What you can do is plop something like this in the GeDoSaTo_user.ini.
Code:
clearRenderResolutions
renderResolution 5120x2880@60
renderResolution 5760x3240@60
renderResolution 7680x4320@60

This way 4K and below uses DSR and 2880p and above is gedo.
clearRenderResolutions is there so that the various resolutions from default ini are cleared before only applying the _user resolutions.

Only downside of this method is that the gedo gui is super tiny at 4K DSR.

It doesn't override it when you set present to your desired render resolution. I mentioned this earlier but forgot to specify, and you CAN use both to mutli stage downsample as long as the GeDo Present resolution is your DSR resolution.
 
Rather off topic, but I was wondering if it's possible to enable Vsync in windowed games when Aero is disabled? Because I get a lot of stuttering when playing in windowed unless I disable Aero, but then Vsync stops working and I get tearing out the ass.
 

Dries

Member
Sooo... whenever I use DSR or GeDoSaTo to downsample Dragon Age: Origins it simultaneously shrinks my HUD to the resolution I've picked. Playing at 3840 x 2160 the HUD is so small it's unreadable. Is there a way to have the HUD like it is normally at 1080p and still be able to downsample?

Strange though, cause I thought that DSR would scale the HUD back to native resolution as a default. Guess DA:O slipped through the crack or something.
 

Durante

Member
DSR doesn't do any HuD manipulation at all. NV would be insane to even try that, you'd have to manually do it for each and every game.
 

Dries

Member
DSR doesn't do any HuD manipulation at all. NV would be insane to even try that, you'd have to manually do it for each and every game.

Still, with DA:Origins the HUD does scale in size whenever using DSR... DA: Origins is the only game I've ever seen this happen though.
 

Durante

Member
Still, with DA:Origins the HUD does scale in size whenever using DSR... DA: Origins is the only game I've ever seen this happen though.
It completely depends on the game. Most old-school PC games have HuDs taht are pixel-dependent, so more pixel = smaller HuD. Most console ports have HuDs which are always the same size.

Neither of these options is ideal, good modern PC games have a HuD size slider.
 

Dries

Member
It completely depends on the game. Most old-school PC games have HuDs taht are pixel-dependent, so more pixel = smaller HuD. Most console ports have HuDs which are always the same size.

Neither of these options is ideal, good modern PC games have a HuD size slider.

I see. Hmmm.. what to do then. There is a mod which scales the UI so let's check that out first I guess.
 
Well this is strange. I'm hunting for the HUD shader in Borderlands: The Presequel (cuz it's more convenient than bringing up the console every time) and... I'm getting weird results.

The shader I want to use has this:

SetPixelShader 2F35E200, name: UNREGISTERED_SHADER

I do believe it's the 2nd parameter I need, right? It's been a while, but I don't think I can plug "UNREGISTERED_SHADER" into my config.

(seems like every single SetPixelShader in this log file does that)
 

Alo81

Low Poly Gynecologist
Well this is strange. I'm hunting for the HUD shader in Borderlands: The Presequel (cuz it's more convenient than bringing up the console every time) and... I'm getting weird results.

The shader I want to use has this:

SetPixelShader 2F35E200, name: UNREGISTERED_SHADER

I do believe it's the 2nd parameter I need, right? It's been a while, but I don't think I can plug "UNREGISTERED_SHADER" into my config.

(seems like every single SetPixelShader in this log file does that)

Did you enable the new "track shaders" option? it's required now
 

Jumpman

Member
Just a heads up -> the link for DSfix is down on your website Durante. I've got my own copy already so I'm ok but newcomers could be screwed. You might already know this since you mentioned the DMCA strike but I thought I'd mention it anyway. :)
 
GeDoSaTo does not work with DX11 games, so no luck with Battlefield 4.

Do you actually need resolutions higher than what DSR\VSR can give you in that game? It's a tough game to run smoothly at those resolutions. In any case, there's always in-game resolution scale.
 
I haven't been keeping up with things, but is it possible to use the Dark Souls 2 bloom shader (or a generic version) on any game yet? If so how would I go about setting it up?
 

jett

D-Member
So I'm wondering about Mirror's Edge. With Gedosato I get a darker image and low-res text. I always noticed the low-res text but I just realized it also produces a less than optimal image. I'm not using any post-processing. Sup wit dat.



Using a 280X.
 
I'll certainly not delete it, the code is there. But I don't really want to activate the plugin by default. Will have to think of a solution.

Sorry for the very late reply, I totally forgot about this over the holidays D: And that's understandable, I hope you find one but if not, the game has atleast 1080p so that's something :)
 

BONKERS

Member
So I'm wondering about Mirror's Edge. With Gedosato I get a darker image and low-res text. I always noticed the low-res text but I just realized it also produces a less than optimal image. I'm not using any post-processing. Sup wit dat.





Using a 280X.

Could be just a bug with the game, or could be due to how the game does or doesn't scale those elements with resolution.

I had a similar issue with Mafia II and higher resolutions.
 
So looking into things - would it be weird to ask if GeDoSaTo could be used as a configurable upsampler? Say, intercepting a game that outputs at 1360x768 and allowing that to be upsampled to a given resolution with a configurable amount of unused black area (so, say, the scaled up image fits 96% of the screen)?
 
EDIT: Problem solved, had force windowed fullscreen set to true which caused this.

Riddle me this:

Gedosato downsampling doesn't seem to work with ReShade, produces a black screen when the shaders are compiled.
Now you can also downsample via DSR, but I want the Smaa and possible other features of gedosato. Luckily, gedosatos AA works with the DSR process (at least smaa).

So everything seems to be fine, the catch is FRAPS and it's "repeat screen capture every X secons (until hotkey is pressed again)"-feature.
It works fine, making full screencaps of the original res as long as gedosato is not active, when I activate gedosato though FRAPS only makes 1080p captures, cutting off the rest of the image.

Why is that?

Trying to solve the problem, here are some things that didn't work:

1. Setting the output resolution of gedosato to the DSR render resolution.
2. Adding DSR render resolution to the resolution list.
3. Disabling every res on the list.

The easiest way would be if someone adds this FRAPS feature to gedosato because gedosato is still able to take full res screenshots of the DSR rendered image... it's pretty easy for a skilled coder I assume.... ..... .... .... pls :p

Any ideas on what to change in gedosato so FRAPS doesn't freak out anymore?
 

orava

Member
So I'm wondering about Mirror's Edge. With Gedosato I get a darker image and low-res text. I always noticed the low-res text but I just realized it also produces a less than optimal image. I'm not using any post-processing. Sup wit dat.





Using a 280X.

IIRC it messes up the text/menus if your resolution is bigger than 1080p.
 

Gvaz

Banned
I can't get gedosato to properly downsample from 2160x2400, instead going to 2160 and fucking up the letterboxing which doesn't refresh on FF13

I don't give a shit if it ends up being stretched, just want it to work.
 
Started using this today and loving it!

When I'm done playing and click Deactivate I get "Deactivated (unhooked unsuccessfully)". Is this normal?
 

Tangorange

Neo Member
Hey, Durante! Gedosato is an amazing tool. And upsampling feature can smooth out those pixels damn good. But i have some issues with it, and maybe you can elaborate on these items if you please:

1) Upsampling for Binding of Isaac Rebirth is not working. This game is probably none of your interests, but many fans will be pleased using Timothy Lottes’ great CRT shader.

2) The same is for Shovel Knight. I remember seeing screenshots of SK with CRT shader on, and it looked amazing! But again i cannot get it work with Gedosato,

3) I've tried La Mulana and while the CRT filter is working. it is not so sharp as on your screenshots. The text is unreadable for me but on your screenshots it is indeed readable. Could you please provide your CRT shader settings for this game?

Thank you for your response in advance!
 
Top Bottom