Jump to content
Sign in to follow this  
SteveFx

DX10 Flashing Runways - Experimental Shader

Recommended Posts

EDIT: The file is now in the AVSIM Library and you no longer need to do the edits as Steve lists below.

 

 

I have been doing lots of experimentation with FSX, which I have documented on a blog at http://stevesfsxanal....wordpress.com/

 

I have an experimental shader change that seems to fix the DX10 runway flashing and also the runway markings overlay. However there are no guarantees - it may break something else - There is a limit to how much I can test it. So try this at you own risk!! If you havent recompiled shaders before it might be best to wait until someone more experience reports back.

 

To try the experimental change

 

0. Locate an airport where you have the problem - (so you know where to check!)

 

1. back up the general10.fx from the FSX\ShadersHLSL\General

 

2. change the technique at the end of the file to be like this (blue is new)

 

 

#if defined(VT_VERTEX) && defined(SHD_VERTICAL_NORMAL) && defined(SHD_BASE) && defined(SHD_ENV) && defined(SHD_PRECIP_BLEND)

#define AIRPORT_SHADER

#endif

#if defined(AIRPORT_SHADER) && defined(SHD_BLENDENVBYINVBASEALPHA) && defined(SHD_FINAL_ALPHA_BLEND)

#define MARKINGS

#endif

#if defined(AIRPORT_SHADER) && defined(SHD_DETAIL) && defined(SHD_BUMP)

#define RUNWAY

#endif

#if defined(MARKINGS) || defined(RUNWAY)

DepthStencilState ZWriteOff

{

DepthWriteMask = ZERO;

};

#endif

technique10 T0

{

pass P0

{

SetVertexShader(CompileShader(vs_4_0, VS()));

SetGeometryShader(NULL);

SetPixelShader(CompileShader(ps_4_0, PS()));

#if defined(MARKINGS) || defined(RUNWAY)

SetDepthStencilState(ZWriteOff,0);

#endif

}

}

 

3. Go to AppData/Microsoft/FSX

 

4. Delete the directory Shaders10 (FSX will recreate it)

 

5. Run FSX in DX Preview mode and go to the airport you found at step 0

Edited by Tom Allensworth
Steve upload fixes to the AVSIM Library - no need to edit.

Share this post


Link to post

Worked perfect for me.

 

Default DX10 Shader

 

7348002684_1d7cdbfa6a_o.jpg

 

Your modified DX10 Shader

 

7162792005_43e731254f_o.jpg

 

Will defnitely do further testing but looks VERY promising. Thank you for your hard work!


ASUS ROG STRIX Z390-E GAMING / i9-9900k @ 4.7 all cores w/ NOCTUA NH-D15S / 2080ti / 32GB G.Skill 3200 RIPJAWS / 1TB Evo SSD / 500GB Evo SSD /  2x 3TB HDD / CORSAIR CRYSTAL 570X / IPSG 850W 80+ PLATINUM / Dual 4k Monitors 

Share this post


Link to post

Great! If you compare the intersection of the white and yellow lines you should notice a difference there as well - subtle but it annoyed me!

Share this post


Link to post

Only deal breaker left still with DX10 is the lack of a way to implement proper SSAA at the hardware level. (ATI Card) Sure there are DX10 FXAA injectors which isn't going to do much for FSX and there is a recent hacked up api hook to do SSAA in DX10/DX11 but nothing native to do it. The jaggies absolutely kill me.


ASUS ROG STRIX Z390-E GAMING / i9-9900k @ 4.7 all cores w/ NOCTUA NH-D15S / 2080ti / 32GB G.Skill 3200 RIPJAWS / 1TB Evo SSD / 500GB Evo SSD /  2x 3TB HDD / CORSAIR CRYSTAL 570X / IPSG 850W 80+ PLATINUM / Dual 4k Monitors 

Share this post


Link to post

Kudos to you sir! Can't wait to try this out and get even better performance and cockpit lighting thanks to DX10.

Share this post


Link to post

Hmmm...this could be big. The game certainly looks better (minus the AA problems) in DX10.

Share this post


Link to post
Guest firehawk44

Did not work for me. Screen displaying aircraft was black at the FSX setup screen. Then, sky was black with white clouds and water was dark as if it was night time. Airport disappeared too (KFHR) where I know this flickering exists in DX10 preview. Probably caused by not formatting the General10.fx properly (i.e., copying the data in the OP and pasting at the bottom of the General10.fx file). It's working for a couple of other people though so will continue to get it formatted correctly. Thanks for the fix in any case. Glad someone is working on this problem and maybe we'll have a fix soon.

 

Best regards,

Jim

Share this post


Link to post

(i.e., copying the data in the OP and pasting at the bottom of the General10.fx fil

 

Jim

 

If its a strange dark world then the shader didn't compile. Did you say you pasted the text from the original post at the bottom of the file? The blue text is changes that go around the black text which was already in the file.

 

If you had two technque10s in the file it then I imagine it would indeed fail to compile.

 

I cannot edit the original post - perhaps I should have used red for existing code!!

 

So to summarise you either

 

insert 15 lines before the existing technique10 and 3 inside it it.

 

OR

 

you delete the existing technique10 ( about 9 lines?) and paste in the attached file

 

 

 

 

Steve

Share this post


Link to post
Guest firehawk44

you delete the existing technique10 (9 lines) and paste in the whole of the text from the first post.

 

Thanks Steve for the quick response. This is what I did as I saw technique 10 was at the bottom. Just copied and pasted but the formatting has everything I pasted to the left and not indented. I suspect this is the issue.

 

Best regards,

Jim

Share this post


Link to post

Jim

 

Strange - I have posted the whole changed section as a file so try that.

 

Can you look in the AppData\Local\Microsoft\FSX\Shaders10\ShadersHLSL\General directory and see which shaders have been compiled there. If its a problem in the shader source somewhere then there won't be any compiled shaders starting general10 just some starting generalshadow10 which is what gives the strange monchrome world.

 

regards

Steve

Share this post


Link to post
Guest firehawk44

Hi Steve,

Just tried it again using the excellent instructions in the OP and still get dark skies, dark water, and no airport. Here is the AppData\Local\Microsoft\FSX\Shaders10\ShadersHLSL\General directory as requested.

 

742Shader.jpg

 

Will try the whole changed file.

 

Best regards,

Jim

Share this post


Link to post

Well to be on the safe side I decided to follow my own instructions.

 

I restored the original general10.fx then deleted the technique10 (9 lines) replacing the deleted lines with the text in the file that I uploaded in post 8 - file was 24.2Kb after edits.

 

I deleted the shader10 directory as in OP

 

Ran FSX and went to friday harbour - all fine. Airport there, sunny and in colour! although the fence has transparency issues at certain angles- I have seen that elsewhere e.g in Paris. Its the same without the shader change - I will see if I can figure out what is wrong with that drawcall.

Share this post


Link to post

You sure you don't have the Shader 3.0 mod installed?

 

I'm pretty sure that doesn't work in DX10 and gives you what you are seeing.

Share this post


Link to post
Guest firehawk44

You sure you don't have the Shader 3.0 mod installed?

 

I do not have the Shader 3.0 mod. I do have the commercial program Shade installed.

 

Ran FSX and went to friday harbour - all fine.

 

That really is strange Steve. When I edit General10.fx, I use Notepad ++. The size of my general10.fx file is 25kb. Here's what the pasted info looks like in Notepad++....

 

966General10.jpg

 

Best regards,

Jim

Share this post


Link to post

I'd probably try uninstalling shade. It's such an small easy program to reinstall that it'd be worth a shot.

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...