Skip to content

Commit

Permalink
xrRenderGL: Partial fix for volumetric lights. Removed useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLoaderr committed Jul 1, 2019
1 parent 64d6993 commit b34a209
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 77 deletions.
31 changes: 0 additions & 31 deletions src/Layers/xrRenderPC_GL/gl_rendertarget_accum_direct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,37 +1145,6 @@ void CRenderTarget::accum_direct_volumetric(u32 sub_phase, const u32 Offset, con
Element = s_accum_direct_volumetric_minmax->E[0];

// Assume everything was recalculated before this call by accum_direct

// Set correct depth surface
// It's slow. Make this when shader is created
{
char* pszSMapName;
BOOL b_HW_smap = RImplementation.o.HW_smap;
BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF;
if (b_HW_smap)
{
if (b_HW_PCF) pszSMapName = r2_RT_smap_depth;
else pszSMapName = r2_RT_smap_depth;
}
else pszSMapName = r2_RT_smap_surf;
//s_smap
STextureList* _T = &*Element->passes[0]->T;

STextureList::iterator _it = _T->begin();
STextureList::iterator _end = _T->end();
for (; _it != _end; ++_it)
{
std::pair<u32, ref_texture>& loader = *_it;
u32 load_id = loader.first;
// Shadowmap texture always uses 0 texture unit
if (load_id == 0)
{
// Assign correct texture
loader.second.create(pszSMapName);
}
}
}

// Perform lighting
{
// *** assume accumulator setted up ***
Expand Down
46 changes: 0 additions & 46 deletions src/Layers/xrRenderPC_GL/gl_rendertarget_accum_spot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,52 +421,6 @@ void CRenderTarget::accum_volumetric(light* L)

// Draw volume with projective texgen
{
/*
// Select shader
u32 _id = 0;
if (L->flags.bShadow) {
bool bFullSize = (L->X.S.size == RImplementation.o.smapsize);
if (L->X.S.transluent) _id = SE_L_TRANSLUENT;
else if (bFullSize) _id = SE_L_FULLSIZE;
else _id = SE_L_NORMAL;
} else {
_id = SE_L_UNSHADOWED;
m_Shadow = m_Lmap;
}
RCache.set_Element (shader->E[ _id ] );
*/

// Set correct depth surface
// It's slow. Make this when shader is created
{
char* pszSMapName;
BOOL b_HW_smap = RImplementation.o.HW_smap;
BOOL b_HW_PCF = RImplementation.o.HW_smap_PCF;
if (b_HW_smap)
{
if (b_HW_PCF) pszSMapName = r2_RT_smap_depth;
else pszSMapName = r2_RT_smap_depth;
}
else pszSMapName = r2_RT_smap_surf;
//s_smap
STextureList* _T = &*s_accum_volume->E[0]->passes[0]->T;

STextureList::iterator _it = _T->begin();
STextureList::iterator _end = _T->end();
for (; _it != _end; ++_it)
{
std::pair<u32, ref_texture>& loader = *_it;
u32 load_id = loader.first;
// Shadowmap texture always uses 0 texture unit
if (load_id == 0)
{
// Assign correct texture
loader.second.create(pszSMapName);
}
}
}


RCache.set_Element(shader->E[0]);

// Constants
Expand Down

0 comments on commit b34a209

Please sign in to comment.