Beispiel #1
0
        public static PictureFlusher.RenderDraw fill1(PictureFlusher.RenderLayer layer, Paint paint,
                                                      MeshMesh mesh)
        {
            var mat = _fill1Mat.getMaterial(paint.blendMode);

            _getShaderPassAndProps(layer, paint, mesh, 1.0f, out var pass, out var props);

            return(new PictureFlusher.RenderDraw {
                mesh = mesh.boundsMesh,
                pass = pass,
                material = mat,
                properties = props,
            });
        }
Beispiel #2
0
        public static PictureFlusher.RenderDraw fill1(PictureFlusher.RenderLayer layer, Paint paint,
                                                      MeshMesh mesh)
        {
            Vector4 viewport = layer.viewport;
            Matrix3 ctm      = layer.states[layer.states.Count - 1].matrix;

            var mat = _fill1Mat.getMaterial(paint.blendMode);

            _getShaderPassAndProps(viewport, ctm, paint, 1.0f, out var pass, out var props);

            return(new PictureFlusher.RenderDraw {
                mesh = mesh.boundsMesh,
                pass = pass,
                material = mat,
                properties = props,
            });
        }
Beispiel #3
0
        public static PictureFlusher.CmdDraw fill1(PictureFlusher.RenderLayer layer, uiPaint paint,
                                                   uiMeshMesh mesh)
        {
            var mat = _fill1Mat.getMaterial(paint.blendMode);

            _getShaderPassAndProps(layer, paint, mesh.matrix, 1.0f, 0.0f, out var pass, out var props);

            var ret = PictureFlusher.CmdDraw.create(
                mesh: mesh.boundsMesh,
                pass: pass,
                material: mat,
                properties: props
                );

            ObjectPool <uiMeshMesh> .release(mesh);

            return(ret);
        }