Exemplo n.º 1
0
        public void DrawPlane(Matrix world, bool isSelected, uint textureAssetID, Vector3 uvAnimOffset)
        {
            UvAnimRenderData renderData;

            renderData.worldViewProjection = world * viewProjection;
            renderData.Color        = isSelected ? selectedColor : Vector4.One;
            renderData.UvAnimOffset = (Vector4)uvAnimOffset;

            device.UpdateData(tintedBuffer, renderData);
            device.DeviceContext.VertexShader.SetConstantBuffer(0, tintedBuffer);
            tintedShader.Apply();

            device.DeviceContext.PixelShader.SetShaderResource(0, TextureManager.GetTextureFromDictionary(textureAssetID));

            Plane.Draw(device);
        }
Exemplo n.º 2
0
        public void DrawPlane(Matrix world, bool isSelected, uint textureAssetID, Vector3 uvAnimOffset)
        {
            if (AssetMODL.renderBasedOnLodt && Vector3.Distance(Camera.Position, (Vector3)world.Row4) > 100f)
            {
                return;
            }

            UvAnimRenderData renderData;

            renderData.worldViewProjection = world * viewProjection;
            renderData.Color        = isSelected ? selectedColor : Vector4.One;
            renderData.UvAnimOffset = (Vector4)uvAnimOffset;

            device.UpdateData(tintedBuffer, renderData);
            device.DeviceContext.VertexShader.SetConstantBuffer(0, tintedBuffer);
            tintedShader.Apply();

            device.DeviceContext.PixelShader.SetShaderResource(0, TextureManager.GetTextureFromDictionary(textureAssetID));

            Plane.Draw(device);
        }