Ejemplo n.º 1
0
        protected sealed override VFXExpression Evaluate(VFXExpression[] constParents)
        {
            var meshReduce         = constParents[0];
            var vertexOffsetReduce = constParents[1];
            var channelFormatAndDimensionReduce = constParents[2];

            var mesh         = meshReduce.Get <Mesh>();
            var vertexOffset = vertexOffsetReduce.Get <uint>();
            var channelFormatAndDimension = channelFormatAndDimensionReduce.Get <uint>();

            return(VFXValue.Constant(VFXExpressionMesh.GetFloat(mesh, vertexOffset, channelFormatAndDimension)));
        }
        protected sealed override VFXExpression Evaluate(VFXExpression[] constParents)
        {
            var meshReduce          = constParents[0];
            var vertexIndexReduce   = constParents[1];
            var channelOffsetReduce = constParents[2];
            var vertexStrideReduce  = constParents[3];

            var mesh          = meshReduce.Get <Mesh>();
            var vertexIndex   = vertexIndexReduce.Get <uint>();
            var channelOffset = channelOffsetReduce.Get <uint>();
            var vertexStride  = vertexStrideReduce.Get <uint>();

            return(VFXValue.Constant(VFXExpressionMesh.GetFloat(mesh, vertexIndex, channelOffset, vertexStride)));
        }