summaryrefslogtreecommitdiffstats
path: root/src/extras/shaders/standardConstants.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-19 16:10:22 +0200
committeraap <aap@papnet.eu>2020-08-19 16:10:22 +0200
commit827ba62671c6e2efe96259a0f130a4d167d14c2a (patch)
tree53bbc586e9a44d19d0cd1a67a69e9c49d9625662 /src/extras/shaders/standardConstants.h
parentchanging silly streaming memory limit (diff)
downloadre3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.gz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.bz2
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.lz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.xz
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.tar.zst
re3-827ba62671c6e2efe96259a0f130a4d167d14c2a.zip
Diffstat (limited to 'src/extras/shaders/standardConstants.h')
-rw-r--r--src/extras/shaders/standardConstants.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/extras/shaders/standardConstants.h b/src/extras/shaders/standardConstants.h
new file mode 100644
index 00000000..088df7dd
--- /dev/null
+++ b/src/extras/shaders/standardConstants.h
@@ -0,0 +1,28 @@
+float4x4 combinedMat : register(c0);
+float4x4 worldMat : register(c4);
+float3x3 normalMat : register(c8);
+float4 matCol : register(c12);
+float4 surfProps : register(c13);
+float4 fogData : register(c14);
+float4 ambientLight : register(c15);
+
+#define surfAmbient (surfProps.x)
+#define surfSpecular (surfProps.y)
+#define surfDiffuse (surfProps.z)
+
+#define fogStart (fogData.x)
+#define fogEnd (fogData.y)
+#define fogRange (fogData.z)
+#define fogDisable (fogData.w)
+
+#include "lighting.h"
+
+int numDirLights : register(i0);
+int numPointLights : register(i1);
+int numSpotLights : register(i2);
+int4 firstLight : register(c16);
+Light lights[8] : register(c17);
+
+#define firstDirLight (firstLight.x)
+#define firstPointLight (firstLight.y)
+#define firstSpotLight (firstLight.z)