clean up (some) shader variation redundencies

don't need to use macros for the shader textfile hashkeys
several no longer used GFXVertexFormats removed
This commit is contained in:
AzaezelX 2025-04-01 18:23:29 -05:00
parent 85c7a68f46
commit d82e8dbec4
3 changed files with 1 additions and 108 deletions

View file

@ -459,18 +459,12 @@ GFXShader* ShaderGen::getShader( const MaterialFeatureData &featureData, const G
// Build a description string from the features
// and vertex format combination ( and macros ).
String shaderDescription = vertexFormat->getDescription() + features.getDescription();
if ( macros && !macros->empty() )
{
String macroStr;
GFXShaderMacro::stringize( *macros, &macroStr );
shaderDescription += macroStr;
}
// Generate a single 64bit hash from the description string.
//
// Don't get paranoid! This has 1 in 18446744073709551616
// chance for collision... it won't happen in this lifetime.
//
shaderDescription.replace("\n", " ");
U64 hash = Torque::hash64( (const U8*)shaderDescription.c_str(), shaderDescription.length(), 0 );
hash = convertHostToLEndian(hash);
U32 high = (U32)( hash >> 32 );