PROPHET/OS

NAME

pgl: prophetGL's providers (R13-PGL-04)

SYNOPSIS

pgl [check | caps [profile] | tex | ids [seed] | start [seed] [file.ppm] | seeds | anim [seconds] [seed] [jungle|cubes|flight] |
     filter in.ppm out.ppm name [a] [b] | sphere out.ppm model [light] [surface] | buffering [ms] |
     virtual [pages] [budget] | stream [budget] | bindless |
     latency [frames looked back] [reserve us] | bvh [triangles] | rays [points] | tess]

DESCRIPTION

ProphetGL's providers (R13-PGL-04): each one draws the probe's scene 4 once uncounted and five times counted in cycles, the least is its time, and the fastest is chosen; a provider named in pgl.provider beats the measurement when it draws. A * marks the chosen row.

pgl check draws scenes 3 and 4 on every provider that draws and holds each pixel against the reference pgl_reference_pixel_get. Then three of engine's cubes are drawn by engine's bands and through ProphetGL: a point holds when the other frame carries its colour there or on one of the eight around, since the bands snap a corner to a pixel and ProphetGL takes it in 1/256. pgl start shows the start picture, "ProphetGL, night over the city", on lux's screen, its towers out of seed, for six seconds or until a key, unless pgl.start_animation is 0. Without a seed it takes the one pgl.start_animation_seed names, and a fresh one each start while that is 0, so no two starts look the same. Every start's seed is kept as a line of the log application/pgl_core_start with what it showed and the build; pgl seeds lists them, and a kept seed named again (as the argument or in pgl.start_animation_seed) repeats exactly that picture. pgl anim takes its seed the same way.

pgl caps lists ProphetGL's capabilities by name (R13-PGL-23), each with the version of its rule and what it does, and under each the providers that offer it: an offer is passed when its known answers hold here (a probe scene drawn by the provider, every pixel the rule pgl_reference_pixel_get decides held to it), refused when its pixels lie apart, and "does not draw here" when the provider cannot draw on this machine; only a passed offer is served. Then the count of refused offers, and the query over the whole table: the providers that serve every row, fastest first, then each other one with the first row it misses.

pgl caps <profile> reads a profile: a text file, a line each: must <cap> [version] (no start without it), want <cap> [version] (nicer with it, off without), pick <cap> <cap> ... (one of them, the first named first), a bare <cap> [version] a must, # a note. Each capability past the core's is a module of its own folder (lib/pgl/<stage>/<kind>/module.caps): a folder taken away is a module gone, said "(off: no module here)", and pgl caps names a module left out because its needs are missing. A bare name reads /system/pgl/profiles/<name>.caps (p64 has one). Every provider is named with all the profile's needs it misses, a name the table does not know marked as such, then the providers the whole profile goes to, fastest first, and the chain a program opens once at its start (pgl_caps_chain_open): the provider pgl.provider names, else the fastest whole one, said as "(pgl.provider)" or "(auto)": every must and pick met, then the most wants, then the fastest; each need with "(calls)" where the kind hands out its calls, "(picked)", "(not picked)", "(off: no module here)" or "(off: not on this provider)", or the must that is missing. A program says the same line (pgl_caps_chain_line_write) when it opens its chain. Under it the pass graph (pgl_caps_graph_line_write): every pass on in levels, a writer left of each reader of what it writes (each module's reads and writes in its module.caps), "a | b" a level apart; a want whose pass reads what no pass on writes is off and says so, a must stops the chain.

pgl ids draws 400 flat triangles out of seed (default 1), a colour a triangle, on every provider and holds each picture against pgl.soft: pixels apart by coverage, and pixels where another triangle is the nearer one. Three kinds: every triangle at a depth of its own, sloped ones that cross, and pairs on the same corners one step of depth apart.

pgl anim draws the start animated, its light sweeping behind the city, or with jungle the monkey sweeping its torch from the canopy to the roots, or with cubes a scene in 3D, 21 cubes turning with depth and light, or with flight one calm flight over water at dusk, under the arch of a stone bridge and on toward a city whose windows light one after the other (R13-ANIM-02), for seconds (default 10): every frame built anew and drawn on the card straight into the hidden surface of the output lux.screen names, then flipped to; nothing comes back over the bus. It says its frames a second and what a frame cost to build and to draw.

Back comes 0 when a provider draws and no pixel lies apart, else 1.

pgl filter in.ppm out.ppm name [a] [b] reads a picture of P6 and 255, lays one module onto it and writes it: quantize (a steps), bayer (order a, b steps), diffuse (a steps), halftone (cell a), bluenoise (a steps, frame b), depth (format a: 0 nine bits, 1 fifteen, 2 sixteen, 4 eight), invert, mono (a 1 for sepia), whitebalance (gains a and b of red and blue), tonemap (curve a: 0 Reinhard, 1 ACES, 2 Hable, 3 GT, 4 AgX; exposure b), grain (a, frame b), flare (lens flares: ghosts of the points over threshold a through the middle and a streak, strength b), aberration (a), sharpen (a), blur (radius a), mosaic (a), fxaa (threshold a), kuwahara (a), lens (a), vision (a: 0 night, 1 thermal), ascii, unsharp (a), kawase, deflicker, vhs (frame a), scanline (kind a: 0 lines, 1 grille, 2 mask; b of 256), exposure (target a), checker (frame a), shadowlight, add (mode a), multiply, premultiplied, palette (turn a), dirt (seed a, strength b), grade (a teal and orange table), fisheye (a / 65536 of a turn), cry (through the Jaguar's CRY mode and back), crt (composite bleed and an aperture grille, the others at a / 256), mlaa (morphological anti-aliasing), smaa (mlaa with edges by local contrast and sharp corners), vq (into a book of 2 by 2 blocks under the threshold a and back), scroll (a wave of a points, phase b), fog (toward a colour a, by the height), mode7 (the picture's corner of powers of two turned by a / 65536 of a turn), fields (its even rows woven onto its odd lines, bobbed with b), deep (a soft ramp over the picture down to a bits a channel, the left half rounded, the right dithered; 10 and 12 the packed RGB10A2 and P012 ways), hdr10 (the picture at a peak of a cd/m^2 as HDR10 PQ codes, shown by their top eight bits), tiled (a triangles of depth in tiles, 2000 by default; b 1 deferred, else immediate; what was shaded and the time), csaa (the fan of msaa at a coverage samples, 8 or 16, sharing b colours, 2 to 8), tsr (eight frames drawn at half the size, each half a small point off, brought up and gathered; a 1 the first alone), multiframe (three frames between the picture and the picture moved a points, the b-th shown), framegen (the frame at b / 256 between the picture and the picture moved a points right, out of their motion), taa (eight coarse frames of the picture, each shifted by half a coarse point, gathered over time into edges; a 1 the first coarse frame alone), pbr (the picture as a relief lit the metal-roughness way: its light a height, its colour the albedo, metal where bright when a, roughness b), ao (the picture's light as a heightfield, its ambient occlusion baked at radius a and strength b and laid on it), msaa (a fan of 24 thin triangles at a samples a point: 1, 2, 4 or 8), tev (a GameCube-like chain of two combiner stages: the picture times a round light, then a warm tone by the light of the picture moved by a points), oit (24 translucent discs at their own depths in no order, resolved exact, or weighted without a sort when a is 1), stencil (two circles counted into a stencil buffer, then drawn through its test: one darkened, both inverted; a the radius), sprites (64 round sprites on a wave, a a line, 8 by default, the last on a full line dropping out; every third behind the picture when b), tilemap (the picture made small to a map of 32 by 32 tiles of 8 by 8 in sixteen shades, wrapped across the screen, scrolled by a, every other tile flipped when b), ssaa (the picture a times smaller) and dynres (the scale its controller picks for a frame of a microseconds toward a target of b, the picture brought up by its inverse). Where a module wants a second picture, the picture's own negative stands for it. - for out.ppm shows it on lux for three seconds.

pgl sphere out.ppm model [light] draws a sphere of 384 points across, lit by one shading model of lib/pgl/shade (lambert, phong, blinn, orennayar, ggx, cooktorrance, ramp, principled, hair, sheen, clearcoat, thinfilm; pbr with its maps: gold metal on the left, an orange dielectric on the right, smooth at the top to rough at the bottom; the specular ones over Lambert's diffuse) and one light of lib/pgl/light (directional from the upper left, the default; point; spot; area; ies; cookie), in Q16 whole numbers, and writes it; - for the file shows it on lux's screen for three seconds. A surface of lib/pgl/shade may follow: normalspace (bumps out of a map), triplanar, parallax, detail, splat (grass, rock, sand, snow), flow, panning, flipbook, opacity (holes), emissive (glowing stripes), refract (a glass sphere over a checkered floor) envmap (a chrome one in a sky's cube), vertexpaint, decal, displace, worldproject, caustics, indirect, sss (skin lit from behind), sssprofile or stochastic (a tiled checker with its repeats broken).

pgl deferred out.ppm|- plain|ssao|dof|bokeh|ssr|motionblur|all|outline draws a floor and seven spheres into a G-buffer, each row's span through raster.earlyz; the two small spheres behind the blue one are tested by raster.hiz against the depth the large ones left and not drawn ("culled by hiz: 2 of 2"); a painted ring lies on the floor at the floor's frozen depth (raster.zfreeze, a decal: surface detail, lit and shadowed like the floor); each point's way to each light is tested against every sphere for its shadow; raster.gbuffer lights it, then the named screen-space effect (outline: post.outline's Sobel over depth and normals). - shows it on lux for three seconds.

pgl buffering [ms] steps a drawer of ms milliseconds a frame (17 by default) a second against a blank of 60 Hz through double and triple FIFO, triple mailbox and double immediate (raster.buffering) and says for each the frames shown, the frames dropped and the blanks that repeated the frame before.

pgl virtual [pages] [budget] walks a window of 16 x 16 reads over a virtual texture of 8192 x 8192 in pages of 128 for 240 frames, each read at level 0, 1 or 2 (3d.texture.virtual), with pages in memory (64) and pages loaded a frame (4) as given, and says what was loaded, what gave way and how many reads came from the level asked.

pgl stream [budget] streams a sparse texture of 4096 in pages of 128 (3d.texture.sparse), only its top level bound at the start: a window of reads walks over it 120 frames, each read laid into a feedback map of 32 x 32 regions (3d.texture.feedback), and after each frame up to budget pages (4) of the level each region asked and the coarser ones are bound, finest first; it says how many pages were bound and what share of the reads found their page.

pgl bindless makes 1000 textures by handle (3d.texture.bindless), holds them resident, reads each a hundred times through its handle and says the cycles of a read; then lets a third go, takes their slots again and says how many of the old handles were refused (all of them, their generation having moved on).

pgl latency [n] [reserve] paces 600 frames of 4 to 10 ms, a spike of 8 ms in fifty, against 60 Hz (aa.latency): once begun at once, once waiting the period less the longest of the last n frames (8) and the reserve (2000 us); it says the mean latency from reading the input to the blank and the blanks missed for each.

pgl bvh [n] builds a hierarchy over n triangles (100000) of a cloud of 32 m (rt.bvh) and traces a million rays from anywhere toward points in it across the cores; it says the build's time, the rays' time and rate, and how many hit; then the same rays through the wide hierarchy on the widest unit (its way, nodes, packets and rate, a sample checked ray by ray against the binary walk) and through a hierarchy over the same triangles in singles. That the hierarchies find what testing every triangle finds, on every way, is the module's check.

pgl tess cuts every domain (triangle, quad, isolines) at every spacing at the levels 1 to 64 (3d.geometry.tessellation) and says the triangles or segments made, the time and how many patches were refused.

pgl rays [n] lays a hilly ground of 80000 triangles over 64 m (whole numbers, turned into singles by rt.bvh), puts n points (200000) on it and lights them by a low sun through rt.shadow and shades them by 16 rays each within 2 m through rt.ao, mirrors them from an eye above (rt.reflect), gathers what falls on a tenth of them after one bounce by 8 rays (rt.gi) and traces a picture of 256 x 144 of the ground, 4 samples and 2 bounces (rt.path), across the cores: the hierarchy's time, each module's time and rate, how many points are lit, the mean occlusion, the picture's middle.

EXAMPLE

$ pgl --help
pgl [check | caps [profile] | tex | ids [seed] | start [seed] [file.ppm] | seeds | anim [seconds] [seed] [jungle|cubes|flight] |
     filter in.ppm out.ppm name [a] [b] | sphere out.ppm model [light] [surface] | buffering [ms] |
     virtual [pages] [budget] | stream [budget] | bindless |
     latency [frames looked back] [reserve us] | bvh [triangles] | rays [points] | trace | hdr | unpack]
  ProphetGL's providers measured on scene 4 and the chosen one;
  check holds scenes 3 and 4 of each against the reference,
  tex holds a blit and a turned textured quad of each row that samples against the reference,
  ids holds flat triangles of each against pgl.soft by coverage and by the nearer triangle,
  start shows the start picture on lux's screen,
  anim draws the start animated straight onto the card's screen and says its frames a second,
  filter lays a module of lib/pgl/color, post, retro or aa onto a picture file,
  sphere draws a lit sphere by a shading model and a light of lib/pgl/shade and light,
  buffering steps a drawer of ms a frame against 60 Hz through each swap chain and says what it showed,
  virtual walks a window over a virtual texture of 8192 and says what was loaded and read where,
  stream binds a sparse texture's pages out of the reads' feedback and says how many reads found theirs,
  bindless makes, reads and lets go textures by handle and says what a stale handle got,
  latency paces frames of 4 to 10 ms with spikes against 60 Hz and says the latency and the blanks missed,
  bvh builds a hierarchy over a cloud of triangles and traces a million rays through it across the cores,
  rays lights points of a hilly ground by a low sun (rt.shadow), shades them by 16 rays each (rt.ao), mirrors
  them (rt.reflect), gathers their light (rt.gi) and traces a picture of it (rt.path),
  trace times rays opaque, reordered, under an alpha with and without a micromap and over displaced micro-meshes,
  hdr times a 1080p frame out as HDR10 and through Prophet Vision and paces frames on a variable refresh rate,
  unpack packs 32 MiB of a texture and times it unpacked across the cores and on the card

SEE ALSO

lux, gpu