Prechádzať zdrojové kódy

Line antialiasing support in Graphics, Material, DebugRenderer classes. Closes #1627.

Lasse Öörni 9 rokov pred
rodič
commit
f8ebf2dbc9

+ 3 - 0
Docs/Reference.dox

@@ -1115,6 +1115,8 @@ OpenGL ES 2.0 has further limitations:
 
 - Multisampled texture rendertargets are not supported.
 
+- Line antialiasing is not supported.
+
 \page VertexBuffers Vertex buffers
 
 %Geometry data is defined by VertexBuffer objects, which hold a number of vertices of a certain vertex format. For rendering, the data is uploaded to the GPU, but optionally a shadow copy of
@@ -1179,6 +1181,7 @@ A material definition looks like this:
     <fill value="solid|wireframe|point" />
     <depthbias constant="x" slopescaled="y" />
     <alphatocoverage enable="true|false" />
+    <lineantialias enable="true|false" />
     <renderorder value="x" />
     <occlusion enable="true|false" />
 </material>

+ 4 - 0
Source/Urho3D/AngelScript/GraphicsAPI.cpp

@@ -983,6 +983,8 @@ static void RegisterMaterial(asIScriptEngine* engine)
     engine->RegisterObjectMethod("Material", "const BiasParameters& get_depthBias() const", asMETHOD(Material, GetDepthBias), asCALL_THISCALL);
     engine->RegisterObjectMethod("Material", "void set_alphaToCoverage(bool)", asMETHOD(Material, SetAlphaToCoverage), asCALL_THISCALL);
     engine->RegisterObjectMethod("Material", "bool get_alphaToCoverage() const", asMETHOD(Material, GetAlphaToCoverage), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Material", "void set_lineAntiAlias(bool)", asMETHOD(Material, SetLineAntiAlias), asCALL_THISCALL);
+    engine->RegisterObjectMethod("Material", "bool get_lineAntiAlias() const", asMETHOD(Material, GetLineAntiAlias), asCALL_THISCALL);
     engine->RegisterObjectMethod("Material", "void set_renderOrder(uint8)", asMETHOD(Material, SetRenderOrder), asCALL_THISCALL);
     engine->RegisterObjectMethod("Material", "uint8 get_renderOrder() const", asMETHOD(Material, GetRenderOrder), asCALL_THISCALL);
     engine->RegisterObjectMethod("Material", "void set_scene(Scene@+)", asMETHOD(Material, SetScene), asCALL_THISCALL);
@@ -2004,6 +2006,8 @@ static DebugRenderer* SceneGetDebugRenderer(Scene* ptr)
 
 static void RegisterDebugRenderer(asIScriptEngine* engine)
 {
+    engine->RegisterObjectMethod("DebugRenderer", "void set_lineAntiAlias(bool)", asMETHOD(DebugRenderer, SetLineAntiAlias), asCALL_THISCALL);
+    engine->RegisterObjectMethod("DebugRenderer", "bool get_lineAntiAlias() const", asMETHOD(DebugRenderer, GetLineAntiAlias), asCALL_THISCALL);
     engine->RegisterObjectMethod("DebugRenderer", "void AddLine(const Vector3&in, const Vector3&in, const Color&in, bool depthTest = true)", asMETHODPR(DebugRenderer, AddLine, (const Vector3&, const Vector3&, const Color&, bool), void), asCALL_THISCALL);
     engine->RegisterObjectMethod("DebugRenderer", "void AddTriangle(const Vector3&in, const Vector3&in, const Vector3&in, const Color&in, bool depthTest = true)", asMETHODPR(DebugRenderer, AddTriangle, (const Vector3&, const Vector3&, const Vector3&, const Color&, bool), void), asCALL_THISCALL);
     engine->RegisterObjectMethod("DebugRenderer", "void AddNode(Node@+, float scale = 1.0, bool depthTest = true)", asMETHOD(DebugRenderer, AddNode), asCALL_THISCALL);

+ 1 - 0
Source/Urho3D/Graphics/Batch.cpp

@@ -202,6 +202,7 @@ void Batch::Prepare(View* view, Camera* camera, bool setModelTransform, bool all
                 blend = BLEND_SUBTRACTALPHA;
         }
         graphics->SetBlendMode(blend, pass_->GetAlphaToCoverage() || material_->GetAlphaToCoverage());
+        graphics->SetLineAntiAlias(material_->GetLineAntiAlias());
 
         bool isShadowPass = pass_->GetIndex() == Technique::shadowPassIndex;
         CullMode effectiveCullMode = pass_->GetCullMode();

+ 16 - 2
Source/Urho3D/Graphics/DebugRenderer.cpp

@@ -48,7 +48,8 @@ static const unsigned MAX_LINES = 1000000;
 static const unsigned MAX_TRIANGLES = 100000;
 
 DebugRenderer::DebugRenderer(Context* context) :
-    Component(context)
+    Component(context),
+    lineAntiAlias_(false)
 {
     vertexBuffer_ = new VertexBuffer(context_);
 
@@ -62,6 +63,16 @@ DebugRenderer::~DebugRenderer()
 void DebugRenderer::RegisterObject(Context* context)
 {
     context->RegisterFactory<DebugRenderer>(SUBSYSTEM_CATEGORY);
+    URHO3D_ACCESSOR_ATTRIBUTE("Line Antialias", GetLineAntiAlias, SetLineAntiAlias, bool, false, AM_DEFAULT);
+}
+
+void DebugRenderer::SetLineAntiAlias(bool enable)
+{
+    if (enable != lineAntiAlias_)
+    {
+        lineAntiAlias_ = enable;
+        MarkNetworkUpdate();
+    }
 }
 
 void DebugRenderer::SetView(Camera* camera)
@@ -491,10 +502,11 @@ void DebugRenderer::Render()
 
     vertexBuffer_->Unlock();
 
-    graphics->SetBlendMode(BLEND_REPLACE);
+    graphics->SetBlendMode(lineAntiAlias_ ? BLEND_ALPHA : BLEND_REPLACE);
     graphics->SetColorWrite(true);
     graphics->SetCullMode(CULL_NONE);
     graphics->SetDepthWrite(true);
+    graphics->SetLineAntiAlias(lineAntiAlias_);
     graphics->SetScissorTest(false);
     graphics->SetStencilTest(false);
     graphics->SetShaders(vs, ps);
@@ -537,6 +549,8 @@ void DebugRenderer::Render()
         graphics->SetDepthTest(CMP_ALWAYS);
         graphics->Draw(TRIANGLE_LIST, start, count);
     }
+
+    graphics->SetLineAntiAlias(false);
 }
 
 bool DebugRenderer::IsInside(const BoundingBox& box) const

+ 7 - 0
Source/Urho3D/Graphics/DebugRenderer.h

@@ -104,6 +104,8 @@ public:
     /// Register object factory.
     static void RegisterObject(Context* context);
 
+    /// Set line antialiasing on/off. Default false.
+    void SetLineAntiAlias(bool enable);
     /// Set the camera viewpoint. Call before rendering, or before adding geometry if you want to use culling.
     void SetView(Camera* camera);
     /// Add a line.
@@ -144,6 +146,9 @@ public:
     /// Update vertex buffer and render all debug lines. The viewport and rendertarget should be set before.
     void Render();
 
+    /// Return whether line antialiasing is enabled.
+    bool GetLineAntiAlias() const { return lineAntiAlias_; }
+
     /// Return the view transform.
     const Matrix3x4& GetView() const { return view_; }
 
@@ -180,6 +185,8 @@ private:
     Frustum frustum_;
     /// Vertex buffer.
     SharedPtr<VertexBuffer> vertexBuffer_;
+    /// Line antialiasing flag.
+    bool lineAntiAlias_;
 };
 
 }

+ 14 - 4
Source/Urho3D/Graphics/Direct3D11/D3D11Graphics.cpp

@@ -1541,6 +1541,15 @@ void Graphics::SetFillMode(FillMode mode)
     }
 }
 
+void Graphics::SetLineAntiAlias(bool enable)
+{
+    if (enable != lineAntiAlias_)
+    {
+        lineAntiAlias_ = enable;
+        impl_->rasterizerStateDirty_ = true;
+    }
+}
+
 void Graphics::SetScissorTest(bool enable, const Rect& rect, bool borderInclusive)
 {
     // During some light rendering loops, a full rect is toggled on/off repeatedly.
@@ -2336,6 +2345,7 @@ void Graphics::ResetCachedState()
     depthTestMode_ = CMP_LESSEQUAL;
     depthWrite_ = true;
     fillMode_ = FILL_SOLID;
+    lineAntiAlias_ = false;
     scissorTest_ = false;
     scissorRect_ = IntRect::ZERO;
     stencilTest_ = false;
@@ -2543,8 +2553,8 @@ void Graphics::PrepareDraw()
         int scaledDepthBias = (int)(constantDepthBias_ * (1 << depthBits));
 
         unsigned newRasterizerStateHash =
-            (scissorTest_ ? 1 : 0) | (fillMode_ << 1) | (cullMode_ << 3) | ((scaledDepthBias & 0x1fff) << 5) |
-            (((int)(slopeScaledDepthBias_ * 100.0f) & 0x1fff) << 18);
+            (scissorTest_ ? 1 : 0) | (lineAntiAlias_ ? 2 : 0) | (fillMode_ << 2) | (cullMode_ << 4) | 
+            ((scaledDepthBias & 0x1fff) << 6) | (((int)(slopeScaledDepthBias_ * 100.0f) & 0x1fff) << 19);
         if (newRasterizerStateHash != impl_->rasterizerStateHash_)
         {
             HashMap<unsigned, ID3D11RasterizerState*>::Iterator i = impl_->rasterizerStates_.Find(newRasterizerStateHash);
@@ -2562,8 +2572,8 @@ void Graphics::PrepareDraw()
                 stateDesc.SlopeScaledDepthBias = slopeScaledDepthBias_;
                 stateDesc.DepthClipEnable = TRUE;
                 stateDesc.ScissorEnable = scissorTest_ ? TRUE : FALSE;
-                stateDesc.MultisampleEnable = TRUE;
-                stateDesc.AntialiasedLineEnable = FALSE;
+                stateDesc.MultisampleEnable = lineAntiAlias_ ? FALSE : TRUE;
+                stateDesc.AntialiasedLineEnable = lineAntiAlias_ ? TRUE : FALSE;
 
                 ID3D11RasterizerState* newRasterizerState = 0;
                 HRESULT hr = impl_->device_->CreateRasterizerState(&stateDesc, &newRasterizerState);

+ 11 - 0
Source/Urho3D/Graphics/Direct3D9/D3D9Graphics.cpp

@@ -1765,6 +1765,16 @@ void Graphics::SetFillMode(FillMode mode)
     }
 }
 
+void Graphics::SetLineAntiAlias(bool enable)
+{
+    if (enable != lineAntiAlias_)
+    {
+        impl_->device_->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, enable ? TRUE : FALSE);
+        lineAntiAlias_ = enable;
+    }
+}
+
+
 void Graphics::SetScissorTest(bool enable, const Rect& rect, bool borderInclusive)
 {
     // During some light rendering loops, a full rect is toggled on/off repeatedly.
@@ -2596,6 +2606,7 @@ void Graphics::ResetCachedState()
     slopeScaledDepthBias_ = 0.0f;
     depthTestMode_ = CMP_LESSEQUAL;
     depthWrite_ = true;
+    lineAntiAlias_ = false;
     fillMode_ = FILL_SOLID;
     scissorTest_ = false;
     scissorRect_ = IntRect::ZERO;

+ 9 - 2
Source/Urho3D/Graphics/Graphics.h

@@ -230,6 +230,8 @@ public:
     void SetDepthWrite(bool enable);
     /// Set polygon fill mode.
     void SetFillMode(FillMode mode);
+    /// Set line antialiasing on/off.
+    void SetLineAntiAlias(bool enable);
     /// Set scissor test.
     void SetScissorTest(bool enable, const Rect& rect = Rect::FULL, bool borderInclusive = true);
     /// Set scissor test.
@@ -431,6 +433,9 @@ public:
     /// Return polygon fill mode.
     FillMode GetFillMode() const { return fillMode_; }
 
+    /// Return whether line antialiasing is enabled.
+    bool GetLineAntiAlias() const { return lineAntiAlias_; }
+
     /// Return whether stencil test is enabled.
     bool GetStencilTest() const { return stencilTest_; }
 
@@ -718,12 +723,14 @@ private:
     CompareMode depthTestMode_;
     /// Depth write enable flag.
     bool depthWrite_;
+    /// Line antialiasing enable flag.
+    bool lineAntiAlias_;
     /// Polygon fill mode.
     FillMode fillMode_;
-    /// Scissor test rectangle.
-    IntRect scissorRect_;
     /// Scissor test enable flag.
     bool scissorTest_;
+    /// Scissor test rectangle.
+    IntRect scissorRect_;
     /// Stencil test compare mode.
     CompareMode stencilTestMode_;
     /// Stencil operation on pass.

+ 22 - 0
Source/Urho3D/Graphics/Material.cpp

@@ -210,6 +210,7 @@ Material::Material(Context* context) :
     auxViewFrameNumber_(0),
     shaderParameterHash_(0),
     alphaToCoverage_(false),
+    lineAntiAlias_(false),
     occlusion_(true),
     specular_(false),
     subscribed_(false),
@@ -547,6 +548,10 @@ bool Material::Load(const XMLElement& source)
     if (alphaToCoverageElem)
         SetAlphaToCoverage(alphaToCoverageElem.GetBool("enable"));
 
+    XMLElement lineAntiAliasElem = source.GetChild("lineantialias");
+    if (lineAntiAliasElem)
+        SetLineAntiAlias(lineAntiAliasElem.GetBool("enable"));
+
     XMLElement renderOrderElem = source.GetChild("renderorder");
     if (renderOrderElem)
         SetRenderOrder((unsigned char)renderOrderElem.GetUInt("value"));
@@ -704,6 +709,10 @@ bool Material::Load(const JSONValue& source)
     if (!alphaToCoverageVal.IsNull())
         SetAlphaToCoverage(alphaToCoverageVal.GetBool());
 
+    JSONValue lineAntiAliasVal = source.Get("lineantialias");
+    if (!lineAntiAliasVal.IsNull())
+        SetLineAntiAlias(lineAntiAliasVal.GetBool());
+
     JSONValue renderOrderVal = source.Get("renderorder");
     if (!renderOrderVal.IsNull())
         SetRenderOrder((unsigned char)renderOrderVal.GetUInt());
@@ -809,6 +818,10 @@ bool Material::Save(XMLElement& dest) const
     XMLElement alphaToCoverageElem = dest.CreateChild("alphatocoverage");
     alphaToCoverageElem.SetBool("enable", alphaToCoverage_);
 
+    // Write line anti-alias
+    XMLElement lineAntiAliasElem = dest.CreateChild("lineantialias");
+    lineAntiAliasElem.SetBool("enable", lineAntiAlias_);
+
     // Write render order
     XMLElement renderOrderElem = dest.CreateChild("renderorder");
     renderOrderElem.SetUInt("value", renderOrder_);
@@ -909,6 +922,9 @@ bool Material::Save(JSONValue& dest) const
     // Write alpha-to-coverage
     dest.Set("alphatocoverage", alphaToCoverage_);
 
+    // Write line anti-alias
+    dest.Set("lineantialias", lineAntiAlias_);
+
     // Write render order
     dest.Set("renderorder", (unsigned) renderOrder_);
 
@@ -1101,6 +1117,11 @@ void Material::SetAlphaToCoverage(bool enable)
     alphaToCoverage_ = enable;
 }
 
+void Material::SetLineAntiAlias(bool enable)
+{
+    lineAntiAlias_ = enable;
+}
+
 void Material::SetRenderOrder(unsigned char order)
 {
     renderOrder_ = order;
@@ -1155,6 +1176,7 @@ SharedPtr<Material> Material::Clone(const String& cloneName) const
     ret->textures_ = textures_;
     ret->depthBias_ = depthBias_;
     ret->alphaToCoverage_ = alphaToCoverage_;
+    ret->lineAntiAlias_ = lineAntiAlias_;
     ret->occlusion_ = occlusion_;
     ret->specular_ = specular_;
     ret->cullMode_ = cullMode_;

+ 8 - 1
Source/Urho3D/Graphics/Material.h

@@ -165,6 +165,8 @@ public:
     void SetDepthBias(const BiasParameters& parameters);
     /// Set alpha-to-coverage mode on all passes.
     void SetAlphaToCoverage(bool enable);
+    /// Set line antialiasing on/off. Has effect only on models that consist of line lists.
+    void SetLineAntiAlias(bool enable);
     /// Set 8-bit render order within pass. Default 128. Lower values will render earlier and higher values later, taking precedence over e.g. state and distance sorting.
     void SetRenderOrder(unsigned char order);
     /// Set whether to use in occlusion rendering. Default true.
@@ -232,6 +234,9 @@ public:
     /// Return alpha-to-coverage mode.
     bool GetAlphaToCoverage() const { return alphaToCoverage_; }
 
+    /// Return whether line antialiasing is enabled.
+    bool GetLineAntiAlias() const { return lineAntiAlias_; }
+
     /// Return render order.
     unsigned char GetRenderOrder() const { return renderOrder_; }
     
@@ -302,8 +307,10 @@ private:
     unsigned auxViewFrameNumber_;
     /// Shader parameter hash value.
     unsigned shaderParameterHash_;
-    /// Alpha-to-coverage mode.
+    /// Alpha-to-coverage flag.
     bool alphaToCoverage_;
+    /// Line antialiasing flag.
+    bool lineAntiAlias_;
     /// Render occlusion flag.
     bool occlusion_;
     /// Specular lighting flag.

+ 15 - 0
Source/Urho3D/Graphics/OpenGL/OGLGraphics.cpp

@@ -1874,6 +1874,20 @@ void Graphics::SetFillMode(FillMode mode)
 #endif
 }
 
+void Graphics::SetLineAntiAlias(bool enable)
+{
+#ifndef GL_ES_VERSION_2_0
+    if (enable != lineAntiAlias_)
+    {
+        if (enable)
+            glEnable(GL_LINE_SMOOTH);
+        else
+            glDisable(GL_LINE_SMOOTH);
+        lineAntiAlias_ = enable;
+    }
+#endif
+}
+
 void Graphics::SetScissorTest(bool enable, const Rect& rect, bool borderInclusive)
 {
     // During some light rendering loops, a full rect is toggled on/off repeatedly.
@@ -3175,6 +3189,7 @@ void Graphics::ResetCachedState()
     slopeScaledDepthBias_ = 0.0f;
     depthTestMode_ = CMP_ALWAYS;
     depthWrite_ = false;
+    lineAntiAlias_ = false;
     fillMode_ = FILL_SOLID;
     scissorTest_ = false;
     scissorRect_ = IntRect::ZERO;

+ 4 - 0
Source/Urho3D/Graphics/View.cpp

@@ -629,6 +629,7 @@ void View::Render()
 
     // Reset state after commands
     graphics_->SetFillMode(FILL_SOLID);
+    graphics_->SetLineAntiAlias(false);
     graphics_->SetClipPlane(false);
     graphics_->SetColorWrite(true);
     graphics_->SetDepthBias(0.0f, 0.0f);
@@ -1845,6 +1846,7 @@ void View::RenderQuad(RenderPathCommand& command)
     graphics_->SetDepthTest(CMP_ALWAYS);
     graphics_->SetDepthWrite(false);
     graphics_->SetFillMode(FILL_SOLID);
+    graphics_->SetLineAntiAlias(false);
     graphics_->SetClipPlane(false);
     graphics_->SetScissorTest(false);
     graphics_->SetStencilTest(false);
@@ -2074,6 +2076,7 @@ void View::BlitFramebuffer(Texture* source, RenderSurface* destination, bool dep
     graphics_->SetDepthTest(CMP_ALWAYS);
     graphics_->SetDepthWrite(depthWrite);
     graphics_->SetFillMode(FILL_SOLID);
+    graphics_->SetLineAntiAlias(false);
     graphics_->SetClipPlane(false);
     graphics_->SetScissorTest(false);
     graphics_->SetStencilTest(false);
@@ -2941,6 +2944,7 @@ void View::SetupLightVolumeBatch(Batch& batch)
     graphics_->SetDepthBias(0.0f, 0.0f);
     graphics_->SetDepthWrite(false);
     graphics_->SetFillMode(FILL_SOLID);
+    graphics_->SetLineAntiAlias(false);
     graphics_->SetClipPlane(false);
 
     if (type != LIGHT_DIRECTIONAL)

+ 3 - 0
Source/Urho3D/LuaScript/pkgs/Graphics/DebugRenderer.pkg

@@ -2,6 +2,7 @@ $#include "Graphics/DebugRenderer.h"
 
 class DebugRenderer : public Component
 {
+    void SetLineAntiAlias(bool enable);
     void SetView(Camera* camera);
     void AddLine(const Vector3& start, const Vector3& end, const Color& color, bool depthTest = true);
     void AddLine(const Vector3& start, const Vector3& end, unsigned color, bool depthTest = true);
@@ -20,11 +21,13 @@ class DebugRenderer : public Component
     void AddQuad(const Vector3& center, float width, float height, const Color& color, bool depthTest = true);
     void Render();
 
+    bool GetLineAntiAlias() const;
     const Matrix3x4& GetView() const;
     const Matrix4& GetProjection() const;
     const Frustum& GetFrustum() const;
     bool IsInside(const BoundingBox& box) const;
 
+    tolua_property__get_set bool lineAntiAlias;
     tolua_readonly tolua_property__get_set Matrix3x4& view;
     tolua_readonly tolua_property__get_set Matrix4& projection;
     tolua_readonly tolua_property__get_set Frustum& frustum;

+ 3 - 0
Source/Urho3D/LuaScript/pkgs/Graphics/Material.pkg

@@ -24,6 +24,7 @@ class Material : public Resource
     void SetFillMode(FillMode mode);
     void SetDepthBias(const BiasParameters& parameters);
     void SetAlphaToCoverage(bool enable);
+    void SetLineAntiAlias(bool enable);
     void SetRenderOrder(unsigned char renderOrder);
     void SetOcclusion(bool enable);
     void SetScene(Scene* scene);
@@ -56,6 +57,7 @@ class Material : public Resource
     FillMode GetFillMode() const;
     const BiasParameters& GetDepthBias() const;
     bool GetAlphaToCoverage() const;
+    bool GetLineAntiAlias() const;
     unsigned char GetRenderOrder() const;
     bool GetOcclusion() const;
     bool GetSpecular() const;
@@ -68,6 +70,7 @@ class Material : public Resource
     tolua_property__get_set FillMode fillMode;
     tolua_property__get_set BiasParameters depthBias;
     tolua_property__get_set bool alphaToCoverage;
+    tolua_property__get_set bool lineAntiAlias;
     tolua_property__get_set unsigned char renderOrder;
     tolua_property__get_set bool occlusion;
     tolua_readonly tolua_property__get_set bool specular;

+ 16 - 0
bin/Data/Scripts/Editor/EditorMaterial.as

@@ -54,6 +54,7 @@ void CreateMaterialEditor()
     SubscribeToEvent(materialWindow.GetChild("FillModeEdit", true), "ItemSelected", "EditFillMode");
     SubscribeToEvent(materialWindow.GetChild("OcclusionEdit", true), "Toggled", "EditOcclusion");
     SubscribeToEvent(materialWindow.GetChild("AlphaToCoverageEdit", true), "Toggled", "EditAlphaToCoverage");
+    SubscribeToEvent(materialWindow.GetChild("LineAntiAliasEdit", true), "Toggled", "EditLineAntiAlias");
 }
 
 bool ToggleMaterialEditor()
@@ -359,6 +360,8 @@ void RefreshMaterialMiscParameters()
     attrCheckBox.checked = editMaterial.occlusion;
     attrCheckBox = materialWindow.GetChild("AlphaToCoverageEdit", true);
     attrCheckBox.checked = editMaterial.alphaToCoverage;
+    attrCheckBox = materialWindow.GetChild("LineAntiAliasEdit", true);
+    attrCheckBox.checked = editMaterial.lineAntiAlias;
 
     inMaterialRefresh = false;
 }
@@ -960,6 +963,19 @@ void EditAlphaToCoverage(StringHash eventType, VariantMap& eventData)
     EndMaterialEdit();
 }
 
+void EditLineAntiAlias(StringHash eventType, VariantMap& eventData)
+{
+    if (editMaterial is null || inMaterialRefresh)
+        return;
+
+    BeginMaterialEdit();
+
+    CheckBox@ attrEdit = eventData["Element"].GetPtr();
+    editMaterial.lineAntiAlias = attrEdit.checked;
+
+    EndMaterialEdit();
+}
+
 void EditVSDefines(StringHash eventType, VariantMap& eventData)
 {
     if (editMaterial is null || inMaterialRefresh)

+ 12 - 0
bin/Data/UI/EditorMaterialWindow.xml

@@ -382,6 +382,18 @@
                             <attribute name="Name" value="AlphaToCoverageEdit" />
                         </element>
                     </element>
+                    <element>
+                        <attribute name="Min Size" value="0 16" />
+                        <attribute name="Max Size" value="2147483647 16" />
+                        <attribute name="Layout Mode" value="Horizontal" />
+                        <attribute name="Layout Spacing" value="10" />
+                        <element type="Text" style="EditorAttributeText">
+                            <attribute name="Text" value="Line antialias" />
+                        </element>
+                        <element type="CheckBox">
+                            <attribute name="Name" value="LineAntiAliasEdit" />
+                        </element>
+                    </element>
                     <element>
                         <attribute name="Min Size" value="0 16" />
                         <attribute name="Max Size" value="2147483647 16" />