mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:53:52 +00:00
Merge remote-tracking branch 'scrawl/graphics'
This commit is contained in:
commit
e7e8bd655f
4 changed files with 13 additions and 8 deletions
|
@ -755,7 +755,8 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String
|
|||
instance->setProperty("alpha_rejection", sh::makeProperty(new sh::StringValue(reject)));
|
||||
}
|
||||
|
||||
instance->setProperty("transparent_sorting", sh::makeProperty(new sh::StringValue(!((alphaFlags>>13)&1) ? "on" : "off")));
|
||||
// Ogre usually only sorts if depth write is disabled, so we want "force" instead of "on"
|
||||
instance->setProperty("transparent_sorting", sh::makeProperty(new sh::StringValue(!((alphaFlags>>13)&1) ? "force" : "off")));
|
||||
|
||||
instance->setProperty("depth_check", sh::makeProperty(new sh::StringValue((depthFlags&1) ? "on" : "off")));
|
||||
instance->setProperty("depth_write", sh::makeProperty(new sh::StringValue(((depthFlags>>1)&1) ? "on" : "off")));
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "OgreMaterialSerializer.hpp"
|
||||
|
||||
#include <OgrePass.h>
|
||||
|
||||
namespace sh
|
||||
{
|
||||
void OgreMaterialSerializer::reset()
|
||||
|
@ -19,6 +21,13 @@ namespace sh
|
|||
|
||||
bool OgreMaterialSerializer::setPassProperty (const std::string& param, std::string value, Ogre::Pass* pass)
|
||||
{
|
||||
// workaround https://ogre3d.atlassian.net/browse/OGRE-158
|
||||
if (param == "transparent_sorting" && value == "force")
|
||||
{
|
||||
pass->setTransparentSortingForced(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
reset();
|
||||
|
||||
mScriptContext.section = Ogre::MSS_PASS;
|
||||
|
|
7
extern/shiny/Platforms/Ogre/OgrePass.cpp
vendored
7
extern/shiny/Platforms/Ogre/OgrePass.cpp
vendored
|
@ -50,13 +50,6 @@ namespace sh
|
|||
return true; // handled already
|
||||
else if (name == "fragment_program")
|
||||
return true; // handled already
|
||||
else if (name == "ffp_vertex_colour_ambient")
|
||||
{
|
||||
bool enabled = retrieveValue<BooleanValue>(value, context).get();
|
||||
// fixed-function vertex colour tracking
|
||||
mPass->setVertexColourTracking(enabled ? Ogre::TVC_AMBIENT : Ogre::TVC_NONE);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
OgreMaterialSerializer& s = OgrePlatform::getSerializer();
|
||||
|
|
|
@ -11,6 +11,7 @@ material openmw_objects_base
|
|||
scene_blend default
|
||||
depth_write default
|
||||
alpha_rejection default
|
||||
transparent_sorting default
|
||||
|
||||
pass
|
||||
{
|
||||
|
@ -30,6 +31,7 @@ material openmw_objects_base
|
|||
scene_blend $scene_blend
|
||||
alpha_rejection $alpha_rejection
|
||||
depth_write $depth_write
|
||||
transparent_sorting $transparent_sorting
|
||||
|
||||
texture_unit diffuseMap
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue