pgraph: fix ShaderInput ordering for vector inputs with small floats
Fixes #827
This commit is contained in:
parent
3367fe266f
commit
fe1ecd5e79
|
|
@ -490,7 +490,19 @@ operator < (const ShaderInput &other) const {
|
|||
return false;
|
||||
|
||||
case M_vector:
|
||||
return _stored_vector < other._stored_vector;
|
||||
if (_stored_vector[0] != other._stored_vector[0]) {
|
||||
return (_stored_vector[0] < other._stored_vector[0]) ? -1 : 1;
|
||||
}
|
||||
if (_stored_vector[1] != other._stored_vector[1]) {
|
||||
return (_stored_vector[1] < other._stored_vector[1]) ? -1 : 1;
|
||||
}
|
||||
if (_stored_vector[2] != other._stored_vector[2]) {
|
||||
return (_stored_vector[2] < other._stored_vector[2]) ? -1 : 1;
|
||||
}
|
||||
if (_stored_vector[3] != other._stored_vector[3]) {
|
||||
return (_stored_vector[3] < other._stored_vector[3]) ? -1 : 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
case M_numeric:
|
||||
return _stored_ptr._ptr < other._stored_ptr._ptr;
|
||||
|
|
|
|||
Loading…
Reference in New Issue