From 75b462b9744f1660af0374bc43c984e796008c24 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 5 Apr 2013 18:23:22 +0200 Subject: [PATCH] If alpha rejection was forced, we also need to force depth_write and depth_check --- components/nifogre/ogrenifloader.cpp | 1 + files/materials/objects.mat | 2 ++ 2 files changed, 3 insertions(+) diff --git a/components/nifogre/ogrenifloader.cpp b/components/nifogre/ogrenifloader.cpp index f8eca821ff..8f9d69f6e2 100644 --- a/components/nifogre/ogrenifloader.cpp +++ b/components/nifogre/ogrenifloader.cpp @@ -771,6 +771,7 @@ static Ogre::String getMaterial(const Nif::NiTriShape *shape, const Ogre::String { alphaFlags = (1<<9) | (6<<10); /* alpha_rejection enabled, greater_equal */ alphaTest = result.second; + depthFlags = (1<<0) | (1<<1); // depth_write on, depth_check on } if((alphaFlags&1)) diff --git a/files/materials/objects.mat b/files/materials/objects.mat index 8740c82c34..49df4e3949 100644 --- a/files/materials/objects.mat +++ b/files/materials/objects.mat @@ -14,6 +14,7 @@ material openmw_objects_base is_transparent false // real transparency, alpha rejection doesn't count here scene_blend default depth_write default + depth_check default alpha_rejection default transparent_sorting default @@ -38,6 +39,7 @@ material openmw_objects_base scene_blend $scene_blend alpha_rejection $alpha_rejection depth_write $depth_write + depth_check $depth_check transparent_sorting $transparent_sorting texture_unit diffuseMap