Browse Source

togl/togles: fix flashlight problems

pull/79/head
nillerusr 2 years ago
parent
commit
5e1ed3bd26
  1. 5
      build.sh
  2. 22
      togl/linuxwin/dxabstract.cpp
  3. 18
      togles/linuxwin/dxabstract.cpp
  4. 2
      togles/linuxwin/glmgr.cpp

5
build.sh

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
#!/bin/sh
# example: ./build.sh everything togl
make MAKE_VERBOSE=1 NO_CHROOT=1 -f $1.mak $2 -j$(nproc --all)

22
togl/linuxwin/dxabstract.cpp

@ -3762,12 +3762,16 @@ static uint32 CentroidMaskFromName( bool bPixelShader, const char *pName ) @@ -3762,12 +3762,16 @@ static uint32 CentroidMaskFromName( bool bPixelShader, const char *pName )
static int ShadowDepthSamplerMaskFromName( const char *pName )
{
if ( !pName )
return 0;
return 0;
if ( V_stristr( pName, "water_ps" ) )
{
return (1<<7);
}
else if ( V_stristr( pName, "skin_ps" ) )
{
return (1<<4);
}
else if ( V_stristr( pName, "infected_ps" ) )
{
return (1<<1);
@ -3794,7 +3798,7 @@ static int ShadowDepthSamplerMaskFromName( const char *pName ) @@ -3794,7 +3798,7 @@ static int ShadowDepthSamplerMaskFromName( const char *pName )
}
else if ( V_stristr( pName, "worldtwotextureblend_ps" ) )
{
return (1<<7);
return (1<<2);
}
else if ( V_stristr( pName, "teeth_flashlight_ps" ) )
{
@ -3811,27 +3815,27 @@ static int ShadowDepthSamplerMaskFromName( const char *pName ) @@ -3811,27 +3815,27 @@ static int ShadowDepthSamplerMaskFromName( const char *pName )
else if ( V_stristr( pName, "deferred_global_light_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "global_lit_simple_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "lightshafts_ps" ) )
{
return (1<<1);
}
}
else if ( V_stristr( pName, "multiblend_combined_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "multiblend_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "customhero_ps" ) )
{
return (1<<14);
}
}
// This shader doesn't have a shadow depth map sampler
return 0;

18
togles/linuxwin/dxabstract.cpp

@ -3763,15 +3763,15 @@ static uint32 CentroidMaskFromName( bool bPixelShader, const char *pName ) @@ -3763,15 +3763,15 @@ static uint32 CentroidMaskFromName( bool bPixelShader, const char *pName )
static int ShadowDepthSamplerMaskFromName( const char *pName )
{
if ( !pName )
return 0;
return 0;
if ( V_stristr( pName, "water_ps" ) )
{
return (1<<7);
}
else if ( V_stristr( pName, "skin_ps" ) )
{
return (1<<4) | (1<<6);
return (1<<4);
}
else if ( V_stristr( pName, "infected_ps" ) )
{
@ -3816,27 +3816,27 @@ static int ShadowDepthSamplerMaskFromName( const char *pName ) @@ -3816,27 +3816,27 @@ static int ShadowDepthSamplerMaskFromName( const char *pName )
else if ( V_stristr( pName, "deferred_global_light_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "global_lit_simple_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "lightshafts_ps" ) )
{
return (1<<1);
}
}
else if ( V_stristr( pName, "multiblend_combined_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "multiblend_ps" ) )
{
return (1<<14);
}
}
else if ( V_stristr( pName, "customhero_ps" ) )
{
return (1<<14);
}
}
// This shader doesn't have a shadow depth map sampler
return 0;

2
togles/linuxwin/glmgr.cpp

@ -4506,7 +4506,7 @@ void GLMContext::GenDebugFontTex( void ) @@ -4506,7 +4506,7 @@ void GLMContext::GenDebugFontTex( void )
//-----------------------------------------------------
// fetch elements of font data and make texels... we're doing the whole slab so we don't really need the stride info
unsigned long *destTexelPtr = (unsigned long *)lockAddress;
uint32 *destTexelPtr = (uint32 *)lockAddress;
for( int index = 0; index < 16384; index++ )
{

Loading…
Cancel
Save