mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
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:
parent
85c7a68f46
commit
d82e8dbec4
3 changed files with 1 additions and 108 deletions
|
|
@ -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, ¯oStr );
|
||||
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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue