mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +00:00
Merge remote-tracking branch 'nash/lightmaps2' into lightmaps2
This commit is contained in:
commit
f5c8953fc7
11 changed files with 16 additions and 85 deletions
Binary file not shown.
|
@ -977,7 +977,6 @@ set (PCH_SOURCES
|
||||||
r_data/colormaps.cpp
|
r_data/colormaps.cpp
|
||||||
r_data/gldefs.cpp
|
r_data/gldefs.cpp
|
||||||
r_data/a_dynlightdata.cpp
|
r_data/a_dynlightdata.cpp
|
||||||
r_data/a_lightprobe.cpp
|
|
||||||
r_data/r_translate.cpp
|
r_data/r_translate.cpp
|
||||||
r_data/sprites.cpp
|
r_data/sprites.cpp
|
||||||
r_data/portalgroups.cpp
|
r_data/portalgroups.cpp
|
||||||
|
@ -1387,14 +1386,12 @@ if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
endif()
|
endif()
|
||||||
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
|
||||||
# Need to enable intrinsics for these files.
|
# Need to enable intrinsics for these files.
|
||||||
if( SSE_MATTERS )
|
|
||||||
set_property( SOURCE
|
set_property( SOURCE
|
||||||
common/rendering/polyrenderer/poly_all.cpp
|
common/rendering/polyrenderer/poly_all.cpp
|
||||||
|
common/utility/palette.cpp
|
||||||
|
common/utility/x86.cpp
|
||||||
rendering/swrenderer/r_all.cpp
|
rendering/swrenderer/r_all.cpp
|
||||||
utility/palette.cpp
|
APPEND_STRING PROPERTY COMPILE_FLAGS " ${SSE2_ENABLE}" )
|
||||||
utility/x86.cpp
|
|
||||||
APPEND_STRING PROPERTY COMPILE_FLAGS " -msse2 -mmmx" )
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( APPLE )
|
if( APPLE )
|
||||||
|
|
|
@ -706,6 +706,9 @@ xx(suncolor)
|
||||||
xx(sundirx)
|
xx(sundirx)
|
||||||
xx(sundiry)
|
xx(sundiry)
|
||||||
xx(sundirz)
|
xx(sundirz)
|
||||||
|
xx(sampledistance)
|
||||||
|
xx(bounces)
|
||||||
|
xx(gridsize)
|
||||||
|
|
||||||
// USDF keywords
|
// USDF keywords
|
||||||
xx(Amount)
|
xx(Amount)
|
||||||
|
|
|
@ -762,6 +762,9 @@ public:
|
||||||
case NAME_sundirx:
|
case NAME_sundirx:
|
||||||
case NAME_sundiry:
|
case NAME_sundiry:
|
||||||
case NAME_sundirz:
|
case NAME_sundirz:
|
||||||
|
case NAME_sampledistance:
|
||||||
|
case NAME_bounces:
|
||||||
|
case NAME_gridsize:
|
||||||
CHECK_N(Zd | Zdt)
|
CHECK_N(Zd | Zdt)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
** Light Probe Actor
|
|
||||||
** Copyright (c) 2021 Nash Muhandes, Magnus Norddahl
|
|
||||||
**
|
|
||||||
** This software is provided 'as-is', without any express or implied
|
|
||||||
** warranty. In no event will the authors be held liable for any damages
|
|
||||||
** arising from the use of this software.
|
|
||||||
**
|
|
||||||
** Permission is granted to anyone to use this software for any purpose,
|
|
||||||
** including commercial applications, and to alter it and redistribute it
|
|
||||||
** freely, subject to the following restrictions:
|
|
||||||
**
|
|
||||||
** 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
** claim that you wrote the original software. If you use this software
|
|
||||||
** in a product, an acknowledgment in the product documentation would be
|
|
||||||
** appreciated but is not required.
|
|
||||||
** 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
** misrepresented as being the original software.
|
|
||||||
** 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "a_dynlight.h"
|
|
||||||
#include "actor.h"
|
|
||||||
#include "a_lightprobe.h"
|
|
||||||
|
|
||||||
IMPLEMENT_CLASS(ALightProbe, false, false)
|
|
||||||
|
|
||||||
void ALightProbe::Tick()
|
|
||||||
{
|
|
||||||
Super::Tick();
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
** Light Probe Actor
|
|
||||||
** Copyright (c) 2021 Nash Muhandes, Magnus Norddahl
|
|
||||||
**
|
|
||||||
** This software is provided 'as-is', without any express or implied
|
|
||||||
** warranty. In no event will the authors be held liable for any damages
|
|
||||||
** arising from the use of this software.
|
|
||||||
**
|
|
||||||
** Permission is granted to anyone to use this software for any purpose,
|
|
||||||
** including commercial applications, and to alter it and redistribute it
|
|
||||||
** freely, subject to the following restrictions:
|
|
||||||
**
|
|
||||||
** 1. The origin of this software must not be misrepresented; you must not
|
|
||||||
** claim that you wrote the original software. If you use this software
|
|
||||||
** in a product, an acknowledgment in the product documentation would be
|
|
||||||
** appreciated but is not required.
|
|
||||||
** 2. Altered source versions must be plainly marked as such, and must not be
|
|
||||||
** misrepresented as being the original software.
|
|
||||||
** 3. This notice may not be removed or altered from any source distribution.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __A_LIGHTPROBE_H__
|
|
||||||
#define __A_LIGHTPROBE_H__
|
|
||||||
|
|
||||||
class AActor;
|
|
||||||
|
|
||||||
class ALightProbe : public AActor
|
|
||||||
{
|
|
||||||
DECLARE_CLASS(ALightProbe, AActor)
|
|
||||||
|
|
||||||
public:
|
|
||||||
void Tick();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //__A_LIGHTPROBE_H__
|
|
|
@ -160,7 +160,7 @@ public:
|
||||||
bool Run(int ticks) override;
|
bool Run(int ticks) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr int WIDTH = 320, HEIGHT = 200;
|
enum { WIDTH = 320, HEIGHT = 200 };
|
||||||
int y[WIDTH];
|
int y[WIDTH];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ bool Wiper_Melt::Run(int ticks)
|
||||||
else if (y[i] < HEIGHT)
|
else if (y[i] < HEIGHT)
|
||||||
{
|
{
|
||||||
int dy = (y[i] < 16) ? y[i] + 1 : 8;
|
int dy = (y[i] < 16) ? y[i] + 1 : 8;
|
||||||
y[i] = min(y[i] + dy, HEIGHT);
|
y[i] = min<int>(y[i] + dy, HEIGHT);
|
||||||
done = false;
|
done = false;
|
||||||
}
|
}
|
||||||
if (ticks == 0)
|
if (ticks == 0)
|
||||||
|
|
|
@ -139,7 +139,7 @@ DoomEdNums
|
||||||
9875 = None // ZDRay light probe
|
9875 = None // ZDRay light probe
|
||||||
9876 = None // ZDRay static point light
|
9876 = None // ZDRay static point light
|
||||||
9881 = None // ZDRay static spotlight
|
9881 = None // ZDRay static spotlight
|
||||||
9890 = None // ZDRay sun properties
|
9890 = None // ZDRayInfo
|
||||||
9982 = SecActEyesAboveC
|
9982 = SecActEyesAboveC
|
||||||
9983 = SecActEyesBelowC
|
9983 = SecActEyesBelowC
|
||||||
9988 = CustomSprite
|
9988 = CustomSprite
|
||||||
|
|
|
@ -90,7 +90,6 @@ version "4.6"
|
||||||
#include "zscript/actors/shared/fastprojectile.zs"
|
#include "zscript/actors/shared/fastprojectile.zs"
|
||||||
#include "zscript/actors/shared/randomspawner.zs"
|
#include "zscript/actors/shared/randomspawner.zs"
|
||||||
#include "zscript/actors/shared/dynlights.zs"
|
#include "zscript/actors/shared/dynlights.zs"
|
||||||
#include "zscript/actors/shared/staticlights.zs"
|
|
||||||
|
|
||||||
#include "zscript/actors/doom/doomplayer.zs"
|
#include "zscript/actors/doom/doomplayer.zs"
|
||||||
#include "zscript/actors/doom/possessed.zs"
|
#include "zscript/actors/doom/possessed.zs"
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
// Light probes provide ZDRay points of light to sample lighting data from.
|
|
||||||
// Will despawn from the world as they serve no purpose at runtime.
|
|
||||||
// Currently used to light Actor sprites.
|
|
||||||
|
|
||||||
class LightProbe : Actor native {}
|
|
|
@ -529,7 +529,7 @@ object Candlestick
|
||||||
// Soul Sphere
|
// Soul Sphere
|
||||||
pulselight SOULSPHERE
|
pulselight SOULSPHERE
|
||||||
{
|
{
|
||||||
color 0.3 0.3 1.0
|
color 1.0 1.0 0.3
|
||||||
size 60
|
size 60
|
||||||
secondarySize 63
|
secondarySize 63
|
||||||
interval 2.0
|
interval 2.0
|
||||||
|
|
Loading…
Reference in a new issue