Sign in to follow this  
Guest pwheeler

Forcing a shader cache rebuild with simconnect

Recommended Posts

Hi,Not sure if its possible, but I thought I'd ask anyway!I am currently helping to develop FS Water Configurator, a freeware program that alters the FSX water shader file through a GUI. Basically, you change settings for reflection intensity etc. clear the shader cache and start FSX. The shader cache then gets rebuilt with your changes.We are trying to discover a way to do this on-the-fly with the sim running. FSX will rebuild its shader cache if you alt-tab from full screen mode to the desktop and then back, but not in windowed mode or without the alt-tab.My question is: is there a way to make FSX rebuild the shader cache through simconnect? Maybe force a graphics rebuild somehow?Thanks for your help,Paul.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>My question is: is there a way to make FSX rebuild the shader>cache through simconnect? Maybe force a graphics rebuild>somehow?There's the REFRESH SCENERY event, which must force that, but it will bring up a progress bar and possibly stall the simulation for some seconds.RegardsPete

Share this post


Link to post
Share on other sites

Thanks Pete. That will help alot. It's not ideal as it would be great to do it without rebuilding the whole scenery, but its better than nothing!Cheers,Paul

Share this post


Link to post
Share on other sites

I think the Alt-Tab triggers a loss of the DirectX 9 / 10 render device. This results in the application having to release and re-allocate ALL of its graphics resources, including the shader.So you need to find another way to make the application lose its device. For example by opening another DirectX front window in full screen mode ;)Christian

Share this post


Link to post
Share on other sites

Thanks Christian. That one could be very useful!Paul

Share this post


Link to post
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
Sign in to follow this