Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Emara <mail@OmarEmara.dev>2022-05-06 13:58:14 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-05-06 13:58:14 +0300
commit8f6f28a0dc0ad7697863e4dcd78e85f87f9fb8db (patch)
tree5a7bb4ab3526801a7b323f8b18a012cd213af5bb /source/blender/gpu/intern/gpu_shader_dependency.cc
parentf5428736a76add4bce46da452aed6bd04ee8e71b (diff)
GPU: Move common shaders into a common directory
This patch moves some of the utility library shaders into a common directory and makes the necessary renames across shaders. Additionally, material-specific transform functions were moved outside of math utils into a separate transform_utils.glsl file. This is needed in preparation for the viewport compositor, which will make use of some of those utilities and will require all material specific bit to be removed out of those files. Reviewed By: fclem Differential Revision: https://developer.blender.org/D14688
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_dependency.cc')
-rw-r--r--source/blender/gpu/intern/gpu_shader_dependency.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc
index 460b6d32967..eb2d40f5da9 100644
--- a/source/blender/gpu/intern/gpu_shader_dependency.cc
+++ b/source/blender/gpu/intern/gpu_shader_dependency.cc
@@ -549,7 +549,9 @@ struct GPUSource {
bool is_from_material_library() const
{
- return filename.startswith("gpu_shader_material_") && filename.endswith(".glsl");
+ return (filename.startswith("gpu_shader_material_") ||
+ filename.startswith("gpu_shader_common_")) &&
+ filename.endswith(".glsl");
}
};