accidently removed the map.

actorid
scrawl 13 years ago
parent b803d0e949
commit 07fd9986ef

@ -231,7 +231,7 @@ void LocalMap::render(const float x, const float y,
// use fallback techniques without shadows and without mrt // use fallback techniques without shadows and without mrt
vp->setMaterialScheme("local_map"); vp->setMaterialScheme("local_map");
//rtt->update(); rtt->update();
// create "fog of war" texture // create "fog of war" texture
TexturePtr tex2 = TextureManager::getSingleton().createManual( TexturePtr tex2 = TextureManager::getSingleton().createManual(

@ -111,7 +111,7 @@ void Shadows::recreate()
// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
// --------------------------- Debug overlays to display the content of shadow maps ----------------------------------- // --------------------------- Debug overlays to display the content of shadow maps -----------------------------------
// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
/*
OverlayManager& mgr = OverlayManager::getSingleton(); OverlayManager& mgr = OverlayManager::getSingleton();
Overlay* overlay; Overlay* overlay;
@ -157,7 +157,7 @@ void Shadows::recreate()
overlay->add2D(debugPanel); overlay->add2D(debugPanel);
overlay->show(); overlay->show();
} }
*/
} }
PSSMShadowCameraSetup* Shadows::getPSSMSetup() PSSMShadowCameraSetup* Shadows::getPSSMSetup()

@ -453,7 +453,6 @@ void SkyManager::create()
HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton(); HighLevelGpuProgramManager& mgr = HighLevelGpuProgramManager::getSingleton();
// Stars // Stars
/// \todo sky_night_02.nif (available in Bloodmoon)
MeshPtr mesh = NifOgre::NIFLoader::load("meshes\\sky_night_01.nif"); MeshPtr mesh = NifOgre::NIFLoader::load("meshes\\sky_night_01.nif");
Entity* night1_ent = mSceneMgr->createEntity("meshes\\sky_night_01.nif"); Entity* night1_ent = mSceneMgr->createEntity("meshes\\sky_night_01.nif");
night1_ent->setRenderQueueGroup(RQG_SkiesEarly+1); night1_ent->setRenderQueueGroup(RQG_SkiesEarly+1);
@ -548,60 +547,9 @@ void SkyManager::create()
atmosphere_ent->getSubEntity (0)->setMaterialName ("openmw_atmosphere"); atmosphere_ent->getSubEntity (0)->setMaterialName ("openmw_atmosphere");
//mAtmosphereMaterial = atmosphere_ent->getSubEntity(0)->getMaterial(); //mAtmosphereMaterial = atmosphere_ent->getSubEntity(0)->getMaterial();
//mAtmosphereMaterial->getTechnique(0)->getPass(0)->setPolygonModeOverrideable(false); //mAtmosphereMaterial->getTechnique(0)->getPass(0)->setPolygonModeOverrideable(false);
// Atmosphere shader // Atmosphere shader
HighLevelGpuProgramPtr vshader = mgr.createProgram("Atmosphere_VP", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"cg", GPT_VERTEX_PROGRAM);
vshader->setParameter("profiles", "vs_2_x arbvp1");
vshader->setParameter("entry_point", "main_vp");
StringUtil::StrStreamType outStream;
outStream <<
"void main_vp( \n"
" float4 position : POSITION, \n"
" in float4 color : COLOR, \n"
" out float4 oPosition : POSITION, \n"
" out float4 oVertexColor : TEXCOORD0, \n"
" uniform float4x4 worldViewProj \n"
") \n"
"{ \n"
" oPosition = mul( worldViewProj, position ); \n"
" oVertexColor = color; \n"
"}";
vshader->setSource(outStream.str());
vshader->load();
vshader->getDefaultParameters()->setNamedAutoConstant("worldViewProj", GpuProgramParameters::ACT_WORLDVIEWPROJ_MATRIX);
//mAtmosphereMaterial->getTechnique(0)->getPass(0)->setVertexProgram(vshader->getName());
HighLevelGpuProgramPtr fshader = mgr.createProgram("Atmosphere_FP", ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME,
"cg", GPT_FRAGMENT_PROGRAM);
fshader->setParameter("profiles", "ps_2_x arbfp1");
fshader->setParameter("entry_point", "main_fp");
StringUtil::StrStreamType _outStream;
_outStream <<
"void main_fp( \n"
" in float4 iVertexColor : TEXCOORD0, \n"
" out float4 oColor : COLOR, \n";
if (RenderingManager::useMRT()) _outStream <<
" out float4 oColor1 : COLOR1, \n";
_outStream <<
" uniform float4 emissive \n"
") \n"
"{ \n"
" oColor = iVertexColor * emissive; \n";
if (RenderingManager::useMRT()) _outStream <<
" oColor1 = float4(1, 0, 0, 1); \n";
_outStream <<
"}";
fshader->setSource(_outStream.str());
fshader->load();
fshader->getDefaultParameters()->setNamedAutoConstant("emissive", GpuProgramParameters::ACT_SURFACE_EMISSIVE_COLOUR);
// mAtmosphereMaterial->getTechnique(0)->getPass(0)->setFragmentProgram(fshader->getName()); // mAtmosphereMaterial->getTechnique(0)->getPass(0)->setFragmentProgram(fshader->getName());
atmosphere_ent->getSubEntity (0)->setMaterialName("openmw_atmosphere");
// Clouds // Clouds
NifOgre::NIFLoader::load("meshes\\sky_clouds_01.nif"); NifOgre::NIFLoader::load("meshes\\sky_clouds_01.nif");
@ -838,15 +786,14 @@ void SkyManager::setWeather(const MWWorld::WeatherResult& weather)
mCloudMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(clr); mCloudMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(clr);
mCloudColour = weather.mSunColor; mCloudColour = weather.mSunColor;
} }
*/
if (mSkyColour != weather.mSkyColor) if (mSkyColour != weather.mSkyColor)
{ {
mAtmosphereMaterial->getTechnique(0)->getPass(0)->setSelfIllumination(weather.mSkyColor);
mMasser->setSkyColour(weather.mSkyColor);
mSecunda->setSkyColour(weather.mSkyColor);
mSkyColour = weather.mSkyColor; mSkyColour = weather.mSkyColor;
sh::Factory::getInstance().setSharedParameter ("atmosphereColour", sh::makeProperty<sh::Vector4>(new sh::Vector4(
weather.mSkyColor.r, weather.mSkyColor.g, weather.mSkyColor.b, 1.0)));
} }
/*
if (mCloudSpeed != weather.mCloudSpeed) if (mCloudSpeed != weather.mCloudSpeed)
{ {
mCloudMaterial->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("speed", Real(weather.mCloudSpeed)); mCloudMaterial->getTechnique(0)->getPass(0)->getFragmentProgramParameters()->setNamedConstant("speed", Real(weather.mCloudSpeed));

@ -7,6 +7,8 @@
#include <OgreColourValue.h> #include <OgreColourValue.h>
#include <OgreHighLevelGpuProgram.h> #include <OgreHighLevelGpuProgram.h>
#include <extern/shiny/Main/Factory.hpp>
#include "sky.hpp" #include "sky.hpp"
#include "../mwworld/weather.hpp" #include "../mwworld/weather.hpp"

2
extern/shiny vendored

@ -1 +1 @@
Subproject commit a0b3020bdba4433c1e3f45a1d5188eab0172bd88 Subproject commit 3e7e02a846ce6c3de7e2344a82d346293115eb7d

@ -6,29 +6,28 @@
SH_BEGIN_PROGRAM SH_BEGIN_PROGRAM
shUniform(float4x4 wvp) @shAutoConstant(wvp, worldviewproj_matrix) shUniform(float4x4 wvp) @shAutoConstant(wvp, worldviewproj_matrix)
shInput(float2, uv0)
shOutput(float2, UV) shColourInput(float4)
shOutput(float4, colourPassthrough)
SH_START_PROGRAM SH_START_PROGRAM
{ {
shOutputPosition = shMatrixMult(wvp, shInputPosition); shOutputPosition = shMatrixMult(wvp, shInputPosition);
UV = uv0; colourPassthrough = colour;
} }
#else #else
SH_BEGIN_PROGRAM SH_BEGIN_PROGRAM
shSampler2D(diffuseMap) shInput(float4, colourPassthrough)
shInput(float2, UV)
#if MRT #if MRT
shDeclareMrtOutput(1) shDeclareMrtOutput(1)
#endif #endif
shUniform(float4 materialDiffuse) @shAutoConstant(materialDiffuse, surface_diffuse_colour) shUniform(float4 atmosphereColour) @shSharedParameter(atmosphereColour)
shUniform(float4 materialEmissive) @shAutoConstant(materialEmissive, surface_emissive_colour)
SH_START_PROGRAM SH_START_PROGRAM
{ {
shOutputColor(0) = float4(1,1,1,materialDiffuse.a) * float4(materialEmissive.xyz, 1) * shSample(diffuseMap, UV); shOutputColor(0) = colourPassthrough * atmosphereColour;
#if MRT #if MRT
shOutputColor(1) = float4(1,1,1,1); shOutputColor(1) = float4(1,1,1,1);

@ -1,5 +1,3 @@
material openmw_shadowcaster_default material openmw_shadowcaster_default
{ {
create_configuration Default create_configuration Default

@ -1,5 +1,6 @@
material openmw_moon material openmw_moon
{ {
allow_fixed_function false
mrt_output true mrt_output true
pass pass
{ {
@ -23,6 +24,7 @@ material openmw_moon
material openmw_clouds material openmw_clouds
{ {
allow_fixed_function false
mrt_output true mrt_output true
pass pass
{ {
@ -55,6 +57,7 @@ material openmw_clouds
material openmw_atmosphere material openmw_atmosphere
{ {
allow_fixed_function false
mrt_output true mrt_output true
pass pass
{ {
@ -75,6 +78,7 @@ material openmw_atmosphere
material openmw_stars material openmw_stars
{ {
allow_fixed_function false
mrt_output true mrt_output true
pass pass
{ {
@ -98,6 +102,7 @@ material openmw_stars
// used for both sun and sun glare // used for both sun and sun glare
material openmw_sun material openmw_sun
{ {
allow_fixed_function false
mrt_output true mrt_output true
pass pass
{ {

Loading…
Cancel
Save