Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Forum Support

    3. Suggestions

[Q] Separating blur from DOF?!?


Markonious
 Share

Recommended Posts

Straight to the point, I've googled for hours, but didn't find anything on the matter, so I'm posting my question on this forum hoping for some ubermoder alien.gif finding out how to do this!

Ok, so by pressing "P" you get the combo effect of motion blur + Depth of field effect. Now, motion blur is excellently made and it really amplifies the sense of speed(specially in hood camera) and also adds some special effects like when being drunk, it looks almost movie quality, BUT the depth of field effect looks like CRAP, it's overdone and blurs the whole screen stupidly(to cover the lack of AA probably)so this option becomes useless...

So...if someone knows or figures out how to turn on just the excellent motion blur without the crappy DOF, please post it here! BIG THX in advance!!! inlove.gif

Link to comment
Share on other sites

That would cool indeed. But i dont think its possible... I think its hardcoded. Maybe someone can made a plugin for the ASI loader? devil.gif

Link to comment
Share on other sites

If I'm not wrong, you can edit the level of blur and the level of deep of field, both in the common / data / visualsettings.dat file.

 

 

# Misc Values    misc.DOFBlurMultiplier.HD	1  	misc.DOFBlurMultiplier.SD	0.5

 

 

this is the default value. Maybe turning it down to 0.0 could work ?

Link to comment
Share on other sites

thx for suggestion,but didn't I read that the game checks all this files on startup and if the values are different it won't start or something?

 

Link to comment
Share on other sites

Thx Intosia, that worked, but putting all dof and blur values in visualsettings.dat to 0 did nothing... sad.gif

Anybody have a clue what should be tweaked to make this work,pretty please? dontgetit.gif

Link to comment
Share on other sites

Good idea mate. I think DOF paramaters in those files..

 

"C:\Program Files\Rockstar Games\Grand Theft Auto IV\common\shaders"

 

rage_postfx.fxc and rage_default.fxc

 

if u open "rage_postfx.fxc" in "C:\Program Files\Rockstar Games\Grand Theft Auto IV\common\shaders\win32_30_nv8" u may see >

 

DofBlurWeight

dofblur

dofdist

 

words..

 

if someone can decompile those file, we can adjust dof values for sure smile.gif but i am not %100 sure . i am not a coder...

Link to comment
Share on other sites

aww sh*t monocle.gif ,I thought there would be a line or two somewhere that I was missing,not this much...and in the end,maybe none of that works until it's "unlocked" from somewhere else...pfff confused.gif

I'll try but...

Anyway, thx for the trouble, I hope someone will get to the bottom of this soon,cuz really I don't have much experience...(only used to change handling and such in san andreas...)

Link to comment
Share on other sites

Leave the shader files alone, they just build and render the effects. Tweaking is done elsewhere.

 

Once your game is ready to be modified, look in pc/data/timecyc.dat, they have some notable entries there...

 

 

...Far DOF   Near DOF   Near Blur DOF   Mid Blur DOF   Far Blur DOF...

 

Link to comment
Share on other sites

Honestly,there's too much lines and I really don't have the time and patience right now...sorry confused.gif

I hope someone smarter will figure this out and possibly make a small app with say turn on/off blur and dof separately and adjust the amount separately(small amount of dof could be nice)...that would be awesome!!! Pliiiiiiiiz someone? blush.gifinlove.gificon14.gif

Link to comment
Share on other sites

  • 2 weeks later...

i tried to change many parameters in visualsetings config files + Aru`s fix for filecheck, but seems that game just ignore this config files for some reason, no matter what i changed - game was not affected by this file and xls file nearby.

 

So probably these files just useless remains that was used to tweak shader variable values before shaders was compiled.

 

i believe decompiling of GTA 4 shader code (reversing) and then recompilation the only way to fix many GFX problems, and not just with ugly blur (ANYONE NOTICED THAT BLUR IS FORCED ON IN CUTSCENES WIHTOUT PRESSING P BUTTON ????????) but also problems with grain effect on half transparent textures like trees, some glasses and shadowmaps (aka shadows). Shifty41s_beerhatsmilie2.gif

Link to comment
Share on other sites

Leave the shader files alone, they just build and render the effects. Tweaking is done elsewhere.

 

Once your game is ready to be modified, look in pc/data/timecyc.dat, they have some notable entries there...

 

 

...Far DOF   Near DOF   Near Blur DOF   Mid Blur DOF   Far Blur DOF...

 

there are like 59 values with no explanation how many is for each,after the temperature and something that has value of 1000.000(that cannot be any of DOF parameters).

maybe i'll try and use some macros to replace the sh*tload of x.xxx numbers with zeros

Link to comment
Share on other sites

I bet that there are faults in shaders but there are separate folders for nv and ati shaders and files are compiled and uneditable. There are also issues with transparency. Edges of leaves, fences etc. should be transparent but instead of it there is ugly dithering. Also curtains, shadows and some indicators are dithered. Maybe it's fault with alpha channel?

Link to comment
Share on other sites

1000 could be a far value. peds have an average view range of 100

What do you mean?

Link to comment
Share on other sites

I'm glad someone keeps showing the interest in this "problem"! icon14.gif

Also, the guy who did the dashboard cam view(which I use often now),didn't thought(or didn't care) about these togglable effects in this new view,so now it functions properly in some vehicles,and in others,there's blurorama when u press p! orly.gif

But just try riding a "harley" in that view(or nrg900),it's so cool with blur...now only if we can figure out how to turn off the DOF,or make it adjustable.... sigh.gif ahhh...

Link to comment
Share on other sites

 

1000 could be a far value. peds have an average view range of 100

What do you mean?

 

We're going to the top, Bartekxyz. Soon, even you will forget about the old country.

 

excuse me but I am so excited tounge2.gif

 

 

btw. meybe alice can help?

Link to comment
Share on other sites

Anyone have any clues about some good HLSL decompiler that can handle shader compiled with MS HLSL Shader compiler v 9.23.949.2378 (aka FXC.EXE) ??? Cant find any decompiler...

 

the only things is http://developer.download.nvidia.com/tools...1.0827.1525.exe

 

http://developer.nvidia.com/object/nv_shad...ugger_home.html

 

didnt tried it yet but probably it may help to do some shader modification and 1st tool to try out, its includes a FX composer as well

http://developer.download.nvidia.com/tools...1.0827.1525.exe

http://developer.nvidia.com/object/fx_composer_home.html

and probably 30 day trial.

 

Welll there is also possible to do manual per-byte analyze of compiled code and reproduce fx source... to bad game isnt using Runtime compilation of shaders... (((

 

Hm i got crazy idea - maybe we should try ask Rockstart for shader sourcecode as volunteers do the job they should done themselves? )))

Link to comment
Share on other sites

Anyone have any clues about some good HLSL decompiler that can handle shader compiled with MS HLSL Shader compiler v 9.23.949.2378 (aka FXC.EXE) ??? Cant find any decompiler...

 

the only things is http://developer.download.nvidia.com/tools...1.0827.1525.exe

 

http://developer.nvidia.com/object/nv_shad...ugger_home.html

 

didnt tried it yet but probably it may help to do some shader modification and 1st tool to try out, its includes a FX composer as well

http://developer.download.nvidia.com/tools...1.0827.1525.exe

http://developer.nvidia.com/object/fx_composer_home.html

and probably 30 day trial.

 

Welll there is also possible to do manual per-byte analyze of compiled code and reproduce fx source... to bad game isnt using Runtime compilation of shaders... (((

 

Hm i got crazy idea - maybe we should try ask Rockstart for shader sourcecode as volunteers do the job they should done themselves? )))

No way. R* will never give you sourcecode of anything. I remember once people was trying to get sourcecode of first GTA to port it to several platforms(portable etc.) but R* not allowed porting it or modyfying in any way. If they are so sensitive about such an old game they will never allow to modify GTAIV either

Link to comment
Share on other sites

well, asking for FULL game sourcecode is not the as askin just for Shader source, its really small part of game, u cannot do anything with it except to fix things that rockstar done bad with shaders

Link to comment
Share on other sites

well, asking for FULL game sourcecode is not the as askin just for Shader source, its really small part of game, u cannot do anything with it except to fix things that rockstar done bad with shaders

They should give post processing part of code to Crytek. Look at how Crysis operates blur/motion blur/depth of field/bloom...it's all top quality. How could R* make shaders so bad?

Link to comment
Share on other sites

Anyone have any clues about some good HLSL decompiler that can handle shader compiled with MS HLSL Shader compiler v 9.23.949.2378 (aka FXC.EXE) ??? Cant find any decompiler...

 

the only things is http://developer.download.nvidia.com/tools...1.0827.1525.exe

 

http://developer.nvidia.com/object/nv_shad...ugger_home.html

 

didnt tried it yet but probably it may help to do some shader modification and 1st tool to try out, its includes a FX composer as well

http://developer.download.nvidia.com/tools...1.0827.1525.exe

http://developer.nvidia.com/object/fx_composer_home.html

and probably 30 day trial.

 

Welll there is also possible to do manual per-byte analyze of compiled code and reproduce fx source... to bad game isnt using Runtime compilation of shaders... (((

 

Hm i got crazy idea - maybe we should try ask Rockstart for shader sourcecode as volunteers do the job they should done themselves? )))

Here are some disassemblied codes from rage_postfx(f83h) tounge2.gif

I tried to hack some float32 and got something like this

user posted image

here's the shader tounge2.gif

http://rapidshare.com/files/179771586/rage_postfxyy.rar.html

 

I wonder if we can emulate anti-aliasing with a pixel-shader..(just thinking about it) And may someone who know better about gpu coding trans this to hlsl? biggrin.gif

 

 

//// Generated by Microsoft ® HLSL Shader Compiler 9.23.949.2378//// Parameters:////   sampler2D HDRSampler;//   float4 TexelSize;////// Registers:////   Name         Reg   Size//   ------------ ----- ----//   TexelSize    c66      1//   HDRSampler   s0       1//   ps_3_0   def c0, -3, 0, -2, 0.8   def c1, 0.7, -1, 0, 0.9   def c2, 0.172413781, 0, 0, 0   dcl_texcoord v0.xy   dcl_2d s0   mov r0.xyz, c0   mad r1.xy, c66, r0.zyzw, v0   texld r1, r1, s0   texld r2, v0, s0   add r1.xyz, r1, -r2   max r3.xyz, r1, c0.y   mul r1.xyz, r3, c0.w   mad r3.xy, c66, r0, v0   texld r3, r3, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c1.x, r1   mov r3.yz, c1   mad r3.xw, c66.xyzy, r3.yyzz, v0.xyzy   texld r4, r3.xwzw, s0   add r4.xyz, -r2, r4   max r5.xyz, r4, c0.y   mad r1.xyz, r5, c1.w, r1   mad r3.xy, c66, r3_abs.yzzw, v0   texld r3, r3, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c1.w, r1   mad r0.zw, c66.xyxy, r0_abs.xyzy, v0.xyxy   texld r3, r0.zwzw, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c0.w, r1   mad r0.xy, c66, r0_abs, v0   texld r0, r0, s0   add r0.xyz, -r2, r0   max r3.xyz, r0, c0.y   mad r0.xyz, r3, c1.x, r1   mad oC0.xyz, r0, c2.x, r2   mov oC0.w, -c1.y// approximately 35 instruction slots used (7 texture, 28 arithmetic)

 

 

Link to comment
Share on other sites

Anyone have any clues about some good HLSL decompiler that can handle shader compiled with MS HLSL Shader compiler v 9.23.949.2378 (aka FXC.EXE) ??? Cant find any decompiler...

 

the only things is http://developer.download.nvidia.com/tools...1.0827.1525.exe

 

http://developer.nvidia.com/object/nv_shad...ugger_home.html

 

didnt tried it yet but probably it may help to do some shader modification and 1st tool to try out, its includes a FX composer as well

http://developer.download.nvidia.com/tools...1.0827.1525.exe

http://developer.nvidia.com/object/fx_composer_home.html

and probably 30 day trial.

 

Welll there is also possible to do manual per-byte analyze of compiled code and reproduce fx source... to bad game isnt using Runtime compilation of shaders... (((

 

Hm i got crazy idea - maybe we should try ask Rockstart for shader sourcecode as volunteers do the job they should done themselves? )))

Here are some disassemblied codes from rage_postfx(f83h) tounge2.gif

I tried to hack some float32 and got something like this

user posted image

here's the shader tounge2.gif

http://rapidshare.com/files/179771586/rage_postfxyy.rar.html

 

I wonder if we can emulate anti-aliasing with a pixel-shader..(just thinking about it) And may someone who know better about gpu coding trans this to hlsl? biggrin.gif

 

 

//// Generated by Microsoft ® HLSL Shader Compiler 9.23.949.2378//// Parameters:////   sampler2D HDRSampler;//   float4 TexelSize;////// Registers:////   Name         Reg   Size//   ------------ ----- ----//   TexelSize    c66      1//   HDRSampler   s0       1//   ps_3_0   def c0, -3, 0, -2, 0.8   def c1, 0.7, -1, 0, 0.9   def c2, 0.172413781, 0, 0, 0   dcl_texcoord v0.xy   dcl_2d s0   mov r0.xyz, c0   mad r1.xy, c66, r0.zyzw, v0   texld r1, r1, s0   texld r2, v0, s0   add r1.xyz, r1, -r2   max r3.xyz, r1, c0.y   mul r1.xyz, r3, c0.w   mad r3.xy, c66, r0, v0   texld r3, r3, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c1.x, r1   mov r3.yz, c1   mad r3.xw, c66.xyzy, r3.yyzz, v0.xyzy   texld r4, r3.xwzw, s0   add r4.xyz, -r2, r4   max r5.xyz, r4, c0.y   mad r1.xyz, r5, c1.w, r1   mad r3.xy, c66, r3_abs.yzzw, v0   texld r3, r3, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c1.w, r1   mad r0.zw, c66.xyxy, r0_abs.xyzy, v0.xyxy   texld r3, r0.zwzw, s0   add r3.xyz, -r2, r3   max r4.xyz, r3, c0.y   mad r1.xyz, r4, c0.w, r1   mad r0.xy, c66, r0_abs, v0   texld r0, r0, s0   add r0.xyz, -r2, r0   max r3.xyz, r0, c0.y   mad r0.xyz, r3, c1.x, r1   mad oC0.xyz, r0, c2.x, r2   mov oC0.w, -c1.y// approximately 35 instruction slots used (7 texture, 28 arithmetic)

 

Really nice shader;) But it can work

Link to comment
Share on other sites

I bet that there are faults in shaders but there are separate folders for nv and ati shaders and files are compiled and uneditable. There are also issues with transparency. Edges of leaves, fences etc. should be transparent but instead of it there is ugly dithering. Also curtains, shadows and some indicators are dithered. Maybe it's fault with alpha channel?

Turn on the "p" key (if you are not playing at a low res - low res looks like ass with the P key) and the dithered look turns into something much more pretty. It was a good way for them to "fix" the alpha issues we saw in the old games, but at the end of the day we probably all would have been happy with them just to stop using Feather Edges when they make alphas tounge.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.