Code Monkey home page Code Monkey logo

gpupad's Introduction

GPUpad

Build Issues

Features | Screenshots | Introduction | Download | Building | Changelog

A lightweight editor for GLSL shaders of all kinds and a fully-featured IDE for developing GPU based algorithms.

Features

  • Cross platform and efficient.
  • Decent source editor with automatic indentation, brace highlighting, rectangular selection…
  • GLSL, HLSL, JavaScript and Lua syntax highlighting with basic auto completion.
  • Continuous validation of standalone shader and script files.
  • Possibility to evaluate shader programs with completely customizeable input and OpenGL state.
  • Automatically defined printf function for printf-debugging.
  • JavaScript expressions and scripts to define uniform input.
  • Dumping of preprocessed source, SPIR-V and glslang AST (only when glslangValidator is found).
  • Reading and writing of image files (KTX and DDS for 3D/Array textures, block compressed textures, cube maps…).
  • Streaming video files to textures (only when built with the optional dependency Qt6Multimedia).
  • Editor for structured binary files.
  • Advanced hot reloading of externally modified files.
  • Base16 theme support.
  • Sample sessions in the Help menu.

Screenshots

 

Introduction

Getting Started

To get started, you can open and play around with the sample sessions in the Help menu.

Session

In order to try out the shaders, the session allows to define draw and compute calls, together with the pipeline state and data the programs should operate on.

It can be populated with items from the Session menu or the context menu. Undo/redo, copy/paste and drag/drop should work as expected (also between multiple instances). It is even possible to drag the items to and from a text editor (they are serialized as JSON).

The sample sessions can also be used as templates - saving a session As... copies all the dependencies to the new location.

Evaluation

The session can be evaluated manually [F6], automatically whenever something relevant changes [F7] or steadily [F8], for animations. All items which contributed to the last evaluation are highlighted.

Items

The items of a session pretty much correspond the concepts known from writing OpenGL applications:

  • Call - Most prominently are the draw and the compute calls. Whenever the session is evaluated, all active calls are evaluated in consecutive order. They can be de-/activated using the checkbox. The elapsed time of each call is output to the Message window (measured using OpenGL timer queries).

  • Program - Consists of one or multiple shaders, which are linked together, so they can be used by draw or compute calls.

  • Texture - All kind of color, depth or stencil textures can be created. They serve as sample sources, image in- and outputs and target attachments. They can be backed by files. The texture's images can also be explicitly set (for custom mip levels, cube maps…).

  • Target - Specifies where draws calls should render to (it corresponds to an OpenGL FBO). Multiple images can be attached. Depending on the attached image's type, different OpenGL states can be configured.

  • Binding - Allows to bind data to a program's uniforms, samplers, images, buffers and to select shader subroutines. A binding affects all subsequent calls, until it is replaced by a binding with the same name, or the scope ends (see Groups). The name of a binding needs to match the name of a program's binding points.

  • Buffer - Buffer blocks define the structure of a region within a binary. They consist of rows with multiple fields of some data type. Buffers can be backed by binary files.

  • Stream - Serves as the input for vertex shaders. A stream consists of multiple attributes, which get their data from the referenced buffer blocks.

  • Group - Allows to structure more complex sessions. They open a new scope unless inline scope is checked. Items within a scope are not visible for items outside the scope (they do not appear in the combo boxes).

  • Script - Allows to define JavaScript functions and variables in script files, which can subsequently be used in uniform binding expressions. Scripts can also be used to dynamically populate the session and generate buffer and texture data. There is one JavaScript state for the whole session and the scripts are evaluated in consecutive order (Group scopes do not have an effect).

Download

Arch Linux and derivatives:

An up to date build can be installed from the AUR.

Windows, macOS and other Linux distributions:

A portable build can be downloaded from the latest release page.

Building

A C++17 conforming compiler and Qt5 (or Qt6) are required. A script for the CMake build system is provided.

Installing dependencies on Debian Linux and derivatives:

sudo apt install build-essential git cmake qtdeclarative5-dev libdrm-dev

Checking out the source:

git clone https://github.com/houmain/gpupad

Building:

cd gpupad
cmake -B _build
cmake --build _build

On Windows and macOS you might have to pass the path to your Qt installation. e.g:

cmake -B _build -DCMAKE_PREFIX_PATH=C:\Qt\5.15\msvc2019_64

License

It is released under the GNU GPLv3. Please see LICENSE for license details.

gpupad's People

Contributors

houmain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gpupad's Issues

save/export render?

Sorry for the question, but documentation is pretty limited.

How is it possible to save/export rendered image[s] to a file?

Thank you.

GPUpad can't loading big images.

I have an issues when trying to load as texture big images.
Something 4K size loading correctly, Images (JPG, PNG, TIFF) that have size about 8K do not loading at all.
For example 5304x7952px image from Sony A7RIII camera, I tried to load it as Jpg, as png, as a tiff, no luck.
GPUpad even not read image size correctly.
Smaller images... 24MPx or lower can be loaded without issues.

README feedback

Using MacOS Ventura (13.1) with Homebrew, I had the following minor build issues:

Although the README says "... Qt5 (or Qt6) are required", I got the error:

/gpupad/src/VideoPlayer.h:6:10: fatal error: 'QAbstractVideoSurface' file not found

Per the Qt6 docs:

QAbstractVideoSurface has been replaced by the QVideoSink class

I was able to fix this by installing Qt5 with brew install qt@5.

Further, it says "you might have to pass the path to your Qt installation", but the command there lists the wrong step, running the makefiles rather than creating them, and should be:

cmake -B _build -DCMAKE_PREFIX_PATH=C:\Qt\5.15\msvc2019_64

or, in my case:

cmake -B _build -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5

And this also required clearing the build cache (e.g., deleting _build)

You might also mention that glslangValidator needs to be installed (brew install glslang) before the configure step for it to be found.

16bit texture save to disk is not working (Windows)

Hi, sorry for another issue report.

I found that saving 16bit RGB/RGBA textures giving unexpected results:

  • PNG is always saving as 8bit, at least PNG exporter saving correct 8bit images that can be open later.
  • TIFF save 16bit RGB/RGBA probably as 8bit but have incorrect pixel data that remain 16bit. As result decoders read such tiff files corrupted.
  • OpenEXR save just don't work.

Best regards,
Vlad

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.