mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Revert "more accurate fog, TODO: apply this to the terrain"
This reverts commit 96c37d3e7c
.
This commit is contained in:
parent
96911ada95
commit
cdea19206c
2 changed files with 2 additions and 7 deletions
|
@ -335,10 +335,7 @@ WeatherManager::WeatherManager(MWRender::RenderingManager* rendering, MWWorld::E
|
||||||
void WeatherManager::setWeather(const String& weather, bool instant)
|
void WeatherManager::setWeather(const String& weather, bool instant)
|
||||||
{
|
{
|
||||||
if (weather == mCurrentWeather && mNextWeather == "")
|
if (weather == mCurrentWeather && mNextWeather == "")
|
||||||
{
|
|
||||||
mFirstUpdate = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (instant || mFirstUpdate)
|
if (instant || mFirstUpdate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -328,7 +328,6 @@ void NIFLoader::createMaterial(const String &name,
|
||||||
" out float4 oNormal : TEXCOORD2, \n"
|
" out float4 oNormal : TEXCOORD2, \n"
|
||||||
" out float oDepth : TEXCOORD3, \n"
|
" out float oDepth : TEXCOORD3, \n"
|
||||||
" out float4 oVertexColour : TEXCOORD4, \n"
|
" out float4 oVertexColour : TEXCOORD4, \n"
|
||||||
" uniform float4 cameraPosObjSpace, \n"
|
|
||||||
" uniform float4x4 worldViewProj \n"
|
" uniform float4x4 worldViewProj \n"
|
||||||
") \n"
|
") \n"
|
||||||
"{ \n"
|
"{ \n"
|
||||||
|
@ -336,13 +335,12 @@ void NIFLoader::createMaterial(const String &name,
|
||||||
" oUV = uv; \n"
|
" oUV = uv; \n"
|
||||||
" oNormal = normal; \n"
|
" oNormal = normal; \n"
|
||||||
" oPosition = mul( worldViewProj, position ); \n"
|
" oPosition = mul( worldViewProj, position ); \n"
|
||||||
" oDepth = length(position.xyz - cameraPosObjSpace.xyz); \n"
|
" oDepth = oPosition.z; \n"
|
||||||
" oPositionObjSpace = position; \n"
|
" oPositionObjSpace = position; \n"
|
||||||
"}";
|
"}";
|
||||||
vertex->setSource(outStream.str());
|
vertex->setSource(outStream.str());
|
||||||
vertex->load();
|
vertex->load();
|
||||||
vertex->getDefaultParameters()->setNamedAutoConstant("worldViewProj", GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX);
|
vertex->getDefaultParameters()->setNamedAutoConstant("worldViewProj", GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX);
|
||||||
vertex->getDefaultParameters()->setNamedAutoConstant("cameraPosObjSpace", GpuProgramParameters::ACT_CAMERA_POSITION_OBJECT_SPACE);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vertex = mgr.getByName("main_vp");
|
vertex = mgr.getByName("main_vp");
|
||||||
|
|
Loading…
Reference in a new issue