Files
source-sdk-2013/sp/src/materialsystem/stdshaders/lightmappedgeneric_dx9_helper.h
Blixibon af85131deb Mapbase v3.1
- Fixed filter_damage_mod blocking all damage which doesn't match the secondary filter regardless of secondary filter mode
- Fixed impulse 101 and other give-related commands leaving behind weapons with occupied slots
- Fixed a crash with scripted_sound's PlaySoundOnEntity when the entity doesn't exist
- Added OnSoundFinished output to ambient_generic
- Added the ability to use custom models/nuggets with item_grubnugget
- Fixed a crash with citizen medics healing nonexistent targets
- Added "SetDistLook" and "SetDistTooFar" inputs for NPCs, allowing manual adjustment of NPC sight distance
- Added keyvalue and input to env_microphone for utilizing a different audio channel
- Added "SetPitchScale" input to env_microphone
- Fixed info_player_view_proxy not using angles
- Fixed dirt variant elite model not being recognized as elite
- Made headcrab hints properly register the start of use (for hint outputs)
- Made RPG use a more realistic firing rate for NPCs which aren't constrained by slow RPG animations, like soldiers
- Added spawnflag for func_breakable_surf to correctly play the break sound
- Added keyvalue for using cheaper warn sound code for combine_mines
- Added "OnSpawnNPC" output for npc_combinedropship when it spawns a soldier, rollermine, or strider
- Added signal gesture activities
- Fixed stunstick not using metrocop knockout/stun code correctly
- Fixed a possible crash involving a NPC's weapon being removed during alt-fire
- Fixed(?) flashlight shadow filters
- Added support for multiple look entities in trigger_look
- Added npc_metropolice alt-firing
- Fixed npc_metropolice using pistol burst firing on weapon_357
- Fixed npc_metropolice not deploying manhacks/throwing grenades in standoffs
- Fixed npc_metropolice not recognizing some crouch activities correctly
- Changed weapon_357 so it runs a tracer each shot from NPCs
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass
- Added "SetSpeedModifier" to NPCs, based on 1upD's shadow walker code
- Made game_convar_mod much more reliable
- Fixed non-mirrored npc_turret_lab refusing to die
- Made npc_turret_lab use SMG1 ammo instead of AR2 ammo
- Fixed block LOS brushes sometimes not working with players (and possibly similar issues)
- Raised maximum renderable entities from 4096 to 16384, based on ficool2's limit research
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass. Can display parallax corrected cubemaps from its unbroken form
- Fixed VBSP breaking func_breakable_surf, etc. when using parallax corrected cubemaps
- Raised maximum VBSP entities from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP worldlights from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP overlays from 512 to 8192, based on ficool2's limit research
- Other misc. fixes
2020-05-02 02:06:02 +00:00

148 lines
3.8 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef LIGHTMAPPEDGENERIC_DX9_HELPER_H
#define LIGHTMAPPEDGENERIC_DX9_HELPER_H
#include <string.h>
#include "BaseVSShader.h"
//-----------------------------------------------------------------------------
// Forward declarations
//-----------------------------------------------------------------------------
class CBaseVSShader;
class IMaterialVar;
class IShaderDynamicAPI;
class IShaderShadow;
//-----------------------------------------------------------------------------
// Init params/ init/ draw methods
//-----------------------------------------------------------------------------
struct LightmappedGeneric_DX9_Vars_t
{
LightmappedGeneric_DX9_Vars_t() { memset( this, 0xFF, sizeof(LightmappedGeneric_DX9_Vars_t) ); }
int m_nBaseTexture;
int m_nBaseTextureFrame;
int m_nBaseTextureTransform;
int m_nAlbedo;
int m_nSelfIllumTint;
int m_nAlpha2; // Hack for DoD srgb blend issues on overlays
int m_nDetail;
int m_nDetailFrame;
int m_nDetailScale;
int m_nDetailTextureCombineMode;
int m_nDetailTextureBlendFactor;
int m_nDetailTint;
int m_nEnvmap;
int m_nEnvmapFrame;
int m_nEnvmapMask;
int m_nEnvmapMaskFrame;
int m_nEnvmapMaskTransform;
int m_nEnvmapTint;
int m_nBumpmap;
int m_nBumpFrame;
int m_nBumpTransform;
int m_nEnvmapContrast;
int m_nEnvmapSaturation;
int m_nFresnelReflection;
int m_nNoDiffuseBumpLighting;
int m_nBumpmap2;
int m_nBumpFrame2;
int m_nBumpTransform2;
int m_nBumpMask;
int m_nBaseTexture2;
int m_nBaseTexture2Frame;
#ifdef MAPBASE
int m_nBaseTexture2Transform;
#endif
int m_nBaseTextureNoEnvmap;
int m_nBaseTexture2NoEnvmap;
int m_nDetailAlphaMaskBaseTexture;
int m_nFlashlightTexture;
int m_nFlashlightTextureFrame;
int m_nLightWarpTexture;
int m_nBlendModulateTexture;
int m_nMaskedBlending;
int m_nBlendMaskTransform;
int m_nSelfShadowedBumpFlag;
int m_nSeamlessMappingScale;
int m_nAlphaTestReference;
int m_nSoftEdges;
int m_nEdgeSoftnessStart;
int m_nEdgeSoftnessEnd;
int m_nOutline;
int m_nOutlineColor;
int m_nOutlineAlpha;
int m_nOutlineStart0;
int m_nOutlineStart1;
int m_nOutlineEnd0;
int m_nOutlineEnd1;
int m_nPhong;
int m_nPhongBoost;
int m_nPhongFresnelRanges;
int m_nPhongExponent;
#ifdef PARALLAX_CORRECTED_CUBEMAPS
// Parallax cubemaps
int m_nEnvmapParallax; // Needed for editor
int m_nEnvmapParallaxObb1;
int m_nEnvmapParallaxObb2;
int m_nEnvmapParallaxObb3;
int m_nEnvmapOrigin;
#endif
};
enum PhongMaskVariant_t
{
PHONGMASK_NONE,
PHONGMASK_BASEALPHA,
PHONGMASK_NORMALALPHA,
PHONGMASK_STANDALONE,
};
struct LightmappedGenericFlashlight_DX9_Vars_t : public CBaseVSShader::DrawFlashlight_dx90_Vars_t
{
LightmappedGenericFlashlight_DX9_Vars_t()
: m_nPhong( -1 )
, m_nPhongBoost( -1 )
, m_nPhongFresnelRanges( -1 )
, m_nPhongExponent( -1 )
, m_nPhongMask( -1 )
, m_nPhongMaskFrame( -1 )
{
}
int m_nPhong;
int m_nPhongBoost;
int m_nPhongFresnelRanges;
int m_nPhongExponent;
int m_nPhongMask;
int m_nPhongMaskFrame;
#ifdef MAPBASE
// Fix for displacements not showing $blendmodulatetexture under a flashlight
int m_nBlendModulateTexture;
#endif
};
void InitParamsLightmappedGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params, const char *pMaterialName, LightmappedGeneric_DX9_Vars_t &info );
void InitLightmappedGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params, LightmappedGeneric_DX9_Vars_t &info );
void DrawLightmappedGeneric_DX9( CBaseVSShader *pShader, IMaterialVar** params,
IShaderDynamicAPI *pShaderAPI, IShaderShadow* pShaderShadow,
LightmappedGeneric_DX9_Vars_t &info, CBasePerMaterialContextData **pContextDataPtr );
#endif // LIGHTMAPPEDGENERIC_DX9_HELPER_H