Preparing shaders....

what is with this? shouldn't the prep be saved so it is not required every time? it takes awhile to do it, why do it every time? or am I missing something?
 
what is with this? shouldn't the prep be saved so it is not required every time? it takes awhile to do it, why do it every time? or am I missing something?

I'm not entirely sure why this is necessary each time, I am far from an expert on these things, however the very first time on my rig it took about a minute to configure, but all subsequent occasions it only takes about 5 seconds for me with my machine, I'm a little confused/concerned perhaps "it takes a while" for yours to do it. How long is a while?
 
I think some changes to the shaders are coming in with each small update to 1.3... maybe they just made one of the 'black loading screen' checks visible?

Takes 4-5 secs on my GTX780.
 
Last edited:
This is utterly speculation on my part, as I'm not a graphics guy and the last time I had to work with GPU hardware directly was in the Riva TNT/i740 days - but it seems that Nvidia cards can compute and then save shaders for later reuse. There are mentions of that on this forum, and I seem to recall the devs stating the same. However, every time I fire up Elite, my AMD card takes pretty much exactly the same time to do the shader bit. My Air takes pretty much exactly the same time to do the shader bit on it's Intel GPU. It's the same with every machine I've tried - but as I have no access to an Nvidia based machine I can't test this myself.
 
This is utterly speculation on my part, as I'm not a graphics guy and the last time I had to work with GPU hardware directly was in the Riva TNT/i740 days - but it seems that Nvidia cards can compute and then save shaders for later reuse. There are mentions of that on this forum, and I seem to recall the devs stating the same. However, every time I fire up Elite, my AMD card takes pretty much exactly the same time to do the shader bit. My Air takes pretty much exactly the same time to do the shader bit on it's Intel GPU. It's the same with every machine I've tried - but as I have no access to an Nvidia based machine I can't test this myself.


I can confirm on my end with Nvidia system, shaders take same amount of time each time I start the game. Takes approx 8-10 seconds to complete.
 
I can confirm on my end with Nvidia system, shaders take same amount of time each time I start the game. Takes approx 8-10 seconds to complete.

Very interesting. I wonder if it would be worth investigating where the shader data is stored - is it in the Elite folders someplace, or does it go to a Windows temp file perhaps? I thought that with me having an AMD card, plus all sorts of files put on RAMdrives and some rather strange hybrid drives - it could have been just my setup making this not work. However, having someone with an Nvidia setup say that similar things happen leads me to believe that perhaps the caching is not working quite right.

Any ideas anyone?
 
Very interesting. I wonder if it would be worth investigating where the shader data is stored - is it in the Elite folders someplace, or does it go to a Windows temp file perhaps? I thought that with me having an AMD card, plus all sorts of files put on RAMdrives and some rather strange hybrid drives - it could have been just my setup making this not work. However, having someone with an Nvidia setup say that similar things happen leads me to believe that perhaps the caching is not working quite right.

Any ideas anyone?

2 different conversations Asp :) Yea haven't found where they are stored yet, But I did see a Virtual Cache xml file. One thing to note is Nvidia has an option to cache shaders as well. I don't know if the game takes precedence over that or both the GPU and the game are caching. I have tested turning off Shader Cache in the control panel and just have the game do it but it did not help stuttering.
 
Last edited:
On my laptop it took 2 min first time and now 45-60 sec. notr sure about desktop but since it is much better machine I assume it is faster but still. anyway thx for replys.
 
The preparing shaders was a change implemented in v1.3. This was done to help with stuttering effects happening in the game. The reason for it preparing them every time has to do with the way memory (both system and video card) and the cache file is used. When you start a program, the program asks the operating system to allocate memory for it. When a program is finished running, most programs or operating systems will declare the allocated memory to be available for other uses. At this time other programs may rewrite new values to the memory. When Elite is reloaded, it will check to see if any of the shader information is still loaded into memory and will then go about rebuilding all the necessary info into memory. This is why subsequent launches of elite may take less time to load shaders. However if you restart or turn on/off your system all values in volatile memory (RAM and VRAM) will be lost and thus the longer load times on launching elite as it will need to reload everything. Although this may not be a 100% correct or complete explanation, I hope this helps. (This explanation comes from a basic and incomplete knowledge of allocating memory in C++)
 
Is it the end of the world? :eek:

I'm using a 3 year old Samsung laptop with a nVidea GTX 675M 2 Gb video card and it takes about 10 seconds each time to load up the shaders.

If you don't like the shader message you can disable it in the AppConfig.xml file in your ED directory. Just change ShaderWarmingEnabled="1" to "0"
 
Shaders are script files generated dynamically on the fly based on the needs of the materials/lighting/geometry etc.. they control how lighting sources, shadows and textures interact with the geometry and how geometry is mapped to the screen, for example, so the "preparing" step is pre-compiling the necessary ones, rather than trying to dynamically compile them when needed.

Earlier versions of the game were doing this dynamically, which is why there was a "hiccup" approaching a planet as that planet's shader got built and compiled. e.g. If your current system has no gas planet, there would be no need for the gas giant shader, but if you warped to one, the earlier version of the game built and compiled it as I approached it (at the visual point it would stop being a "small star" and start to look like a planet), this caused hiccups, so rather than do that, build all of them upfront, needed or not.


Modern shader programs get pretty big and compilation can take some time, particularly on AMD machines. You may not find them anywhere on disk, the script generation is really fast and there's no need to save that, only the binary result, which, given the constant upgrading of GFX drivers, windows patches etc.. etc.., is safer to recompile for the time being, as some versions of some drivers don't save it.
 
Last edited:
Back
Top Bottom