#include <NvBlastExtDamageShaders.h>
Public Member Functions | |
| float | getNormalizedDamage (float damageInHealth) const |
| NvBlastExtMaterial () | |
Public Attributes | |
| float | health |
| health | |
| float | maxDamageThreshold |
| max damage fraction threshold to be applied. Range [0, 1]. For example 0.8 won't allow more then 80% of health damage to be applied. | |
| float | minDamageThreshold |
| min damage fraction threshold to be applied. Range [0, 1]. For example 0.1 filters all damage below 10% of health. | |
Material function implementers may choose their own set.
| NvBlastExtMaterial::NvBlastExtMaterial | ( | ) | [inline] |
| float NvBlastExtMaterial::getNormalizedDamage | ( | float | damageInHealth | ) | const [inline] |
Helper to normalize damage.
Pass damage defined in health, damage in range [0, 1] is returned, where 0 basically indicates that the threshold wasn't reached and there is no point in applying it.
| [in] | damageInHealth | Damage defined in terms of health amount to be reduced. |
health
max damage fraction threshold to be applied. Range [0, 1]. For example 0.8 won't allow more then 80% of health damage to be applied.
min damage fraction threshold to be applied. Range [0, 1]. For example 0.1 filters all damage below 10% of health.