Skip to main content

flutter3d_conformance_render 1.0.0-rc.2 copy "flutter3d_conformance_render: ^1.0.0-rc.2" to clipboard
flutter3d_conformance_render: ^1.0.0-rc.2 copied to clipboard

The render checks of flutter3d's conformance suite: what a plugin adds to the frame, drawn on a backend. Apart from flutter3d_conformance because it needs the renderer.

flutter3d_conformance_render #

What a plugin adds to the frame, drawn on a backend and checked: the render half of flutter3d's conformance suite.

import 'package:flutter3d_conformance_render/flutter3d_conformance_render.dart';
import 'package:flutter3d_cpu/flutter3d_cpu.dart';

// `HairPlugin`, `hairShaders` and `hairModel` are the plugin's own.

void main() => runPluginRenderConformance(
  HairPlugin.new,
  backend: 'cpu',
  device: () => CpuDevice(width: 32, height: 32, shaders: hairShaders()),
  points: PluginRenderPoints(litModel: hairModel),
);

A plugin names the points it reaches in PluginRenderPoints, and each one is drawn through the renderer on the device the suite is given:

  • render.nodes: every node the plugin places runs in a frame, and none once the plugin is switched off; a node named in drawn changes the picture.
  • render.litModel: a box drawn through the plugin's lit model is a picture of its own, and every block and texture of its slot table reaches the stage.
  • render.lightType: a box lit by the plugin's light type alone is lit.
  • render.decal: the decal pass runs with the plugin's stage and paints the floor.
  • render.velocity: the node reading the velocity runs after the camera velocity, with neither of the engine's readers on.
  • render.shadows: each producer the technique hands the frame is run.

A device that draws no picture, a recording fake, is held to the structure, and the checks that compare pictures are declined with the reason.

Why it is not part of flutter3d_conformance. That package is the contract every backend runs against itself as a dev dependency, and the plugin suite of the loop. Neither needs the renderer, and these checks do, so they live here and a backend's tests do not pull the engine in.

0
likes
140
points
70
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

The render checks of flutter3d's conformance suite: what a plugin adds to the frame, drawn on a backend. Apart from flutter3d_conformance because it needs the renderer.

Topics

#graphics #gpu #testing #conformance

License

MIT (license)

Dependencies

flutter3d_conformance, flutter3d_core, flutter3d_foundation, flutter3d_hardware, flutter3d_plugin_api, flutter3d_sim, test, vector_math

More

Packages that depend on flutter3d_conformance_render