|
|
@ -254,7 +254,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params |
|
|
|
// Debug force flesh on
|
|
|
|
// Debug force flesh on
|
|
|
|
vVsConst0[3] = IS_PARAM_DEFINED( info.m_nflDebugForceFleshOn ) ? params[info.m_nflDebugForceFleshOn]->GetFloatValue() : kDefaultDebugForceFleshOn; |
|
|
|
vVsConst0[3] = IS_PARAM_DEFINED( info.m_nflDebugForceFleshOn ) ? params[info.m_nflDebugForceFleshOn]->GetFloatValue() : kDefaultDebugForceFleshOn; |
|
|
|
|
|
|
|
|
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, vVsConst0, 1 ); |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_0, vVsConst0 ); |
|
|
|
|
|
|
|
|
|
|
|
// Flesh effect centers and radii
|
|
|
|
// Flesh effect centers and radii
|
|
|
|
float vVsConst1[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
float vVsConst1[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
@ -265,7 +265,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params |
|
|
|
vVsConst1[3] = 0.001f; |
|
|
|
vVsConst1[3] = 0.001f; |
|
|
|
vVsConst1[3] = 1.0f / vVsConst1[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
vVsConst1[3] = 1.0f / vVsConst1[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
} |
|
|
|
} |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_1, vVsConst1, 1 ); |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_1, vVsConst1 ); |
|
|
|
|
|
|
|
|
|
|
|
float vVsConst2[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
float vVsConst2[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius2 ) ) |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius2 ) ) |
|
|
@ -275,7 +275,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params |
|
|
|
vVsConst2[3] = 0.001f; |
|
|
|
vVsConst2[3] = 0.001f; |
|
|
|
vVsConst2[3] = 1.0f / vVsConst2[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
vVsConst2[3] = 1.0f / vVsConst2[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
} |
|
|
|
} |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vVsConst2, 2 ); |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_2, vVsConst2 ); |
|
|
|
|
|
|
|
|
|
|
|
float vVsConst3[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
float vVsConst3[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius3 ) ) |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius3 ) ) |
|
|
@ -285,7 +285,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params |
|
|
|
vVsConst3[3] = 0.001f; |
|
|
|
vVsConst3[3] = 0.001f; |
|
|
|
vVsConst3[3] = 1.0f / vVsConst3[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
vVsConst3[3] = 1.0f / vVsConst3[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
} |
|
|
|
} |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_3, vVsConst3, 3 ); |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_3, vVsConst3 ); |
|
|
|
|
|
|
|
|
|
|
|
float vVsConst4[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
float vVsConst4[4] = { kDefaultEffectCenterRadius[0], kDefaultEffectCenterRadius[1], kDefaultEffectCenterRadius[2], kDefaultEffectCenterRadius[3] }; |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius4 ) ) |
|
|
|
if ( IS_PARAM_DEFINED( info.m_nvEffectCenterRadius4 ) ) |
|
|
@ -295,7 +295,7 @@ void DrawFleshInteriorBlendedPass( CBaseVSShader *pShader, IMaterialVar** params |
|
|
|
vVsConst4[3] = 0.001f; |
|
|
|
vVsConst4[3] = 0.001f; |
|
|
|
vVsConst4[3] = 1.0f / vVsConst4[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
vVsConst4[3] = 1.0f / vVsConst4[3]; // Pass 1.0/radius so we do a mul instead of a divide in the shader
|
|
|
|
} |
|
|
|
} |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, vVsConst4, 4 ); |
|
|
|
pShaderAPI->SetVertexShaderConstant( VERTEX_SHADER_SHADER_SPECIFIC_CONST_4, vVsConst4 ); |
|
|
|
|
|
|
|
|
|
|
|
// Set Pixel Shader Combos
|
|
|
|
// Set Pixel Shader Combos
|
|
|
|
if( g_pHardwareConfig->SupportsPixelShaders_2_b() ) |
|
|
|
if( g_pHardwareConfig->SupportsPixelShaders_2_b() ) |
|
|
|