summaryrefslogtreecommitdiff
path: root/public/materialsystem/deformations.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /public/materialsystem/deformations.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'public/materialsystem/deformations.h')
-rw-r--r--public/materialsystem/deformations.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/public/materialsystem/deformations.h b/public/materialsystem/deformations.h
new file mode 100644
index 0000000..083ceeb
--- /dev/null
+++ b/public/materialsystem/deformations.h
@@ -0,0 +1,58 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//===========================================================================//
+
+#ifndef DEFORMATIONS_H
+#define DEFORMATIONS_H
+
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "tier0/platform.h"
+
+// nonlinear transformations which may be applied to model vertices when rendering. must be powers of two
+enum DeformationType_t
+{
+ DEFORMATION_CLAMP_TO_BOX_IN_WORLDSPACE = 1, // minxyz.minsoftness / maxxyz.maxsoftness
+};
+
+
+struct DeformationBase_t // base class. don't use this
+{
+ DeformationType_t m_eType;
+};
+
+
+struct BoxDeformation_t : DeformationBase_t
+{
+ // don't change the layout without changing code in shaderapidx8!!!!
+ Vector m_SourceMins; // cube to clamp within
+ float m_flPad0;
+ Vector m_SourceMaxes;
+ float m_flPad1;
+
+ Vector m_ClampMins;
+ float m_flPad2;
+ Vector m_ClampMaxes;
+ float m_flPad3;
+
+ FORCEINLINE BoxDeformation_t( void )
+ {
+ m_eType = DEFORMATION_CLAMP_TO_BOX_IN_WORLDSPACE;
+ // invalid cube
+ m_SourceMins.Init( 0,0,0 );
+ m_SourceMaxes.Init( -1, -1, -1 );
+
+ // no clamp
+ m_ClampMins.Init( -FLT_MAX, -FLT_MAX, -FLT_MAX );
+ m_ClampMaxes.Init( FLT_MAX, FLT_MAX, FLT_MAX );
+ }
+
+};
+
+
+
+#endif