PlaneShift

Support => Technical Help: IN GAME bugs (after loading world) => Topic started by: Edicho on March 13, 2010, 12:26:58 pm

Title: How to disable shaders?
Post by: Edicho on March 13, 2010, 12:26:58 pm
How to turn this feature off?

By adding this feature game loads awfully slow, and even when you're standing somewhere in hydlaa plaza, and someone ask you for a place, you say 'I know where it is, follow me please' and at some point of walking next group of shaders loads up and freeze you in some point of path you were leading new player through, leaving you there for at least several seconds.

so back to topic: how to disable it, so I can play normally, like in the old days?
Title: Re: How to disable shaders?
Post by: Lanarel on March 13, 2010, 01:30:54 pm
Shaders have to be compiled, and are then stored in a cache. First time a shader is used, it will take time to compute, after that it should no longer freeze you. Shaders may have to be re-computed after an update.
You can reduce your graphics settings in pslaunch. THat will probably cause less shaders to be used, or less complicated ones, or non at all. But the game will not look as nice.
Title: Re: How to disable shaders?
Post by: Edicho on March 13, 2010, 01:33:28 pm
why do they need to compile each game start then? I understand update, but each start? Especially if it is as you said - they are stored somewhere. And also, even I modify details in pslaunch the game still loads slowly. this is no-go.
Title: Re: How to disable shaders?
Post by: jorrit on March 13, 2010, 02:33:45 pm
Everytime a new set of shaders is encountered that you never encountered before (a new object, a new magic spell, a new fireplace, ...) it has to calculate the shader. The result will be cached but it can take a while before all shaders are compiled.

You cannot disable shaders as you would then not be able to see anything at all.

Greetings,
Title: Re: How to disable shaders?
Post by: bloodedIrishman on March 13, 2010, 05:26:34 pm
What he said.
Title: Re: How to disable shaders?
Post by: Tontow on March 13, 2010, 08:20:42 pm

Would it be possible to get a shader file that already has most if not all objects already compiled? - so it will not lag as much from the start....
Title: Re: How to disable shaders?
Post by: weltall on March 13, 2010, 08:39:11 pm
you need to use shagetron from crystal space. it will run to up to some days depending on your computer and will generate a file of about 1gb
Title: Re: How to disable shaders?
Post by: bloodedIrishman on March 13, 2010, 09:50:18 pm
Call me the shagtron.
Title: Re: How to disable shaders?
Post by: Tontow on March 14, 2010, 08:21:42 am
you need to use shagetron from crystal space. it will run to up to some days depending on your computer and will generate a file of about 1gb

Link?
Title: Re: How to disable shaders?
Post by: weltall on March 14, 2010, 11:15:31 am
http://crystal.svn.sourceforge.net/viewvc
Title: Re: How to disable shaders?
Post by: Edicho on March 21, 2010, 05:38:09 pm
anyone suceeded on this and may provide us with howto ? As far as I know I'm not the only one whos light instances calculate each PS run. (runing it as root doesn't change a thing). Optionally : where is cache so we could check what's there?
Title: Re: How to disable shaders?
Post by: weltall on March 22, 2010, 06:09:17 am
same folder where are logs screenshots...
Title: Re: How to disable shaders?
Post by: RlyDontKnow on March 23, 2010, 04:03:59 am
where is cache so we could check what's there?

on windows: %appdata%\PlaneShift
else: $HOME/.PlaneShift
Title: Re: How to disable shaders?
Post by: Cron on July 05, 2010, 06:59:36 am
The program name is shagnetron.exe and you get it when you compile CS per the compiling guide :
http://planeshift.svn.sourceforge.net/viewvc/planeshift/trunk/docs/compiling.html

See command output below:

shagnetron.exe
Usage: shagnetron [options] <VFS directory | shader file name> <...>
Pre-warms a shader cache with all the shaders from the given directories.
The name is a portmanteau of 'shader' and 'magnetron'.
Available options:
 -cachedir=<dir>   Specify additional cache VFS directories.
                   The later a directory is specified the lower its priority.
                   The first directory is written to.
 -nodefaultcaches  Do not use default caches set in config
 -cacheclear       Clear used caches
 -quick            Do a 'quick' precache.
                   Precaching will take less time, but some shader processing
                   will still happen at run time.

I copied this utility to the same location as the shadercache and tried some commands:

shagnetron -cacheclear shadercache
Clearing cache ... ok

shagnetron -quick .\shadercache
shagnetron .\shadercache

It runs very quickly and does not appear to do anything, since the size of the shadercache file does not change by any of these commands  ???

But the concept is interesting, if anyone finds out more pls update.
Rgds, Cron.

Title: Re: How to disable shaders?
Post by: weltall on July 05, 2010, 08:26:29 am
you need to pass it the folders with the shaders then wait from 12 hours to few days for it to complete work. it will give you back a big shadercache folder with all the shaders weaved and compiled (it's also possible to only weave) in all possible ways for all the various types of hw profiles. it was attempted but provides distribution issues due to the size of the output, at least for the complete compiling, (around the same of the entire client)
Title: Re: How to disable shaders?
Post by: RlyDontKnow on July 05, 2010, 11:04:26 pm
as for only weaving: that's triggered with the "-quick" option and is quite straight forward. the resulting cache will be ~10MB
however you'll still have to compile the shaders later on

if you want to change the target hardware to use in the actual output cache if you don't use quick: you can edit the profiles that are targeted in data/config/shadermgr.cfg

usage in general is: /path/to/shagnetron /shader/ [-quick]
also note that you can only pre-compile a specific shader if you use /shader/folder/name.xml instead, e.g. /path/to/shagnetron /shader/terrain/alphasplat.xml