mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-17 20:10:21 +03:00
Mapbase v2.0; bulk commit
- Added custom map compile tools (vbsp, vvis, vrad) - Changed blink fix (shouldn't change anything in-game) - Added auto-completion to ent_create, npc_create, and the main set of "npc_" debug commands - Added ent_create_aimed, an ent_create equivalent of npc_create_aimed - Made hunters start using the "vs. player" melee animation against smaller NPCs that look weird with the "stab" attack - Added "explosion_sparks" convar, which fixes broken code for giving explosions sparks (disabled by default because of how different it looks) - Made interaction code capable of being dispatched on any entity, not just combat characters - Added npc_barnacle_ignite convar, which lets barnacles be ignited by flares - Fixed certain NPCs getting out of the way for the player when they hate them - Fixed auto-generated "speak" scene responses not using parameters that work on real VCDs - Made "stop_on_nonidle" capable of being used in any mod, not just HL2 episodic mods - Selectable color for ragdoll boogie/point_ragdollboogie - Fixed PickupWeaponInstant not firing weapon pickup outputs - Introduced inputs and keyvalues for "lerping" to math_counter_advanced - Fixed ClearConsole on logic_console - logic_convar should now detect client convars correctly - New NormalizeAngles input on math_vector - logic_modelinfo LookupActivity input - math_generate fixed and expanded to be more like math_counter - Added a WIP game logging system for playtesting maps - Introduced logic_playerinfo, an entity that can read a player's name or ID - Fixed some new filters not working with filter_multi - Added radius pickup spawnflag to func_physbox - Added "Preserve name" spawnflag to weapons - Added cc_achievement_debug message for when an achievement doesn't exist - Made npc_combine_s not speak while in logic_choreographed_scenes - Fixed zombie torsos/legs/headcrabs not being serverside when zombie is forced to server ragdoll - Expanded and cleaned up npc_zombie_custom - Fixed func_commandredirects not cleaning up correctly and sometimes crashing the game - Allowed player squad commands to go through +USE-held objects - Added a bunch of I/O/KV to trigger_waterydeath for better configuration - Changed save comment system to use the chapter title from world properties, and the ability to suppress the title popup that normally results from it - Adjusted game_convar_mod for MP planning - Removed the func_precipitation custom particle/splash code for now, as it was causing problems - Fixed env_global_light not accepting lightcolor - Added "Additional Buttons" to player_speedmod - Added save comment to RPC - Added env_projectedtexture attenuation - Added scripted_sequence OnPreIdleSequence - Added OnCrab to zombies - Added skill_changed game event (may need further testing) - Added a fix for viewmodels flipping under extreme FOV values - Added code that allows mappers to change the skin on shotgunners without it usually flipping back randomly - Fixed a very, very, very major shader performance issue - New SetAbsOrigin/Angles inputs on all entities, analogous to SetLocalOrigin/Angles - Code improvements for I/O involving angles - logic_entity_position improvements/fixes, including a new OutAngles output that outputs the angles on position calls - Alternate collision/player avoidance spawnflag obsoletion enforcement disabled - Enable/DisableHazardLights inputs on the EP2 jalopy, equivalent to the keyvalue - Miscellaneous shader formatting adjustments and fixes - Fixed AlwaysDrawOff on env_projectedtexture not being a valid input
This commit is contained in:
@@ -170,7 +170,7 @@ float4 main( PS_INPUT i ) : COLOR
|
||||
float4 stretchColor = tex2D( StretchSampler, i.baseTexCoordDetailTexCoord.xy );
|
||||
|
||||
// Apply wrinkle blend to only RGB. Alpha comes from the base texture
|
||||
baseColor.rgb = flTextureAmount * baseColor + flWrinkleAmount * wrinkleColor + flStretchAmount * stretchColor;
|
||||
baseColor.rgb = flTextureAmount * baseColor.rgb + flWrinkleAmount * wrinkleColor.rgb + flStretchAmount * stretchColor.rgb;
|
||||
#endif
|
||||
|
||||
#if DETAILTEXTURE
|
||||
@@ -235,7 +235,7 @@ float4 main( PS_INPUT i ) : COLOR
|
||||
envMapColor = (ENV_MAP_SCALE *
|
||||
lerp(1, fFresnelRanges, g_EnvMapFresnel.x) *
|
||||
lerp(fEnvMapMask, 1-fEnvMapMask, g_fInvertPhongMask)) *
|
||||
texCUBE( EnvmapSampler, vReflect ) *
|
||||
texCUBE( EnvmapSampler, vReflect ).xyz *
|
||||
g_EnvmapTint_ShadowTweaks.xyz;
|
||||
}
|
||||
}
|
||||
@@ -332,7 +332,7 @@ float4 main( PS_INPUT i ) : COLOR
|
||||
float flSelfIllumFresnel = ( pow( saturate( dot( vVertexNormal.xyz, vEyeDir.xyz ) ), g_SelfIllumScaleBiasExpBrightness.z ) * g_SelfIllumScaleBiasExpBrightness.x ) + g_SelfIllumScaleBiasExpBrightness.y;
|
||||
diffuseComponent = lerp( diffuseComponent, g_SelfIllumTint_and_DetailBlendFactor.rgb * albedo * g_SelfIllumScaleBiasExpBrightness.w, baseColor.a * saturate( flSelfIllumFresnel ) );
|
||||
#else
|
||||
float3 vSelfIllumMask = tex2D( SelfIllumMaskSampler, i.baseTexCoordDetailTexCoord.xy );
|
||||
float3 vSelfIllumMask = tex2D( SelfIllumMaskSampler, i.baseTexCoordDetailTexCoord.xy ).xyz;
|
||||
vSelfIllumMask = lerp( baseColor.aaa, vSelfIllumMask, g_SelfIllumMaskControl );
|
||||
diffuseComponent = lerp( diffuseComponent, g_SelfIllumTint_and_DetailBlendFactor.rgb * albedo, vSelfIllumMask );
|
||||
#endif
|
||||
|
||||
@@ -192,7 +192,7 @@ float4 DecompressNormal( sampler NormalSampler, float2 tc, int nDecompressionMod
|
||||
HALF3 NormalizeWithCubemap( sampler normalizeSampler, HALF3 input )
|
||||
{
|
||||
// return texCUBE( normalizeSampler, input ) * 2.0f - 1.0f;
|
||||
return texCUBE( normalizeSampler, input );
|
||||
return texCUBE( normalizeSampler, input ).xyz;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -209,6 +209,13 @@ HALF4 EnvReflect( sampler envmapSampler,
|
||||
}
|
||||
*/
|
||||
|
||||
// Vectorized smoothstep for doing three smoothsteps at once. Used by uberlight
|
||||
float3 smoothstep3( float3 edge0, float3 edge1, float3 OneOverWidth, float3 x )
|
||||
{
|
||||
x = saturate((x - edge0) * OneOverWidth); // Scale, bias and saturate x to the range of zero to one
|
||||
return x*x*(3-2*x); // Evaluate polynomial
|
||||
}
|
||||
|
||||
float CalcWaterFogAlpha( const float flWaterZ, const float flEyePosZ, const float flWorldPosZ, const float flProjPosZ, const float flFogOORange )
|
||||
{
|
||||
#if 0
|
||||
|
||||
@@ -116,7 +116,7 @@ float3 DiffuseTerm(const bool bHalfLambert, const float3 worldNormal, const floa
|
||||
float3 fOut = float3( fResult, fResult, fResult );
|
||||
if ( bDoLightingWarp )
|
||||
{
|
||||
fOut = 2.0f * tex1D( lightWarpSampler, fResult );
|
||||
fOut = 2.0f * tex1D( lightWarpSampler, fResult ).xyz;
|
||||
}
|
||||
|
||||
return fOut;
|
||||
@@ -146,7 +146,7 @@ float3 PixelShaderGetLightVector( const float3 worldPos, PixelShaderLightInfo cL
|
||||
}
|
||||
else
|
||||
{
|
||||
return normalize( cLightInfo[nLightIndex].pos - worldPos );
|
||||
return normalize( cLightInfo[nLightIndex].pos.xyz - worldPos );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ void SpecularAndRimTerms( const float3 vWorldNormal, const float3 vLightDir, con
|
||||
|
||||
// Optionally warp as function of scalar specular and fresnel
|
||||
if ( bDoSpecularWarp )
|
||||
specularLighting *= tex2D( specularWarpSampler, float2(specularLighting.x, fFresnel) ); // Sample at { (L.R)^k, fresnel }
|
||||
specularLighting *= tex2D( specularWarpSampler, float2(specularLighting.x, fFresnel) ).xyz; // Sample at { (L.R)^k, fresnel }
|
||||
|
||||
specularLighting *= saturate(dot( vWorldNormal, vLightDir )); // Mask with N.L
|
||||
specularLighting *= color; // Modulate with light color
|
||||
@@ -286,19 +286,19 @@ float3 PixelShaderDoLightingLinear( const float3 worldPos, const float3 worldNor
|
||||
if ( nNumLights > 0 )
|
||||
{
|
||||
linearColor += PixelShaderDoGeneralDiffuseLight( lightAtten.x, worldPos, worldNormal, NormalizeSampler,
|
||||
cLightInfo[0].pos, cLightInfo[0].color, bHalfLambert,
|
||||
cLightInfo[0].pos.xyz, cLightInfo[0].color.xyz, bHalfLambert,
|
||||
bDoAmbientOcclusion, fAmbientOcclusion,
|
||||
bDoLightingWarp, lightWarpSampler );
|
||||
if ( nNumLights > 1 )
|
||||
{
|
||||
linearColor += PixelShaderDoGeneralDiffuseLight( lightAtten.y, worldPos, worldNormal, NormalizeSampler,
|
||||
cLightInfo[1].pos, cLightInfo[1].color, bHalfLambert,
|
||||
cLightInfo[1].pos.xyz, cLightInfo[1].color.xyz, bHalfLambert,
|
||||
bDoAmbientOcclusion, fAmbientOcclusion,
|
||||
bDoLightingWarp, lightWarpSampler );
|
||||
if ( nNumLights > 2 )
|
||||
{
|
||||
linearColor += PixelShaderDoGeneralDiffuseLight( lightAtten.z, worldPos, worldNormal, NormalizeSampler,
|
||||
cLightInfo[2].pos, cLightInfo[2].color, bHalfLambert,
|
||||
cLightInfo[2].pos.xyz, cLightInfo[2].color.xyz, bHalfLambert,
|
||||
bDoAmbientOcclusion, fAmbientOcclusion,
|
||||
bDoLightingWarp, lightWarpSampler );
|
||||
if ( nNumLights > 3 )
|
||||
|
||||
@@ -1715,13 +1715,15 @@ void DrawLightmappedGeneric_DX9(CBaseVSShader *pShader, IMaterialVar** params,
|
||||
{
|
||||
bool hasFlashlight = pShader->UsingFlashlight( params );
|
||||
|
||||
ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
|
||||
if ( !IsX360() && !r_flashlight_version2.GetInt() )
|
||||
{
|
||||
DrawLightmappedGeneric_DX9_Internal( pShader, params, hasFlashlight, pShaderAPI, pShaderShadow, info, pContextDataPtr );
|
||||
return;
|
||||
}
|
||||
|
||||
DrawLightmappedGeneric_DX9_Internal( pShader, params, hasFlashlight, pShaderAPI, pShaderShadow, info, pContextDataPtr );
|
||||
|
||||
//ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
//
|
||||
//if ( !IsX360() && !r_flashlight_version2.GetInt() )
|
||||
//{
|
||||
// DrawLightmappedGeneric_DX9_Internal( pShader, params, hasFlashlight, pShaderAPI, pShaderShadow, info, pContextDataPtr );
|
||||
// return;
|
||||
//}
|
||||
//
|
||||
//DrawLightmappedGeneric_DX9_Internal( pShader, params, hasFlashlight, pShaderAPI, pShaderShadow, info, pContextDataPtr );
|
||||
}
|
||||
@@ -992,18 +992,18 @@ void DrawSkin_DX9( CBaseVSShader *pShader, IMaterialVar** params, IShaderDynamic
|
||||
CBasePerMaterialContextData **pContextDataPtr )
|
||||
|
||||
{
|
||||
ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
//ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
|
||||
bool bHasFlashlight = pShader->UsingFlashlight( params );
|
||||
if ( bHasFlashlight && ( IsX360() || r_flashlight_version2.GetBool() ) )
|
||||
{
|
||||
DrawSkin_DX9_Internal( pShader, params, pShaderAPI,
|
||||
pShaderShadow, false, info, vertexCompression, pContextDataPtr++ );
|
||||
if ( pShaderShadow )
|
||||
{
|
||||
pShader->SetInitialShadowState( );
|
||||
}
|
||||
}
|
||||
//if ( bHasFlashlight && ( IsX360() || r_flashlight_version2.GetBool() ) )
|
||||
//{
|
||||
// DrawSkin_DX9_Internal( pShader, params, pShaderAPI,
|
||||
// pShaderShadow, false, info, vertexCompression, pContextDataPtr++ );
|
||||
// if ( pShaderShadow )
|
||||
// {
|
||||
// pShader->SetInitialShadowState( );
|
||||
// }
|
||||
//}
|
||||
DrawSkin_DX9_Internal( pShader, params, pShaderAPI,
|
||||
pShaderShadow, bHasFlashlight, info, vertexCompression, pContextDataPtr );
|
||||
}
|
||||
|
||||
@@ -187,10 +187,10 @@ BEGIN_VS_SHADER( SDK_UnlitGeneric, "Help for SDK_UnlitGeneric" )
|
||||
VertexLitGeneric_DX9_Vars_t vars;
|
||||
SetupVars( vars );
|
||||
|
||||
ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
//ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
|
||||
bool bNewFlashlightPath = IsX360() || ( r_flashlight_version2.GetInt() != 0 );
|
||||
if ( ( pShaderShadow == NULL ) && ( pShaderAPI != NULL ) && !bNewFlashlightPath && pShaderAPI->InFlashlightMode() ) // Not snapshotting && flashlight pass
|
||||
//bool bNewFlashlightPath = IsX360() || ( r_flashlight_version2.GetInt() != 0 );
|
||||
if ( ( pShaderShadow == NULL ) && ( pShaderAPI != NULL ) && /*!bNewFlashlightPath &&*/ pShaderAPI->InFlashlightMode() ) // Not snapshotting && flashlight pass
|
||||
{
|
||||
Draw( false );
|
||||
}
|
||||
|
||||
@@ -487,10 +487,10 @@ END_SHADER_PARAMS
|
||||
|
||||
SHADER_DRAW
|
||||
{
|
||||
ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
//ConVarRef r_flashlight_version2 = ConVarRef( "r_flashlight_version2" );
|
||||
|
||||
bool bHasFlashlight = UsingFlashlight( params );
|
||||
if ( bHasFlashlight && ( IsX360() || r_flashlight_version2.GetInt() ) )
|
||||
if ( bHasFlashlight /*&& ( IsX360() || r_flashlight_version2.GetInt() )*/ )
|
||||
{
|
||||
DrawPass( params, pShaderAPI, pShaderShadow, false, vertexCompression );
|
||||
SHADOW_STATE
|
||||
|
||||
Reference in New Issue
Block a user