spearmint icon indicating copy to clipboard operation
spearmint copied to clipboard

Add alias'd shaders to hash table?

Open zturtleman opened this issue 11 years ago • 0 comments

SoF2 has an aliasShader <shader> setting, which is used instead of the the real shader if r_aliasShaders is 1.

Currently Spearmint has to start parsing the shader each time to find the name of the alias shader. Should probably add the alias shader under the original shader name to the hash table. Faster access but uses more memory. I assume the purpose of alias shader is loading less images, not having less shaders in memory. I'm not sure this really matters.

off-topic; if alias shaders really exists only to use less images could use if.

asdasd
{
  {
#if !r_aliasShaders
    map theDesiredImage
#else
    map oftenUsedSimilarImage
#endif
  }
}

zturtleman avatar Apr 06 '14 06:04 zturtleman