00001 #pragma once
00002
00003 #include "shader_unreal.h"
00004 #include "texturecache.h"
00005
00006 class Shader_ComplexSurface : public Shader_Unreal
00007 {
00008 private:
00009 struct
00010 {
00011 ID3D10EffectScalarVariable* useTexturePass;
00012 ID3D10EffectShaderResourceVariable* textures;
00013 } variables;
00014 ID3D10BlendState *bstate_Translucent_ComplexSurface;
00015 static const int numBools = TextureCache::DUMMY_NUM_TEXTURE_PASSES -1;
00016 bool enableChanged;
00017 BOOL useTexturePass[numBools];
00018 bool simulateMultipassTexturing;
00019
00020 public:
00021 bool compile(const D3D10_SHADER_MACRO *macros, DWORD shaderFlags);
00022 Shader_ComplexSurface(bool simulateMultipassTexturing);
00023 ~Shader_ComplexSurface();
00024 void switchPass(TextureCache::TexturePass pass,BOOL val) ;
00025 void apply();
00026 void Shader_ComplexSurface::setTexture(int pass,ID3D10ShaderResourceView *texture) const;
00027 void setFlags(int flags);
00028 };