本文整理汇总了C#中Material.SetVector4方法的典型用法代码示例。如果您正苦于以下问题:C# Material.SetVector4方法的具体用法?C# Material.SetVector4怎么用?C# Material.SetVector4使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Material
的用法示例。
在下文中一共展示了Material.SetVector4方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawScene
private void DrawScene()
{
GL.ClearColor(0.0f, 0.0f, 0.0f, 0f);
GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
GL.Enable(EnableCap.DepthTest);
GL.Disable(EnableCap.CullFace);
if (m_operations.Context == null)
return;
if (m_showOriginalMesh)
{
if (m_operations.Context.OriginalMesh != null)
{
var material = new Material();
material.ShaderHandle = shader_frontback;
material.ShowLines = m_showMeshLines;
if (m_alphaBlendingMode)
{
material.IsAlphaBlending = true;
material.SetVector4("Front", new Vector4(1, 0, 0, 0.5f));
material.SetVector4("Back", new Vector4(1, 0, 0, 0.5f));
}
else
{
material.SetVector4("Front", new Vector4(0, 0, 1, 1));
material.SetVector4("Back", new Vector4(1, 0, 0, 1));
}
m_operations.Context.OriginalMesh.Render(material);
}
}
if (m_showOccluderMesh)
{
if (m_operations.Context.OccluderMesh != null)
{
var material = new Material();
material.ShaderHandle = shader_frontback;
material.ShowLines = m_showOccluderLines;
if (m_alphaBlendingMode)
{
material.IsAlphaBlending = true;
material.SetVector4("Front", new Vector4(0, 1, 0, 0.5f));
material.SetVector4("Back", new Vector4(0, 1, 0, 0.5f));
}
else
{
material.SetVector4("Front", new Vector4(0, 0, 1, 1));
material.SetVector4("Back", new Vector4(1, 0, 0, 1));
}
m_operations.Context.OccluderMesh.Render(material);
}
}
DrawOctree(m_operations.Context.Octree);
DrawDebug();
DrawOverlay(m_operations.Context.OriginalMesh, m_operations.Context.OccluderMesh);
}
示例2: DrawTwoSidedOriginalMesh
private void DrawTwoSidedOriginalMesh()
{
GL.Enable(EnableCap.DepthTest);
GL.Disable(EnableCap.CullFace);
if (m_input.OriginalMesh != null)
{
var material = new Material();
material.ShaderHandle = shader_frontback;
material.ShowLines = false;
material.SetVector4("Front", new Vector4(0, 0, 1, 1));
material.SetVector4("Back", new Vector4(1, 0, 0, 1));
m_input.OriginalMesh.Render(material);
}
}