• 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!

kiyomi

Member
Any reason why the original Bioshock won't accept custom resolutions? And is there a workaround?

I forgot to update on Binary Domain btw, I'll try and log it tonight.
 
Any reason why the original Bioshock won't accept custom resolutions? And is there a workaround?

I forgot to update on Binary Domain btw, I'll try and log it tonight.

Make sure you are running Bioshock in DX9 if you want to downsample, the game also has DX10 do not forget.
 
Where did you get this idea? It doesn't.

Wasn't at a computer to test it. Am now.

So the updater exe just installs wherever it sits instead of putting it somewhere static (like %programfiles%)... that could get messy since most peoples' default behavior is to just click and run and they might clean out their Download folder (and GeDoSaTo with it) every so often.

Also get an unhandled exception from it being unable to write to the registry after it reports a successful installation.
 

Durante

Member
Wasn't at a computer to test it. Am now.

So the updater exe just installs wherever it sits instead of putting it somewhere static (like %programfiles%)... that could get messy since most peoples' default behavior is to just click and run and they might clean out their Download folder (and GeDoSaTo with it) every so often.
People were able to put GeDoSaTo somewhere permanent and run it so far, so I hope they could still do so in the future.

Also get an unhandled exception from it being unable to write to the registry after it reports a successful installation.
That's very unlikely, it doesn't write anything to the registry. Probably you are getting that from GeDoSaToTool when it launches.

Edit: and the admin issues for people with UAC enabled should be fixed by the next version of GeDoSaToTool (that is, it should now prompt). Still have to test this though.
 
People were able to put GeDoSaTo somewhere permanent and run it so far, so I hope they could still do so in the future.
I think people have different default behaviors when presented with an executable download. I know I expected it to ask for an installation location first. Perhaps it wouldn't be a bad idea to package the updater in a deployment tool - even just making it a self extracting ZIP archive would be enough to stamp out most potential user errors.
 

Durante

Member
I think people have different default behaviors when presented with an executable download. I know I expected it to ask for an installation location first. Perhaps it wouldn't be a bad idea to package the updater in a deployment tool - even just making it a self extracting ZIP archive would be enough to stamp out most potential user errors.
I guess I could check if it's currently updating or installing, and if installing ask for a location.
 
Has anyone found the pshash fpr Darksiders 2? If not, I might give that a shot tonight.

I'm not really sure about this but I believe the game applies some color correction/Filter on top of everything once the hud is drawn as the last free frame I get has not the same bright/saturated colors as the frame with hud drawn.

b47d97d6 - I did not check the Pixel Shader below that in the log as I assumed them to be hud related.... I might be wrong about this but I also cant check it any further at the moment.
 

Alo81

Low Poly Gynecologist
Can anyone help me out with getting Tonemap added to the Post.fx file?

It seems like I've got everything done right, but once I launch RE5 it crashes.

Here's how I've added it.

Full pastebin

Shortened relevant parts.

Code:
#define USE_TONEMAP       1 //[0 or 1] Tonemap : Adjust gamma, exposure, saturation, bleach and defog. (may cause clipping)



// Tonemap settings
#define Gamma       1.000  //[0.000 to 2.000] Adjust midtones. 1.000 is neutral. This setting does exactly the same as the one in Lift Gamma Gain, only with less control.
#define Exposure    0.000  //[-1.000 to 1.000] Adjust exposure
#define Saturation  0.000  //[-1.000 to 1.000] Adjust saturation
#define Bleach      0.000  //[0.000 to 1.000] Brightens the shadows and fades the colors
#define Defog       0.000  //[0.000 to 1.000] How much of the color tint to remove
#define FogColor float3(2.55, 2.55, 2.55) //[0.00 to 2.55, 0.00 to 2.55, 0.00 to 2.55] What color to remove - default is blue

// -------------------------Tonemap--------------------------------------------

float4 TonemapPass(float4 colorInput)
{
	float3 color = colorInput.rgb;

	color = saturate(color - Defog * FogColor); // Defog
	
	color *= pow(2.0f, Exposure); // Exposure
	
	color = pow(color, Gamma);    // Gamma -- roll into the first gamma correction in main.h ?

	//#define BlueShift 0.00	//Blueshift
	//float4 d = color * float4(1.05f, 0.97f, 1.27f, color.a);
	//color = lerp(color, d, BlueShift);
	
	float3 lumCoeff = float3(0.2126, 0.7152, 0.0722);
	float lum = dot(lumCoeff, color.rgb);
	
	float3 blend = lum.rrr; //dont use float3
	
	float L = saturate( 10.0 * (lum - 0.45) );
  	
	float3 result1 = 2.0f * color.rgb * blend;
	float3 result2 = 1.0f - 2.0f * (1.0f - blend) * (1.0f - color.rgb);
	
	float3 newColor = lerp(result1, result2, L);
	float A2 = Bleach * color.rgb; //why use a float for A2 here and then multiply by color.rgb (a float3)?
	//float3 A2 = Bleach * color.rgb; //
	float3 mixRGB = A2 * newColor;
	
	color.rgb += ((1.0f - A2) * mixRGB);
	
	//float3 middlegray = float(color.r + color.g + color.b) / 3;
	float3 middlegray = dot(color,(1.0/3.0)); //1fps slower than the original on nvidia, 2 fps faster on AMD
	
	float3 diffcolor = color - middlegray; //float 3 here
	colorInput.rgb = (color + diffcolor * Saturation)/(1+(diffcolor*Saturation)); //saturation
	
	return colorInput;
}

// -------------------- Main -----------------------------------------------

float4 postProcessing(VSOUT IN) : COLOR0
{
	float2 tex = IN.UVCoord;
	float4 c0 = tex2D(s0, tex);

#if (USE_BLOOM == 1)
	c0 = BloomPass(c0, tex);
#endif
	
#if (USE_HDR == 1)
	c0 = HDRPass(c0, tex);
#endif

#if (USE_LUMASHARPEN == 1)
	c0 = LumaSharpenPass(c0, tex);
#endif

#if (USE_VIBRANCE == 1)
	c0 = VibrancePass(c0);
#endif

#if (USE_TONEMAP == 1)
	c0 = TonemapPass(c0, tex);
#endif

	c0.w = 1.0;
	return saturate(c0);
}

If USE_TONEMAP is disabled the game boots fine, when I enable it the game crashes.

I'm trying to work it into RE5 to see if I could get rid of the green filter, and ideally end up finding a PSHash for the game so we could play it with natural colors and a clean HUD.

Ok, GeDoSaTo is now almost too easy to install and keep up to date. At least in my opinion.

http://blog.metaclassofnil.com/?p=587

As a suggestion to combat that donation issue, you could probably include a Paypal donation link in the updater. Though now that I think about it you've probably thought of this already!
 

Parsnip

Member
Can anyone help me out with getting Tonemap added to the Post.fx file?
What does the log file say when it crashes? If it's a shader syntax error it will report it.

post.fx(528,7): error X3013: 'TonemapPass': function does not take 2 parameters

Alo81, change
Code:
#if (USE_TONEMAP == 1)
	c0 = TonemapPass(c0, tex);
#endif

to

Code:
#if (USE_TONEMAP == 1)
	c0 = TonemapPass(c0);
#endif
and that seems to work at least over here.


Edit: Unrelated, but while I was testing this I noticed that the weird lighting bug that happened in Tomb Raider Anniversary seems gone. I haven't tested it in a while so it was a pleasant surprise.
 

Durante

Member
Edit: Unrelated, but while I was testing this I noticed that the weird lighting bug that happened in Tomb Raider Anniversary seems gone. I haven't tested it in a while so it was a pleasant surprise.
Since when is it gone? Best guess would be the semi-recent z/stencil fixes.
 

Alo81

Low Poly Gynecologist
What does the log file say when it crashes? If it's a shader syntax error it will report it.

and that seems to work at least over here.


Edit: Unrelated, but while I was testing this I noticed that the weird lighting bug that happened in Tomb Raider Anniversary seems gone. I haven't tested it in a while so it was a pleasant surprise.

Yep, after checking the log i actually ended up independently getting to that conclusion. Thanks for the help though.

Also, I have great news!

http://a.pomf.se/qodbdb.webm

Hudless support for RE5! And the pause screen as rendered as a HUD, so it's basically timestop!

Also, RIGHT before rendering the HUD, the game renders the green filter, so we might be able to set it up to remove the green tint, but not the HUD? I don't remember if that function was added in yet.

ndidaph.png


At the least, we should be able to set it up to render without the green tint AND without the HUD!

I'm currently running into an issue where the PSHash's which remove the green tint are causing stuff like this,

bCZ4Oxe.png


even if the HUD isn't actually disabled by pressing Num 0.

Edit: Huh. -(edit2) to clarify, Capturing HUDless screenshots is actually perfectly fine, but capturing full resolution screenshots causes an instant crash - even if pressing the HUDless screenshot key. -(edit3) Nothing changed, now both are causing crash with no reference as to why in the log! Welp!
 

Parsnip

Member
Still having trouble with finding a hash for TRA though, managed to use D3DRS_ZFUNC, value: 4 renderstate instead to hide the hud, but somehow that breaks the post processing. It's also surprising to me that it only dumps 14 tga files, including pre/postplugin. That just seems so few when some games have 100+.

Since when is it gone? Best guess would be the semi-recent z/stencil fixes.
Tested couple version, it vanishes between 0.9 and 0.10.
 

Durante

Member
Still having trouble with finding a hash for TRA though, managed to use D3DRS_ZFUNC, value: 4 renderstate instead to hide the hud, but somehow that breaks the post processing. It's also surprising to me that it only dumps 14 tga files, including pre/postplugin. That just seems so few when some games have 100+.
The dumping is pretty arbitrary really (that is, I could just as well choose different events to do a dump).

I'll soon add injection targeting using vertex shader hashes, though that probably won't help for very many cases I'd guess (usually you would expect pixel shaders to be more unique than vertex shaders). I needed most of the functionality for something else anyway though, so it will come.
 

Alo81

Low Poly Gynecologist
@Durante, have you ever gone into detail on how to use the InjectRenderState function?

I've found a PSHash for RE5 which disables the green tint and HUD (d770949e), as well as one which only disables the HUD(a309e0e8). My understanding is I might be able to use InjectRenderState to only disable the green tint and not the HUD. Is this true?

I know you have an example of it being used in Ys Origins, but not owning the game I can only really see the end RenderState you use, not how you got to find that.

Unless I'm just all the way wrong about all of this and you haven't implemented the way to disable at one PSHash but not a later one, to which I'll say oops, my bad, sorry!
 

Parsnip

Member
Has anyone found the pshash fpr Darksiders 2? If not, I might give that a shot tonight.

I'm not really sure about this but I believe the game applies some color correction/Filter on top of everything once the hud is drawn as the last free frame I get has not the same bright/saturated colors as the frame with hud drawn.

b47d97d6 - I did not check the Pixel Shader below that in the log as I assumed them to be hud related.... I might be wrong about this but I also cant check it any further at the moment.
Using the next pixelshader after that one will kind of sort of work, but there's some funky stuff with post processing. Like, post processing only works when you use the hidehud key, that seemed a little weird.

I got what appears to be perfect result with that hash, combined with the delay draw. I only ran around in the beginning of the game, so hopefully it works all the way through.

injectPSHash b47d97d6
injectDelayAfterDraw true

It also works as a timestop of sorts since it also hides the pause menu.

http://youtu.be/Ys--EuFQ4xA

The dumping is pretty arbitrary really (that is, I could just as well choose different events to do a dump).

I'll soon add injection targeting using vertex shader hashes, though that probably won't help for very many cases I'd guess (usually you would expect pixel shaders to be more unique than vertex shaders). I needed most of the functionality for something else anyway though, so it will come.
Ah, alrighty then. I was just wondering if fewer dumps was expected. Suppose it's engine specific I guess, older games, fewer draws or something?
 

TheTrain

Member
There is a problem with Risen 3: Titan Lords. If I run Gedosato with the game this is the result, even if i don't downsample

n2dS0gl.jpg


any idea?
 
Using the next pixelshader after that one will kind of sort of work, but there's some funky stuff with post processing. Like, post processing only works when you use the hidehud key, that seemed a little weird.

I got what appears to be perfect result with that hash, combined with the delay draw. I only ran around in the beginning of the game, so hopefully it works all the way through.

injectPSHash b47d97d6
injectDelayAfterDraw true

It also works as a timestop of sorts since it also hides the pause menu.
Wow... the updater already grabbed that for me. Damn. This is slick :)

Thanks!


^^ testing my fixed camera CE script. It has limited use.... but you can see my character alll the way down there in the distance.
 

Durante

Member
There is a problem with Risen 3: Titan Lords. If I run Gedosato with the game this is the result, even if i don't downsample

n2dS0gl.jpg


any idea?
No idea yet. But I will play this game, and as such I'll probably figure it out.

@Durante, have you ever gone into detail on how to use the InjectRenderState function?

I've found a PSHash for RE5 which disables the green tint and HUD (d770949e), as well as one which only disables the HUD(a309e0e8). My understanding is I might be able to use InjectRenderState to only disable the green tint and not the HUD. Is this true?

I know you have an example of it being used in Ys Origins, but not owning the game I can only really see the end RenderState you use, not how you got to find that.

Unless I'm just all the way wrong about all of this and you haven't implemented the way to disable at one PSHash but not a later one, to which I'll say oops, my bad, sorry!
InjectRenderState is just a different way to identify a time during frame rendering, for the same purpose as injectPSHash.

Selectively disabling shaders would be an entirely different feature.
 

Cerity

Member
Been messing with killer is dead, couldn't get it to pick up any of the resolutions from GeDoSaTo but entering a custom one in KidEngine.ini caused GeDoSaTo to start downsampling anyway. Loving how smooth it is now.

Found it's applicable PSHash too. Takes the screenshot at the resolution i'm downsampling from though, would there be any reason for that? But of a surprise when I couldn't upload the screen and finding out it was 16.7mb

 
Hey Durante, just want to thank you again for GeDoSaTo. I just tried it out in the Witcher 2 the other day, and due to how the box filtering is done for the shadows... GeDoSaTo complete eliminates their dithering at higher downsampled resolutions. Furthermore, GeDoSaTo catches more edges and performs better than their Übersampling option as offered by the game.

In the eventuality of life when Dx 11 support cmes to GeDoSaTo, I can faithfully say the program will have achieved god-hood.

Also, if you are ever in berlin, I owe you many many beers (or your drink of choice).
 

Alo81

Low Poly Gynecologist
No idea yet. But I will play this game, and as such I'll probably figure it out.

InjectRenderState is just a different way to identify a time during frame rendering, for the same purpose as injectPSHash.

Selectively disabling shaders would be an entirely different feature.

Thanks for clarifying. Then my bad!

Been messing with killer is dead, couldn't get it to pick up any of the resolutions from GeDoSaTo but entering a custom one in KidEngine.ini caused GeDoSaTo to start downsampling anyway. Loving how smooth it is now.

Found it's applicable PSHash too. Takes the screenshot at the resolution i'm downsampling from though, would there be any reason for that? But of a surprise when I couldn't upload the screen and finding out it was 16.7mb


That is the feature working as intended. It grabs the full res screen so you have the option to work with or resize it any way you please afterward.
 

Durante

Member
Risen 3 fixed.

I'm honestly surprised that bug didn't break hundreds of games.
Just goes to show how much superfluous state setting most games have. Well done Risen 3!
 

Echoplx

Member
The latest build seems to be crashing Steam and preventing me from starting it at all

Edit: Happens randomly, Starting GeDoSaTo after Steam is running works fine then suddenly it crashes and when I go to restart it it won't load unless I disable GeDoSaTo.

Edit again: This is the crash log in windows

Faulting application name: Steam.exe, version: 2.35.92.75, time stamp: 0x53ebd634
Faulting module name: GeDoSaTo.dll_unloaded, version: 0.0.0.0, time stamp: 0x53ed113d
Exception code: 0xc000041d
Fault offset: 0x0008ef7e
Faulting process ID: 0x10f4
Faulting application start time: 0x01cfb80571364b4c
Faulting application path: C:\Program Files (x86)\Steam\Steam.exe
Faulting module path: GeDoSaTo.dll
 

robgrab

Member
Some problems have popped up with the last few builds. While Rayman Origins still works perfectly I get a crash when I try to launch Rayman Legends. This is the message I get:

Fullscreen mode not supported

then it comes up with this screen:

Create DirectX device Failed 10 times! please report this error code to get support: - 2005530516

When I disable GeDoSaTo and just use driver based downsampling it works fine.

Another problem I have is with Assassin's Creed: Brotherhood. It launches with no problems and I can access the menus but once the game starts my screen is a solid color yet the HUD elements are fine. Both of these worked flawlessly with the build from about a week ago.

 

MrLampost

Neo Member
Has anyone gotten Divinity 2 working properly?

Downsampling works perfectly, but the mouse acts like it's still in a 1920x1080 screen, making menus and inventory problematic at 1440P and downright impossible at anything higher. I've tried all 4 mouse fixes in every combination, nothing seems to affect it.

The game is so much prettier downsampled, I just can't bear it.
 

Durante

Member
Divinity should be working, I play it all the time. Are you using real fullscreen or borderless?

Some problems have popped up with the last few builds. While Rayman Origins still works perfectly I get a crash when I try to launch Rayman Legends.
Thanks for reporting this, it was an issue introduced with the new multi-resolution option and probably affected all DX9Ex games. It's fixed now.
 

Durante

Member
EDIT: Ah and Durante if I may add a feature request, would it be feasible to change GeDoSaTo so it only accepts key-commands if a injected application is active? I often chat when I game and while it's not a huge issue whenever I type some numbers on my numpad it obviously messes with my game settings when I restore the game afterwards.
This is done now.
 
Can you re-assign hotkeys once a game is active? Or do you have to shut the game down to do that?

I had F9 set to take a hudless screenshot, but that was also the key for quick-load in The Witcher 2. That was annoying :p

I changed the hotkey because I couldn't find a way to reassign that in the Witcher 2, but I didn't think to try and change it while the game was running to see if that worked.

All settings are only loaded once at startup. I'm thinking about adding a "reload settings" keybinding though, mostly because it would make trying shader hashes much easier.

That would be incredible. This is really shaping up to be one hell of an amazing tool :)
 

Durante

Member
All settings are only loaded once at startup. I'm thinking about adding a "reload settings" keybinding though, mostly because it would make trying shader hashes much easier.
 
I think I've asked this before, but how difficult would it be to impose an idle FPS limiter (say, 5-10 fps or so) for games that are not in focus? I figure this is something that could piggyback off the keybinding thing...
 

Alo81

Low Poly Gynecologist
I ported over some of the SweetFx shaders into GeDo.

Tonemap, Chromatic Abberation, Curves, and Splitscreen.

If Durante merges it, it'll be a template file that will sit in the assets folder so you could just paste it into any games config folder, rename it to post.fx, and configure settings.

Here it is in action (obviously exaggerated effects)

JgbqglC.png


If anyones got a particular shader that's important that I could add, let me know and I may try to get it in.

@Durante, there are some SweetFx shaders which use a "screen_size" variable, which doesn't seem declared in GeDo. Is there any alternative option I would be able to use to port some other stuff over? I want to get Dither working, then see if anything else sticks out as worth pulling over.
 
Top Bottom