mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-23 13:12:06 +00:00
Failed test to make shadows work
This commit is contained in:
@@ -61,7 +61,7 @@ enum GFX_SURFACE_FLAGS
|
||||
#define DEFAULT_SURFACE_LIGHT 1
|
||||
#define DEFAULT_SURFACE_LIGHTMAP 0
|
||||
#define DEFAULT_SURFACE_REFLECTION_PROBE 0
|
||||
#define DEFAULT_SURFACE_FLAGS 0
|
||||
#define DEFAULT_SURFACE_FLAGS (GFX_SURFACE_CASTS_SUN_SHADOW | GFX_SURFACE_CASTS_SHADOW)
|
||||
|
||||
const std::vector<std::string> spawnpointDefenderTypeArray = {
|
||||
"mp_ctf_spawn_allies",
|
||||
|
||||
@@ -258,8 +258,19 @@ private:
|
||||
memset(gfxWorld->dpvs.surfaceVisData[1], 0, surfaceCount);
|
||||
memset(gfxWorld->dpvs.surfaceVisData[2], 0, surfaceCount);
|
||||
memset(gfxWorld->dpvs.surfaceVisDataCameraSaved, 0, surfaceCount);
|
||||
memset(gfxWorld->dpvs.surfaceCastsShadow, 0, surfaceCount);
|
||||
memset(gfxWorld->dpvs.surfaceCastsSunShadow, 0, surfaceCount);
|
||||
|
||||
for (unsigned int i = 0; i < surfaceCount; i++)
|
||||
{
|
||||
if ((gfxWorld->dpvs.surfaces[i].flags & GFX_SURFACE_CASTS_SHADOW) == 0)
|
||||
gfxWorld->dpvs.surfaceCastsShadow[i] = 0;
|
||||
else
|
||||
gfxWorld->dpvs.surfaceCastsShadow[i] = 1;
|
||||
|
||||
if ((gfxWorld->dpvs.surfaces[i].flags & GFX_SURFACE_CASTS_SUN_SHADOW) == 0)
|
||||
gfxWorld->dpvs.surfaceCastsSunShadow[i] = 0;
|
||||
else
|
||||
gfxWorld->dpvs.surfaceCastsSunShadow[i] = 1;
|
||||
}
|
||||
|
||||
gfxWorld->dpvs.litSurfsBegin = 0;
|
||||
gfxWorld->dpvs.litSurfsEnd = surfaceCount;
|
||||
@@ -454,9 +465,9 @@ private:
|
||||
for (unsigned int i = 0; i < gfxWorld->primaryLightCount; i++)
|
||||
{
|
||||
gfxWorld->shadowGeom[i].smodelCount = 0;
|
||||
gfxWorld->shadowGeom[i].surfaceCount = 0;
|
||||
gfxWorld->shadowGeom[i].surfaceCount = gfxWorld->surfaceCount;
|
||||
gfxWorld->shadowGeom[i].smodelIndex = NULL;
|
||||
gfxWorld->shadowGeom[i].sortedSurfIndex = NULL;
|
||||
gfxWorld->shadowGeom[i].sortedSurfIndex = gfxWorld->dpvs.sortedSurfIndex;
|
||||
}
|
||||
|
||||
gfxWorld->lightRegion = new GfxLightRegion[gfxWorld->primaryLightCount];
|
||||
@@ -470,7 +481,7 @@ private:
|
||||
if (lightEntShadowVisSize != 0)
|
||||
{
|
||||
gfxWorld->primaryLightEntityShadowVis = new unsigned int[lightEntShadowVisSize];
|
||||
memset(gfxWorld->primaryLightEntityShadowVis, 0, lightEntShadowVisSize * sizeof(unsigned int));
|
||||
memset(gfxWorld->primaryLightEntityShadowVis, 1, lightEntShadowVisSize * sizeof(unsigned int));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user