mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-28 19:21:04 +00:00
Merge branch 'water_level' into 'master'
[Postprocessing] Improve water level handling See merge request OpenMW/openmw!2217
This commit is contained in:
commit
1029114172
@ -1005,6 +1005,8 @@ namespace MWRender
|
|||||||
{
|
{
|
||||||
mWater->setEnabled(enabled);
|
mWater->setEnabled(enabled);
|
||||||
mSky->setWaterEnabled(enabled);
|
mSky->setWaterEnabled(enabled);
|
||||||
|
|
||||||
|
mPostProcessor->getStateUpdater()->setIsWaterEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderingManager::setWaterHeight(float height)
|
void RenderingManager::setWaterHeight(float height)
|
||||||
|
@ -81,6 +81,8 @@ namespace fx
|
|||||||
|
|
||||||
void setWaterHeight(float height) { mData.get<WaterHeight>() = height; }
|
void setWaterHeight(float height) { mData.get<WaterHeight>() = height; }
|
||||||
|
|
||||||
|
void setIsWaterEnabled(bool enabled) { mData.get<IsWaterEnabled>() = enabled; }
|
||||||
|
|
||||||
void setSimulationTime(float time) { mData.get<SimulationTime>() = time; }
|
void setSimulationTime(float time) { mData.get<SimulationTime>() = time; }
|
||||||
|
|
||||||
void setDeltaSimulationTime(float time) { mData.get<DeltaSimulationTime>() = time; }
|
void setDeltaSimulationTime(float time) { mData.get<DeltaSimulationTime>() = time; }
|
||||||
@ -145,6 +147,8 @@ namespace fx
|
|||||||
|
|
||||||
struct WaterHeight : std140::Float { static constexpr std::string_view sName = "waterHeight"; };
|
struct WaterHeight : std140::Float { static constexpr std::string_view sName = "waterHeight"; };
|
||||||
|
|
||||||
|
struct IsWaterEnabled : std140::Bool { static constexpr std::string_view sName = "isWaterEnabled"; };
|
||||||
|
|
||||||
struct SimulationTime : std140::Float { static constexpr std::string_view sName = "simulationTime"; };
|
struct SimulationTime : std140::Float { static constexpr std::string_view sName = "simulationTime"; };
|
||||||
|
|
||||||
struct DeltaSimulationTime : std140::Float { static constexpr std::string_view sName = "deltaSimulationTime"; };
|
struct DeltaSimulationTime : std140::Float { static constexpr std::string_view sName = "deltaSimulationTime"; };
|
||||||
@ -182,6 +186,7 @@ namespace fx
|
|||||||
GameHour,
|
GameHour,
|
||||||
SunVis,
|
SunVis,
|
||||||
WaterHeight,
|
WaterHeight,
|
||||||
|
IsWaterEnabled,
|
||||||
SimulationTime,
|
SimulationTime,
|
||||||
DeltaSimulationTime,
|
DeltaSimulationTime,
|
||||||
WindSpeed,
|
WindSpeed,
|
||||||
|
@ -95,7 +95,9 @@ Builtin Uniforms
|
|||||||
+-------------+------------------------------+--------------------------------------------------+
|
+-------------+------------------------------+--------------------------------------------------+
|
||||||
| float | ``omw.waterHeight`` | The water height of current cell |
|
| float | ``omw.waterHeight`` | The water height of current cell |
|
||||||
| | | |
|
| | | |
|
||||||
| | | Exterior water level is always zero |
|
| | | Exterior water level is always rendered at -1.0 |
|
||||||
|
+-------------+------------------------------+--------------------------------------------------+
|
||||||
|
| bool | ``omw.isWaterEnabled`` | True if water is enabled for current cell |
|
||||||
+-------------+------------------------------+--------------------------------------------------+
|
+-------------+------------------------------+--------------------------------------------------+
|
||||||
| float | ``omw.simulationTime`` | The time in milliseconds since simulation began |
|
| float | ``omw.simulationTime`` | The time in milliseconds since simulation began |
|
||||||
+-------------+------------------------------+--------------------------------------------------+
|
+-------------+------------------------------+--------------------------------------------------+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user