Re: Type conversion
So if I understood the hashing somewhat serves as replacement for an "if-then-else" condition in shader. Grouping identical polygons, based on their attributes (and hash), will make a single, group-level, compiled version of a shader. Is that right?
I've read that older GPUs had performance problems when branching, modern (OGL > 2.1) shader compilers are already optimized to compile only one version of the shader when the variable, in an "if" statement, is a uniform. Do you confirm this or has nothing to do with our situation?
One last thing: we need to expand the hash bits anyway, since there're attributes that aren't included, but when correctly emulated we could need them. I'll later check for polygon header bits not included. So for the time being we can just create the remaining fetching function in <PolyHeader.cpp> for future use.
I've read that older GPUs had performance problems when branching, modern (OGL > 2.1) shader compilers are already optimized to compile only one version of the shader when the variable, in an "if" statement, is a uniform. Do you confirm this or has nothing to do with our situation?
One last thing: we need to expand the hash bits anyway, since there're attributes that aren't included, but when correctly emulated we could need them. I'll later check for polygon header bits not included. So for the time being we can just create the remaining fetching function in <PolyHeader.cpp> for future use.
