openframeworks / openframeworks/openFrameworks

Feature Suggestion: More Debugging and Compiling Information on Shader Compilation

Open
#6,755 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Love to know people's thoughts on trying to include more debugging information for shaders?

I've recently been writing more glsl in openFrameworks and I've been finding it frustrating that there's not more information on if shaders compile correctly. Maybe I'm missing something that's already in oF but I found this old forum post expressing a similar sentiment: https://forum.openframeworks.cc/t/debugging-of-glsl-code-any-suggestions/12318.

My suggestion would be to add a precompile step for projects that include shader files. This step would run glslangValidator (found in https://github.com/KhronosGroup/glslang) and provide the results in the output. It may not be perfect but I think it would improve the process. Of course if someone knows a more powerful tool to validate glsl code then that would be awesome.

If people think this would be a good addition. I would be willing to work on this project but I would likely need support. I could test on windows and linux but I don't currently have an osx machine. I would also likely need someone more familiar with the code base to provide guidance and/or answer questions. That being said if someone else wants to take on this task that would be awesome too.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the project's shader compilation or project precompile entry point and reviewing how shader files are currently handled. Evaluate where glslangValidator could run and how its results would be reported across platforms; done means shader projects receive useful compilation diagnostics, with behavior defined for supported systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.