Ver Fonte

Fix blockiness when drawing to gui overlays using standard draw commands

James Urquhart há 9 anos atrás
pai
commit
a83afa07ea

+ 1 - 0
Engine/source/gfx/gfxDrawUtil.cpp

@@ -61,6 +61,7 @@ void GFXDrawUtil::_setupStateBlocks()
    bitmapStretchSR.setZReadWrite(false);
    bitmapStretchSR.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha);
    bitmapStretchSR.samplersDefined = true;
+   bitmapStretchSR.setColorWrites(true, true, true, false);
 
    // Linear: Create wrap SB
    bitmapStretchSR.samplers[0] = GFXSamplerStateDesc::getWrapLinear();

+ 2 - 0
Engine/source/gfx/gfxFontRenderBatcher.cpp

@@ -50,6 +50,8 @@ FontRenderBatcher::FontRenderBatcher() : mStorage(8096)
       // result in the text always being black.  This may not be the case in OpenGL
       // so it may have to change.  -bramage
       f.samplers[0].textureColorOp = GFXTOPAdd;
+
+      f.setColorWrites(true, true, true, false);
       mFontSB = GFX->createStateBlock(f);
    }
 }