mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2025-12-31 17:48:52 +03:00
wip2
This commit is contained in:
BIN
sp/game/bin/captioncompiler.exe
Normal file
BIN
sp/game/bin/captioncompiler.exe
Normal file
Binary file not shown.
BIN
sp/game/bin/captioncompiler.pdb
Normal file
BIN
sp/game/bin/captioncompiler.pdb
Normal file
Binary file not shown.
@@ -97,7 +97,9 @@ private:
|
||||
|
||||
bool m_bAlwaysDraw;
|
||||
//bool m_bProjectedTextureVersion;
|
||||
public:
|
||||
CTextureReference m_depthTex; // Depth-stencil surface
|
||||
private:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#endif
|
||||
#ifdef MAPBASE
|
||||
#include "materialsystem/itexture.h"
|
||||
#include "clientshadowtexturehandler.hpp"
|
||||
#endif
|
||||
#include "shareddefs.h"
|
||||
#include "materialsystem/imesh.h"
|
||||
@@ -121,12 +122,13 @@ void C_EnvProjectedTexture::Spawn()
|
||||
materials->BeginRenderTargetAllocation();
|
||||
|
||||
ImageFormat dstFormat = materials->GetShadowDepthTextureFormat(); // Vendor-dependent depth texture format
|
||||
materials->BeginRenderTargetAllocation();
|
||||
|
||||
char strRTName[64];
|
||||
Q_snprintf(strRTName, ARRAYSIZE(strRTName), "_rt_InternalShadowDepthTexture_%d", entindex()); //use entindex for individual rt name
|
||||
|
||||
m_depthTex.InitRenderTarget(512, 512, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName);
|
||||
volatile const char* bebr = ((ITexture*)m_depthTex)->GetName();
|
||||
Msg("%s", bebr);
|
||||
|
||||
materials->EndRenderTargetAllocation();
|
||||
#endif
|
||||
@@ -440,7 +442,8 @@ void C_EnvProjectedTexture::UpdateLight( void )
|
||||
state.m_flShadowDepthBias = mat_depthbias_shadowmap.GetFloat();
|
||||
state.m_flShadowAtten = m_flShadowAtten;
|
||||
state.m_flShadowFilterSize = m_flShadowFilter;
|
||||
state.m_pShadowDepthTexture = m_depthTex;
|
||||
|
||||
g_flashlightDepthHandler.AddDepthTexture(entindex(), m_depthTex);
|
||||
#else
|
||||
state.m_fQuadraticAtten = 0.0;
|
||||
state.m_fLinearAtten = 100;
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
#include "cmodel.h"
|
||||
#ifdef MAPBASE
|
||||
#include "renderparm.h"
|
||||
#include "clientshadowtexturehandler.hpp"
|
||||
#endif
|
||||
#ifdef ASW_PROJECTED_TEXTURES
|
||||
#include "flashlighteffect.h"
|
||||
@@ -4462,6 +4463,7 @@ void CClientShadowMgr::ComputeShadowDepthTextures( const CViewSetup &viewSetup )
|
||||
|
||||
CTextureReference shadowDepthTexture;
|
||||
bool bGotShadowDepthTexture = LockShadowDepthTexture( &shadowDepthTexture );
|
||||
shadowDepthTexture = *(CTextureReference*)flashlightState.m_pShadowDepthTexture;
|
||||
if ( !bGotShadowDepthTexture )
|
||||
{
|
||||
// If we don't get one, that means we have too many this frame so bind no depth texture
|
||||
@@ -4489,7 +4491,9 @@ void CClientShadowMgr::ComputeShadowDepthTextures( const CViewSetup &viewSetup )
|
||||
#endif
|
||||
shadowView.x = shadowView.y = 0;
|
||||
shadowView.width = shadowDepthTexture->GetActualWidth();
|
||||
//shadowView.width = flashlightState.m_pShadowDepthTexture->GetActualWidth();
|
||||
shadowView.height = shadowDepthTexture->GetActualHeight();
|
||||
//shadowView.height = flashlightState.m_pShadowDepthTexture->GetActualHeight();
|
||||
#ifndef ASW_PROJECTED_TEXTURES
|
||||
shadowView.m_bOrtho = false;
|
||||
shadowView.m_bDoBloomAndToneMapping = false;
|
||||
@@ -4544,8 +4548,9 @@ void CClientShadowMgr::ComputeShadowDepthTextures( const CViewSetup &viewSetup )
|
||||
|
||||
// Render to the shadow depth texture with appropriate view
|
||||
view->UpdateShadowDepthTexture( m_DummyColorTexture, shadowDepthTexture, shadowView );
|
||||
//if(flashlightState.m_pShadowDepthTexture)
|
||||
// view->UpdateShadowDepthTexture( m_DummyColorTexture, (flashlightState.m_pShadowDepthTexture), shadowView );
|
||||
//view->UpdateShadowDepthTexture( m_DummyColorTexture, shadowDepthTexture, shadowView );
|
||||
view->UpdateShadowDepthTexture( m_DummyColorTexture, (flashlightState.m_pShadowDepthTexture), shadowView );
|
||||
|
||||
#ifdef MAPBASE
|
||||
if ( j <= ( INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_LAST - INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_FIRST ) )
|
||||
|
||||
42
sp/src/game/client/clientshadowtexturehandler.hpp
Normal file
42
sp/src/game/client/clientshadowtexturehandler.hpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "cbase.h"
|
||||
#include "materialsystem/itexture.h"
|
||||
|
||||
class CFlashlightDepthHandler
|
||||
{
|
||||
public:
|
||||
CFlashlightDepthHandler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
~CFlashlightDepthHandler()
|
||||
{
|
||||
m_ShadowDepthTexture.Purge();
|
||||
}
|
||||
|
||||
void AddDepthTexture(ShadowHandle_t index, CTextureReference tex)
|
||||
{
|
||||
m_ShadowDepthTexture.InsertOrReplace(index, tex);
|
||||
}
|
||||
|
||||
int GetCount() { return m_ShadowDepthTexture.Count(); }
|
||||
|
||||
CTextureReference GetDepthTexture(ShadowHandle_t index)
|
||||
{
|
||||
int i = m_ShadowDepthTexture.Find(index);
|
||||
|
||||
return m_ShadowDepthTexture[i];
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
CUtlMap<ShadowHandle_t, CTextureReference, int> m_ShadowDepthTexture;
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
CFlashlightDepthHandler g_flashlightDepthHandler;
|
||||
Binary file not shown.
BIN
sp/src/lib/public/mathlib.pdb
Normal file
BIN
sp/src/lib/public/mathlib.pdb
Normal file
Binary file not shown.
Binary file not shown.
BIN
sp/src/lib/public/raytrace.pdb
Normal file
BIN
sp/src/lib/public/raytrace.pdb
Normal file
Binary file not shown.
Binary file not shown.
BIN
sp/src/lib/public/tier1.pdb
Normal file
BIN
sp/src/lib/public/tier1.pdb
Normal file
Binary file not shown.
Binary file not shown.
BIN
sp/src/lib/public/vgui_controls.pdb
Normal file
BIN
sp/src/lib/public/vgui_controls.pdb
Normal file
Binary file not shown.
BIN
sp/src/lib/public/vscript.pdb
Normal file
BIN
sp/src/lib/public/vscript.pdb
Normal file
Binary file not shown.
@@ -415,8 +415,6 @@ struct MaterialVideoMode_t
|
||||
int m_RefreshRate; // 0 == default (ignored for windowed mode)
|
||||
};
|
||||
|
||||
class CTextureReference;
|
||||
|
||||
// fixme: should move this into something else.
|
||||
struct FlashlightState_t
|
||||
{
|
||||
@@ -501,7 +499,6 @@ struct FlashlightState_t
|
||||
|
||||
#ifdef MAPBASE
|
||||
bool m_bAlwaysDraw;
|
||||
ITexture *m_pShadowDepthTexture;
|
||||
#endif
|
||||
|
||||
// Getters for scissor members
|
||||
|
||||
BIN
sp/src/utils/captioncompiler/Release/captioncompiler.exe
Normal file
BIN
sp/src/utils/captioncompiler/Release/captioncompiler.exe
Normal file
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs>
|
||||
<ProjectOutput>
|
||||
<FullPath>C:\Users\Huawei\Documents\GitHub\source-sdk-2013\sp\src\utils\captioncompiler\Release\captioncompiler.exe</FullPath>
|
||||
</ProjectOutput>
|
||||
</ProjectOutputs>
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
sp/src/utils/captioncompiler/Release/captioncompiler.pdb
Normal file
BIN
sp/src/utils/captioncompiler/Release/captioncompiler.pdb
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
C:\Users\Huawei\Documents\GitHub\source-sdk-2013\sp\src\utils\captioncompiler\Release\captioncompiler.exe
|
||||
BIN
sp/src/utils/captioncompiler/Release/vc143.pdb
Normal file
BIN
sp/src/utils/captioncompiler/Release/vc143.pdb
Normal file
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project>
|
||||
<ProjectOutputs />
|
||||
<ContentFiles />
|
||||
<SatelliteDlls />
|
||||
<NonRecipeFileRefs />
|
||||
</Project>
|
||||
BIN
sp/src/vgui2/vgui_controls/Debug/vgui_controls.pdb
Normal file
BIN
sp/src/vgui2/vgui_controls/Debug/vgui_controls.pdb
Normal file
Binary file not shown.
Reference in New Issue
Block a user