Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

227 lines
5.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //===========================================================================//
  8. #include "shadershadowdx10.h"
  9. #include "utlvector.h"
  10. #include "materialsystem/imaterialsystem.h"
  11. #include "IHardwareConfigInternal.h"
  12. #include "shadersystem.h"
  13. #include "shaderapi/ishaderutil.h"
  14. #include "materialsystem/imesh.h"
  15. #include "tier0/dbg.h"
  16. #include "materialsystem/idebugtextureinfo.h"
  17. //-----------------------------------------------------------------------------
  18. // Class Factory
  19. //-----------------------------------------------------------------------------
  20. static CShaderShadowDx10 s_ShaderShadow;
  21. CShaderShadowDx10 *g_pShaderShadowDx10 = &s_ShaderShadow;
  22. EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CShaderShadowDx10, IShaderShadow,
  23. SHADERSHADOW_INTERFACE_VERSION, s_ShaderShadow )
  24. //-----------------------------------------------------------------------------
  25. // The shader shadow interface
  26. //-----------------------------------------------------------------------------
  27. CShaderShadowDx10::CShaderShadowDx10()
  28. {
  29. m_IsTranslucent = false;
  30. m_IsAlphaTested = false;
  31. m_bIsDepthWriteEnabled = true;
  32. m_bUsesVertexAndPixelShaders = false;
  33. }
  34. CShaderShadowDx10::~CShaderShadowDx10()
  35. {
  36. }
  37. // Sets the default *shadow* state
  38. void CShaderShadowDx10::SetDefaultState()
  39. {
  40. m_IsTranslucent = false;
  41. m_IsAlphaTested = false;
  42. m_bIsDepthWriteEnabled = true;
  43. m_bUsesVertexAndPixelShaders = false;
  44. }
  45. // Methods related to depth buffering
  46. void CShaderShadowDx10::DepthFunc( ShaderDepthFunc_t depthFunc )
  47. {
  48. }
  49. void CShaderShadowDx10::EnableDepthWrites( bool bEnable )
  50. {
  51. m_bIsDepthWriteEnabled = bEnable;
  52. }
  53. void CShaderShadowDx10::EnableDepthTest( bool bEnable )
  54. {
  55. }
  56. void CShaderShadowDx10::EnablePolyOffset( PolygonOffsetMode_t nOffsetMode )
  57. {
  58. }
  59. // Suppresses/activates color writing
  60. void CShaderShadowDx10::EnableColorWrites( bool bEnable )
  61. {
  62. }
  63. // Suppresses/activates alpha writing
  64. void CShaderShadowDx10::EnableAlphaWrites( bool bEnable )
  65. {
  66. }
  67. // Methods related to alpha blending
  68. void CShaderShadowDx10::EnableBlending( bool bEnable )
  69. {
  70. m_IsTranslucent = bEnable;
  71. }
  72. void CShaderShadowDx10::BlendFunc( ShaderBlendFactor_t srcFactor, ShaderBlendFactor_t dstFactor )
  73. {
  74. }
  75. void CShaderShadowDx10::BlendOp( ShaderBlendOp_t blendOp )
  76. {
  77. }
  78. void CShaderShadowDx10::BlendOpSeparateAlpha( ShaderBlendOp_t blendOp )
  79. {
  80. }
  81. // A simpler method of dealing with alpha modulation
  82. void CShaderShadowDx10::EnableAlphaPipe( bool bEnable )
  83. {
  84. }
  85. void CShaderShadowDx10::EnableConstantAlpha( bool bEnable )
  86. {
  87. }
  88. void CShaderShadowDx10::EnableVertexAlpha( bool bEnable )
  89. {
  90. }
  91. void CShaderShadowDx10::EnableTextureAlpha( TextureStage_t stage, bool bEnable )
  92. {
  93. }
  94. void CShaderShadowDx10::SetShadowDepthFiltering( Sampler_t stage )
  95. {
  96. }
  97. // Alpha testing
  98. void CShaderShadowDx10::EnableAlphaTest( bool bEnable )
  99. {
  100. m_IsAlphaTested = bEnable;
  101. }
  102. void CShaderShadowDx10::AlphaFunc( ShaderAlphaFunc_t alphaFunc, float alphaRef /* [0-1] */ )
  103. {
  104. }
  105. // Wireframe/filled polygons
  106. void CShaderShadowDx10::PolyMode( ShaderPolyModeFace_t face, ShaderPolyMode_t polyMode )
  107. {
  108. }
  109. // Back face culling
  110. void CShaderShadowDx10::EnableCulling( bool bEnable )
  111. {
  112. }
  113. // Alpha to coverage
  114. void CShaderShadowDx10::EnableAlphaToCoverage( bool bEnable )
  115. {
  116. }
  117. // constant color + transparency
  118. void CShaderShadowDx10::EnableConstantColor( bool bEnable )
  119. {
  120. }
  121. // Indicates the vertex format for use with a vertex shader
  122. // The flags to pass in here come from the VertexFormatFlags_t enum
  123. // If pTexCoordDimensions is *not* specified, we assume all coordinates
  124. // are 2-dimensional
  125. void CShaderShadowDx10::VertexShaderVertexFormat( unsigned int flags,
  126. int numTexCoords, int* pTexCoordDimensions,
  127. int userDataSize )
  128. {
  129. }
  130. // Indicates we're going to light the model
  131. void CShaderShadowDx10::EnableLighting( bool bEnable )
  132. {
  133. }
  134. void CShaderShadowDx10::EnableSpecular( bool bEnable )
  135. {
  136. }
  137. // Activate/deactivate skinning
  138. void CShaderShadowDx10::EnableVertexBlend( bool bEnable )
  139. {
  140. }
  141. // per texture unit stuff
  142. void CShaderShadowDx10::OverbrightValue( TextureStage_t stage, float value )
  143. {
  144. }
  145. void CShaderShadowDx10::EnableTexture( Sampler_t stage, bool bEnable )
  146. {
  147. }
  148. void CShaderShadowDx10::EnableCustomPixelPipe( bool bEnable )
  149. {
  150. }
  151. void CShaderShadowDx10::CustomTextureStages( int stageCount )
  152. {
  153. }
  154. void CShaderShadowDx10::CustomTextureOperation( TextureStage_t stage, ShaderTexChannel_t channel,
  155. ShaderTexOp_t op, ShaderTexArg_t arg1, ShaderTexArg_t arg2 )
  156. {
  157. }
  158. void CShaderShadowDx10::EnableTexGen( TextureStage_t stage, bool bEnable )
  159. {
  160. }
  161. void CShaderShadowDx10::TexGen( TextureStage_t stage, ShaderTexGenParam_t param )
  162. {
  163. }
  164. // Sets the vertex and pixel shaders
  165. void CShaderShadowDx10::SetVertexShader( const char *pShaderName, int vshIndex )
  166. {
  167. m_bUsesVertexAndPixelShaders = ( pShaderName != NULL );
  168. }
  169. void CShaderShadowDx10::EnableBlendingSeparateAlpha( bool bEnable )
  170. {
  171. }
  172. void CShaderShadowDx10::SetPixelShader( const char *pShaderName, int pshIndex )
  173. {
  174. m_bUsesVertexAndPixelShaders = ( pShaderName != NULL );
  175. }
  176. void CShaderShadowDx10::BlendFuncSeparateAlpha( ShaderBlendFactor_t srcFactor, ShaderBlendFactor_t dstFactor )
  177. {
  178. }
  179. // indicates what per-vertex data we're providing
  180. void CShaderShadowDx10::DrawFlags( unsigned int drawFlags )
  181. {
  182. }