summaryrefslogtreecommitdiff
path: root/Runtime/GfxDevice/d3d/CombinerD3D.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/GfxDevice/d3d/CombinerD3D.h
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/GfxDevice/d3d/CombinerD3D.h')
-rw-r--r--Runtime/GfxDevice/d3d/CombinerD3D.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Runtime/GfxDevice/d3d/CombinerD3D.h b/Runtime/GfxDevice/d3d/CombinerD3D.h
new file mode 100644
index 0000000..6f7fb05
--- /dev/null
+++ b/Runtime/GfxDevice/d3d/CombinerD3D.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "D3D9Includes.h"
+#include "External/shaderlab/Library/shadertypes.h"
+
+namespace ShaderLab {
+ struct TextureBinding;
+ class TexEnv;
+}
+
+
+const int kMaxD3DTextureStages = 8;
+const int kMaxD3DTextureStagesForPS = 4;
+
+struct D3DTextureStage
+{
+ D3DTEXTUREOP colorOp;
+ int colorArgs[3];
+ D3DTEXTUREOP alphaOp;
+ int alphaArgs[3];
+};
+
+struct TextureCombinersD3D
+{
+ static TextureCombinersD3D* Create( int count, const ShaderLab::TextureBinding* texEnvs, const ShaderLab::PropertySheet* props, bool hasVertexColorOrLighting, bool usesAddSpecular );
+ static void CleanupCombinerCache();
+
+ D3DTextureStage stages[kMaxD3DTextureStages+1];
+ int envCount, stageCount; // these might be different!
+ IDirect3DPixelShader9* pixelShader;
+ const ShaderLab::TextureBinding* texEnvs;
+
+ int textureFactorIndex;
+ bool textureFactorUsed;
+
+ int uniqueID;
+};