OHP3D is an OpenGL PDF viewer for X11 and GNU/Linux. It loads a PDF document and renders its pages in a 3D scene. User can navigate through the scene (move, rotate, roll, zoom) or just simply switch the slides (transparencies) during the presentation.
Thanks to OpenGL, additional filters/effects can be applied – user can provide his own vertex and fragment shaders (GLSL). Changes in the shader files are applied immediately – no need to restart the presentation.
It is still bit raw and there is no release yet, but the latest version from the Mercurial repository should work quite well.
OHP3D started as a private prototype. This public version is based on ShaderShark with some changes and PDF loading code from the prototype. In the future, OHP3D may become a module/mode of ShaderShark.
Environment variables:
OHP3D_DATA_DIR
– should point to a place where shaders
and
documents
directories are located;
is used to load defaults when no shaders/document are specified;
can point to the OHP3D source directory
DISPLAY
– standard X11 variable;
can be used to run the application on different display;
usually keep default that is already set
Command line arguments:
--document
– PDF file to load
--shader
– first argument is shader type
(vertex
or fragment
)
and second one is the file name;
when missing, default shader is loaded
--background-color
– RGB color code in hexadecimal,
like
147258
, 333333
, 345678
etc.
--root-window
– specify an X11 window ID
(as decimal or hexadecimal integer)
to embed OHP3D into an existing window
Controls:
OHP3D is controlled mainly by the keyboard. It expects fingers on the home row, thus it is ESDF not WASD. Left hand does move forward/backward, rotate left/right and roll left/right. Right hand does move left/right (three different speeds) and move up/down.
Basic usage is just:
ohp3d --document "some.pdf"
Apply custom filter/effect:
ohp3d --document "some.pdf" --shader fragment "phosphor-custom.frag"
Original PDF presentation:
Grayscale and noise effect:
Green screen effect:
Amber screen effect:
Smaller fonts can become illegible. Might be usable as a film or game prop, but not for actual reading documents:
CRT or phosphor scanline effects work best with pixelated graphics like games from decades ago because they were crafted for such hardware. Such graphics can be significanly improved this way and can look great even on contemporary displays. There are also much more complex shaders than our simple examples. On the other hand, aplying such effects on high resolution images is bit odd – may look interesting at first sight but the lines have usually different frequency than pixels and multiple pixels fall in the same line which does not make sense. However such images can be improved in different ways – possibilities of GLSL are almost endless.
Office utilities are free software © 2023 GlobalCode