The official Blender project repository.
Go to file
Clément Foucault 7e5bc58649 GPU: Change GLSL include directive
This changes the include directive to use the standard C preprocessor
`#include` directive.

The regex to applied to all glsl sources is:
`pragma BLENDER_REQUIRE\((\w+\.glsl)\)`
`include "$1"`

This allow C++ linter to parse the code and allow easier codebase
traversal.

However there is a small catch. While it does work like a standard
include directive when the code is treated as C++, it doesn't when
compiled by our shader backends. In this case, we still use our
dependency concatenation approach instead of file injection.

This means that included files will always be prepended when compiled
to GLSL and a file cannot be appended more than once.

This is why all GLSL lib file should have the `#pragma once` directive
and always be included at the start of the file.

These requirements are actually already enforced by our code-style
in practice.

On the implementation, the source needed to be mutated to comment
the `#pragma once` and `#include`. This is needed to avoid GLSL
compiler error out as this is an extension that not all vendor
supports.

Rel #127983
Pull Request: #128076
2024-10-04 15:48:22 +02:00
.gitea Issue template: Use bug label for Python API reports 2024-08-22 04:28:52 +02:00
.github Funding: Add FUNDING.yml to link to fund.blender.org on GitHub mirror 2024-07-31 10:03:57 +02:00
build_files GPU: Add GLSL preprocessor 2024-10-04 11:33:21 +02:00
doc Release cycle: Bump main to 4.4, alpha 2024-10-02 12:12:36 +02:00
extern Cycles: Linux Support for HIP-RT 2024-09-24 14:35:24 +02:00
intern Merge branch 'blender-v4.3-release' 2024-10-04 12:40:20 +02:00
lib Linux: update ShaderC (#2) 2024-09-25 12:38:39 +10:00
locale I18N: Updated UI translations from git/weblate repository (849a7536ac6d4). 2024-09-16 13:26:34 +02:00
release Splash: Update artwork with proper colour space 2024-10-03 18:03:47 +02:00
scripts Merge branch 'blender-v4.3-release' 2024-10-04 14:52:08 +02:00
source GPU: Change GLSL include directive 2024-10-04 15:48:22 +02:00
tests USD: invoke the ComplianceChecker on all exported test files 2024-10-04 02:50:16 +02:00
tools AUTHORS: add 29 new authors 2024-10-03 15:56:48 +10:00
.clang-format Clang-Format: Ensure single new line at the end of files 2024-02-22 14:42:10 +01:00
.clang-tidy Cleanup: match declaration names, avoid shadowing & clear trailing space 2024-10-03 12:12:08 +10:00
.editorconfig editorconfig: add HTML entry 2023-12-08 13:28:13 +11:00
.git-blame-ignore-revs Cleanup: add commit to .git-blame-ignore-revs 2023-05-03 20:31:11 +10:00
.gitignore Switch SVN to Git submodules using Git-LFS 2024-02-22 13:50:55 +01:00
.gitmodules Revert "Release cycle: Blender 4.3 Beta" 2024-10-02 12:35:26 +02:00
AUTHORS AUTHORS: add 29 new authors 2024-10-03 15:56:48 +10:00
CMakeLists.txt Refactor: Move BPY generic headers to proper C++ ones. 2024-09-25 18:04:27 +02:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile Build: Changes for make deps to work on Linux arm64 again 2024-09-24 15:54:47 +02:00
make.bat Cleanup: remove unused icon utilities and make convenience target 2024-06-27 18:28:32 +02:00
pyproject.toml Extensions: Support online extensions and move add-ons outside Blender 2024-05-15 19:26:29 +02:00
README.md Docs: Replace most wiki links with links to new developer docs 2024-01-18 16:49:38 +01:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.