2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2006 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2010-09-18 03:55:56 +00:00
|
|
|
set(INC
|
2024-12-23 21:38:19 +01:00
|
|
|
PUBLIC .
|
2023-08-15 14:15:12 +02:00
|
|
|
dummy
|
2023-08-24 11:38:41 +10:00
|
|
|
intern
|
2022-03-22 12:38:28 +01:00
|
|
|
metal
|
2022-03-25 12:04:14 +11:00
|
|
|
opengl
|
2022-12-17 16:00:40 +11:00
|
|
|
vulkan
|
2025-01-02 19:56:24 +01:00
|
|
|
../makesrna
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2022-06-22 14:59:42 +10:00
|
|
|
# For theme color access.
|
2016-10-12 23:01:59 +00:00
|
|
|
../editors/include
|
|
|
|
|
|
2024-09-20 13:14:57 +10:00
|
|
|
# For `*_info.hh` includes.
|
2024-12-17 10:34:24 +01:00
|
|
|
../compositor/shaders/infos
|
2025-03-17 15:35:01 +01:00
|
|
|
../draw/engines/eevee
|
|
|
|
|
../draw/engines/eevee/shaders/infos
|
2023-05-30 11:14:16 +02:00
|
|
|
../draw/engines/gpencil
|
2024-10-15 16:31:37 +02:00
|
|
|
../draw/engines/gpencil/shaders/infos
|
|
|
|
|
../draw/engines/image/shaders/infos
|
|
|
|
|
../draw/engines/overlay/shaders/infos
|
2023-05-23 15:00:38 +02:00
|
|
|
../draw/engines/select
|
2024-10-15 16:31:37 +02:00
|
|
|
../draw/engines/select/shaders/infos
|
2023-01-23 17:59:07 +01:00
|
|
|
../draw/engines/workbench
|
2024-10-15 16:31:37 +02:00
|
|
|
../draw/engines/workbench/shaders/infos
|
2022-09-02 18:30:48 +02:00
|
|
|
../draw/intern
|
2024-10-15 16:31:37 +02:00
|
|
|
../draw/intern/shaders
|
|
|
|
|
metal/kernels
|
2025-08-22 10:11:55 +02:00
|
|
|
vulkan/shaders
|
2024-10-15 16:31:37 +02:00
|
|
|
shaders/infos
|
2022-06-28 18:33:25 +02:00
|
|
|
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2024-10-04 15:48:22 +02:00
|
|
|
# For shader includes
|
|
|
|
|
shaders/common
|
|
|
|
|
shaders
|
|
|
|
|
|
2020-08-06 04:30:38 +02:00
|
|
|
../../../intern/ghost
|
2019-12-16 15:50:14 +01:00
|
|
|
../../../intern/mantaflow/extern
|
2025-02-27 15:42:08 +01:00
|
|
|
../../../intern/opensubdiv
|
2011-05-31 01:15:44 +00:00
|
|
|
)
|
|
|
|
|
|
2024-09-05 13:02:40 +02:00
|
|
|
if(WITH_BUILDINFO)
|
|
|
|
|
add_definitions(-DWITH_BUILDINFO)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-03-23 16:37:52 +01:00
|
|
|
if(WITH_RENDERDOC)
|
|
|
|
|
list(APPEND INC
|
|
|
|
|
../../../extern/renderdoc/include
|
|
|
|
|
../../../intern/renderdoc_dynload/include
|
|
|
|
|
)
|
|
|
|
|
add_definitions(-DWITH_RENDERDOC)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-11-06 20:29:01 +01:00
|
|
|
if(WITH_GPU_SHADER_ASSERT)
|
|
|
|
|
add_definitions(-DWITH_GPU_SHADER_ASSERT)
|
|
|
|
|
endif()
|
|
|
|
|
|
2011-05-31 01:15:44 +00:00
|
|
|
set(INC_SYS
|
2010-09-18 03:55:56 +00:00
|
|
|
)
|
Merge of first part of changes from the apricot branch, especially
the features that are needed to run the game. Compile tested with
scons, make, but not cmake, that seems to have an issue not related
to these changes. The changes include:
* GLSL support in the viewport and game engine, enable in the game
menu in textured draw mode.
* Synced and merged part of the duplicated blender and gameengine/
gameplayer drawing code.
* Further refactoring of game engine drawing code, especially mesh
storage changed a lot.
* Optimizations in game engine armatures to avoid recomputations.
* A python function to get the framerate estimate in game.
* An option take object color into account in materials.
* An option to restrict shadow casters to a lamp's layers.
* Increase from 10 to 18 texture slots for materials, lamps, word.
An extra texture slot shows up once the last slot is used.
* Memory limit for undo, not enabled by default yet because it
needs the .B.blend to be changed.
* Multiple undo for image painting.
* An offset for dupligroups, so not all objects in a group have to
be at the origin.
2008-09-04 20:51:28 +00:00
|
|
|
|
2010-10-23 04:05:55 +00:00
|
|
|
set(SRC
|
2020-07-25 18:29:41 +02:00
|
|
|
intern/gpu_batch.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_batch_presets.cc
|
|
|
|
|
intern/gpu_batch_utils.cc
|
2020-09-07 19:35:56 +02:00
|
|
|
intern/gpu_capabilities.cc
|
2022-04-14 18:47:58 +02:00
|
|
|
intern/gpu_codegen.cc
|
2021-05-26 16:49:17 +02:00
|
|
|
intern/gpu_compute.cc
|
2020-07-25 18:30:13 +02:00
|
|
|
intern/gpu_context.cc
|
2020-09-14 17:07:37 +02:00
|
|
|
intern/gpu_debug.cc
|
2020-07-25 18:40:19 +02:00
|
|
|
intern/gpu_framebuffer.cc
|
2020-07-25 18:40:54 +02:00
|
|
|
intern/gpu_immediate.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_immediate_util.cc
|
2020-09-05 20:15:56 +02:00
|
|
|
intern/gpu_index_buffer.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_init_exit.cc
|
|
|
|
|
intern/gpu_material.cc
|
2020-07-30 23:50:43 +02:00
|
|
|
intern/gpu_matrix.cc
|
2022-11-18 11:08:39 +01:00
|
|
|
intern/gpu_node_graph.cc
|
2025-05-22 17:53:22 +02:00
|
|
|
intern/gpu_pass.cc
|
2020-07-25 18:41:55 +02:00
|
|
|
intern/gpu_platform.cc
|
2020-09-07 23:52:55 +02:00
|
|
|
intern/gpu_query.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_select.cc
|
2023-05-23 15:00:38 +02:00
|
|
|
intern/gpu_select_next.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_select_pick.cc
|
2020-09-07 23:52:55 +02:00
|
|
|
intern/gpu_select_sample_query.cc
|
2020-07-28 20:04:15 +02:00
|
|
|
intern/gpu_shader.cc
|
2023-02-12 16:09:23 +01:00
|
|
|
intern/gpu_shader_builtin.cc
|
2022-01-17 14:45:22 +01:00
|
|
|
intern/gpu_shader_create_info.cc
|
|
|
|
|
intern/gpu_shader_dependency.cc
|
2020-07-30 23:49:13 +02:00
|
|
|
intern/gpu_shader_interface.cc
|
2021-07-08 13:20:32 +10:00
|
|
|
intern/gpu_shader_log.cc
|
2020-07-28 19:26:54 +02:00
|
|
|
intern/gpu_state.cc
|
2022-02-08 23:17:31 +01:00
|
|
|
intern/gpu_storage_buffer.cc
|
2020-07-29 14:50:20 +02:00
|
|
|
intern/gpu_texture.cc
|
2025-02-16 20:42:16 +11:00
|
|
|
intern/gpu_texture_pool.cc
|
2020-08-20 23:09:37 +02:00
|
|
|
intern/gpu_uniform_buffer.cc
|
2020-07-28 02:15:22 +02:00
|
|
|
intern/gpu_vertex_buffer.cc
|
2020-07-27 23:56:43 +02:00
|
|
|
intern/gpu_vertex_format.cc
|
2025-02-24 16:08:30 +01:00
|
|
|
intern/gpu_vertex_format_normals.cc
|
2023-07-27 14:16:58 +02:00
|
|
|
intern/gpu_viewport.cc
|
2025-04-07 15:26:25 +02:00
|
|
|
intern/gpu_worker.cc
|
2025-04-24 12:44:27 +10:00
|
|
|
|
2025-02-24 16:08:30 +01:00
|
|
|
GPU_attribute_convert.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_batch.hh
|
|
|
|
|
GPU_batch_presets.hh
|
|
|
|
|
GPU_batch_utils.hh
|
|
|
|
|
GPU_capabilities.hh
|
|
|
|
|
GPU_common.hh
|
|
|
|
|
GPU_common_types.hh
|
2024-06-05 18:45:57 +02:00
|
|
|
GPU_compilation_subprocess.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_compute.hh
|
|
|
|
|
GPU_context.hh
|
|
|
|
|
GPU_debug.hh
|
2025-08-21 17:08:54 +10:00
|
|
|
GPU_format.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_framebuffer.hh
|
|
|
|
|
GPU_immediate.hh
|
|
|
|
|
GPU_immediate_util.hh
|
|
|
|
|
GPU_index_buffer.hh
|
|
|
|
|
GPU_init_exit.hh
|
2024-02-01 10:40:24 -05:00
|
|
|
GPU_material.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_matrix.hh
|
2025-05-22 17:53:22 +02:00
|
|
|
GPU_pass.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_platform.hh
|
2024-07-25 11:24:11 +10:00
|
|
|
GPU_platform_backend_enum.h
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_primitive.hh
|
2023-12-01 03:39:03 +01:00
|
|
|
GPU_select.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_shader.hh
|
|
|
|
|
GPU_shader_builtin.hh
|
|
|
|
|
GPU_shader_shared.hh
|
|
|
|
|
GPU_state.hh
|
|
|
|
|
GPU_storage_buffer.hh
|
|
|
|
|
GPU_texture.hh
|
2025-02-16 20:42:16 +11:00
|
|
|
GPU_texture_pool.hh
|
2024-02-11 16:10:00 -05:00
|
|
|
GPU_uniform_buffer.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_vertex_buffer.hh
|
|
|
|
|
GPU_vertex_format.hh
|
|
|
|
|
GPU_viewport.hh
|
2025-04-07 15:26:25 +02:00
|
|
|
GPU_worker.hh
|
2016-09-13 02:18:33 -04:00
|
|
|
|
2020-08-07 17:00:28 +02:00
|
|
|
intern/gpu_backend.hh
|
2020-09-07 19:35:56 +02:00
|
|
|
intern/gpu_capabilities_private.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_codegen.hh
|
2020-08-08 03:01:45 +02:00
|
|
|
intern/gpu_context_private.hh
|
2020-09-15 22:50:11 +10:00
|
|
|
intern/gpu_debug_private.hh
|
2020-08-25 23:27:40 +02:00
|
|
|
intern/gpu_framebuffer_private.hh
|
2020-08-31 15:14:47 +02:00
|
|
|
intern/gpu_immediate_private.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_material_library.hh
|
|
|
|
|
intern/gpu_matrix_private.hh
|
|
|
|
|
intern/gpu_node_graph.hh
|
2020-09-07 15:39:47 +02:00
|
|
|
intern/gpu_platform_private.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_private.hh
|
2025-02-18 15:36:50 +01:00
|
|
|
intern/gpu_profile_report.hh
|
2020-09-07 23:52:55 +02:00
|
|
|
intern/gpu_query.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_select_private.hh
|
2022-01-17 14:45:22 +01:00
|
|
|
intern/gpu_shader_create_info.hh
|
|
|
|
|
intern/gpu_shader_create_info_private.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_shader_dependency_private.hh
|
2020-08-20 13:05:22 +02:00
|
|
|
intern/gpu_shader_interface.hh
|
2020-09-30 11:51:13 +10:00
|
|
|
intern/gpu_shader_private.hh
|
2020-08-16 14:01:07 +02:00
|
|
|
intern/gpu_state_private.hh
|
2022-03-23 11:58:59 +11:00
|
|
|
intern/gpu_storage_buffer_private.hh
|
2020-09-02 01:25:32 +02:00
|
|
|
intern/gpu_texture_private.hh
|
2020-08-21 12:30:55 +02:00
|
|
|
intern/gpu_uniform_buffer_private.hh
|
2024-03-23 01:24:18 +01:00
|
|
|
intern/gpu_vertex_format_private.hh
|
2023-08-15 14:15:12 +02:00
|
|
|
|
|
|
|
|
dummy/dummy_backend.hh
|
|
|
|
|
dummy/dummy_batch.hh
|
|
|
|
|
dummy/dummy_context.hh
|
|
|
|
|
dummy/dummy_framebuffer.hh
|
|
|
|
|
dummy/dummy_vertex_buffer.hh
|
2022-03-22 12:38:28 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(OPENGL_SRC
|
|
|
|
|
|
|
|
|
|
opengl/gl_backend.cc
|
|
|
|
|
opengl/gl_batch.cc
|
2024-06-05 18:45:57 +02:00
|
|
|
opengl/gl_compilation_subprocess.cc
|
2022-03-22 12:38:28 +01:00
|
|
|
opengl/gl_compute.cc
|
|
|
|
|
opengl/gl_context.cc
|
|
|
|
|
opengl/gl_debug.cc
|
|
|
|
|
opengl/gl_framebuffer.cc
|
|
|
|
|
opengl/gl_immediate.cc
|
|
|
|
|
opengl/gl_index_buffer.cc
|
|
|
|
|
opengl/gl_query.cc
|
|
|
|
|
opengl/gl_shader.cc
|
|
|
|
|
opengl/gl_shader_interface.cc
|
|
|
|
|
opengl/gl_shader_log.cc
|
|
|
|
|
opengl/gl_state.cc
|
|
|
|
|
opengl/gl_storage_buffer.cc
|
|
|
|
|
opengl/gl_texture.cc
|
|
|
|
|
opengl/gl_uniform_buffer.cc
|
|
|
|
|
opengl/gl_vertex_array.cc
|
|
|
|
|
opengl/gl_vertex_buffer.cc
|
2020-08-07 17:00:28 +02:00
|
|
|
|
|
|
|
|
opengl/gl_backend.hh
|
2020-08-10 11:41:22 +02:00
|
|
|
opengl/gl_batch.hh
|
2024-06-05 18:45:57 +02:00
|
|
|
opengl/gl_compilation_subprocess.hh
|
2021-05-26 16:49:17 +02:00
|
|
|
opengl/gl_compute.hh
|
2020-08-07 17:00:28 +02:00
|
|
|
opengl/gl_context.hh
|
2020-08-31 22:41:04 +02:00
|
|
|
opengl/gl_debug.hh
|
2020-08-29 01:13:54 +02:00
|
|
|
opengl/gl_framebuffer.hh
|
2020-08-31 15:14:47 +02:00
|
|
|
opengl/gl_immediate.hh
|
2020-09-06 02:46:51 +02:00
|
|
|
opengl/gl_index_buffer.hh
|
2020-08-31 15:14:47 +02:00
|
|
|
opengl/gl_primitive.hh
|
2020-09-07 23:52:55 +02:00
|
|
|
opengl/gl_query.hh
|
2020-08-14 15:20:35 +02:00
|
|
|
opengl/gl_shader.hh
|
2020-08-20 13:05:22 +02:00
|
|
|
opengl/gl_shader_interface.hh
|
2020-08-16 14:01:07 +02:00
|
|
|
opengl/gl_state.hh
|
2022-03-23 11:58:59 +11:00
|
|
|
opengl/gl_storage_buffer.hh
|
2020-08-29 01:13:54 +02:00
|
|
|
opengl/gl_texture.hh
|
2020-08-21 12:30:55 +02:00
|
|
|
opengl/gl_uniform_buffer.hh
|
2020-08-11 01:31:40 +02:00
|
|
|
opengl/gl_vertex_array.hh
|
2020-09-06 23:45:51 +02:00
|
|
|
opengl/gl_vertex_buffer.hh
|
2010-10-23 04:05:55 +00:00
|
|
|
)
|
|
|
|
|
|
2022-10-31 16:01:02 +01:00
|
|
|
set(VULKAN_SRC
|
|
|
|
|
vulkan/vk_backend.cc
|
|
|
|
|
vulkan/vk_batch.cc
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_buffer.cc
|
|
|
|
|
vulkan/vk_common.cc
|
2023-03-01 22:46:04 +11:00
|
|
|
vulkan/vk_context.cc
|
2023-03-24 08:09:19 +01:00
|
|
|
vulkan/vk_data_conversion.cc
|
2023-03-23 16:37:52 +01:00
|
|
|
vulkan/vk_debug.cc
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_descriptor_pools.cc
|
|
|
|
|
vulkan/vk_descriptor_set.cc
|
2024-04-16 14:00:49 +02:00
|
|
|
vulkan/vk_descriptor_set_layouts.cc
|
2023-05-04 10:06:48 +02:00
|
|
|
vulkan/vk_device.cc
|
2025-03-21 00:19:55 +00:00
|
|
|
vulkan/vk_device_submission.cc
|
2022-12-02 08:35:17 +01:00
|
|
|
vulkan/vk_fence.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_framebuffer.cc
|
2023-06-08 16:07:38 +02:00
|
|
|
vulkan/vk_image_view.cc
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_immediate.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_index_buffer.cc
|
2023-04-13 13:14:11 +10:00
|
|
|
vulkan/vk_memory_layout.cc
|
2025-09-12 10:20:40 +10:00
|
|
|
vulkan/vk_memory_pool.cc
|
2024-04-23 12:39:41 +02:00
|
|
|
vulkan/vk_pipeline_pool.cc
|
2022-12-02 08:35:17 +01:00
|
|
|
vulkan/vk_pixel_buffer.cc
|
2023-03-06 12:28:55 +01:00
|
|
|
vulkan/vk_push_constants.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_query.cc
|
2024-04-24 21:28:45 +02:00
|
|
|
vulkan/render_graph/nodes/vk_pipeline_data.cc
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/vk_command_buffer_wrapper.cc
|
|
|
|
|
vulkan/render_graph/vk_command_builder.cc
|
2024-05-06 09:20:57 +10:00
|
|
|
vulkan/render_graph/vk_render_graph.cc
|
2024-06-13 09:37:17 +02:00
|
|
|
vulkan/render_graph/vk_render_graph_links.cc
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/vk_resource_access_info.cc
|
|
|
|
|
vulkan/render_graph/vk_resource_state_tracker.cc
|
|
|
|
|
vulkan/render_graph/vk_scheduler.cc
|
2024-08-19 15:37:48 +02:00
|
|
|
vulkan/vk_resource_pool.cc
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_sampler.cc
|
2023-11-14 11:12:19 +01:00
|
|
|
vulkan/vk_samplers.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_shader.cc
|
2024-09-20 08:30:09 +02:00
|
|
|
vulkan/vk_shader_compiler.cc
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_shader_interface.cc
|
2022-12-12 12:22:38 +01:00
|
|
|
vulkan/vk_shader_log.cc
|
2024-09-20 08:30:09 +02:00
|
|
|
vulkan/vk_shader_module.cc
|
2023-11-24 13:52:48 +01:00
|
|
|
vulkan/vk_staging_buffer.cc
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_state_manager.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_storage_buffer.cc
|
|
|
|
|
vulkan/vk_texture.cc
|
2024-03-26 11:35:16 +01:00
|
|
|
vulkan/vk_to_string.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_uniform_buffer.cc
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_vertex_attribute_object.cc
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_vertex_buffer.cc
|
|
|
|
|
|
|
|
|
|
vulkan/vk_backend.hh
|
|
|
|
|
vulkan/vk_batch.hh
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_buffer.hh
|
|
|
|
|
vulkan/vk_common.hh
|
2023-03-01 22:46:04 +11:00
|
|
|
vulkan/vk_context.hh
|
2023-03-24 08:09:19 +01:00
|
|
|
vulkan/vk_data_conversion.hh
|
2023-04-21 12:32:40 +02:00
|
|
|
vulkan/vk_debug.hh
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_descriptor_pools.hh
|
|
|
|
|
vulkan/vk_descriptor_set.hh
|
2024-04-16 14:00:49 +02:00
|
|
|
vulkan/vk_descriptor_set_layouts.hh
|
2023-05-04 10:06:48 +02:00
|
|
|
vulkan/vk_device.hh
|
2022-12-02 08:35:17 +01:00
|
|
|
vulkan/vk_fence.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_framebuffer.hh
|
2024-12-02 14:50:32 +01:00
|
|
|
vulkan/vk_ghost_api.hh
|
2023-06-08 16:07:38 +02:00
|
|
|
vulkan/vk_image_view.hh
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_immediate.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_index_buffer.hh
|
2025-04-04 16:01:06 +02:00
|
|
|
vulkan/vk_memory.hh
|
2025-04-08 14:09:15 +10:00
|
|
|
vulkan/vk_memory_layout.hh
|
2025-09-12 10:20:40 +10:00
|
|
|
vulkan/vk_memory_pool.hh
|
2024-04-23 12:39:41 +02:00
|
|
|
vulkan/vk_pipeline_pool.hh
|
2022-12-02 08:35:17 +01:00
|
|
|
vulkan/vk_pixel_buffer.hh
|
2023-03-06 12:28:55 +01:00
|
|
|
vulkan/vk_push_constants.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_query.hh
|
2024-08-20 11:27:33 +02:00
|
|
|
vulkan/render_graph/nodes/vk_begin_query_node.hh
|
2024-05-10 15:39:56 +02:00
|
|
|
vulkan/render_graph/nodes/vk_begin_rendering_node.hh
|
2024-07-25 11:24:10 +10:00
|
|
|
vulkan/render_graph/nodes/vk_blit_image_node.hh
|
2024-05-10 15:39:56 +02:00
|
|
|
vulkan/render_graph/nodes/vk_clear_attachments_node.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/nodes/vk_clear_color_image_node.hh
|
2024-04-19 14:55:39 +02:00
|
|
|
vulkan/render_graph/nodes/vk_clear_depth_stencil_image_node.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/nodes/vk_copy_buffer_node.hh
|
|
|
|
|
vulkan/render_graph/nodes/vk_copy_buffer_to_image_node.hh
|
|
|
|
|
vulkan/render_graph/nodes/vk_copy_image_node.hh
|
|
|
|
|
vulkan/render_graph/nodes/vk_copy_image_to_buffer_node.hh
|
2024-07-25 11:24:11 +10:00
|
|
|
vulkan/render_graph/nodes/vk_dispatch_indirect_node.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/nodes/vk_dispatch_node.hh
|
2024-06-13 09:37:17 +02:00
|
|
|
vulkan/render_graph/nodes/vk_draw_indexed_indirect_node.hh
|
2024-07-25 11:24:10 +10:00
|
|
|
vulkan/render_graph/nodes/vk_draw_indexed_node.hh
|
2024-06-13 09:37:17 +02:00
|
|
|
vulkan/render_graph/nodes/vk_draw_indirect_node.hh
|
2024-07-25 11:24:10 +10:00
|
|
|
vulkan/render_graph/nodes/vk_draw_node.hh
|
2024-08-20 11:27:33 +02:00
|
|
|
vulkan/render_graph/nodes/vk_end_query_node.hh
|
2024-05-10 15:39:56 +02:00
|
|
|
vulkan/render_graph/nodes/vk_end_rendering_node.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/nodes/vk_fill_buffer_node.hh
|
|
|
|
|
vulkan/render_graph/nodes/vk_node_info.hh
|
|
|
|
|
vulkan/render_graph/nodes/vk_pipeline_data.hh
|
2024-08-20 11:27:33 +02:00
|
|
|
vulkan/render_graph/nodes/vk_reset_query_pool_node.hh
|
2024-05-06 09:20:57 +10:00
|
|
|
vulkan/render_graph/nodes/vk_synchronization_node.hh
|
2024-10-01 14:22:56 +02:00
|
|
|
vulkan/render_graph/nodes/vk_update_buffer_node.hh
|
2024-06-13 09:37:17 +02:00
|
|
|
vulkan/render_graph/nodes/vk_update_mipmaps_node.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/vk_command_buffer_wrapper.hh
|
|
|
|
|
vulkan/render_graph/vk_command_builder.hh
|
2024-05-06 09:20:57 +10:00
|
|
|
vulkan/render_graph/vk_render_graph.hh
|
|
|
|
|
vulkan/render_graph/vk_render_graph_links.hh
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/vk_render_graph_node.hh
|
|
|
|
|
vulkan/render_graph/vk_resource_access_info.hh
|
|
|
|
|
vulkan/render_graph/vk_resource_state_tracker.hh
|
|
|
|
|
vulkan/render_graph/vk_scheduler.hh
|
2024-08-19 15:37:48 +02:00
|
|
|
vulkan/vk_resource_pool.hh
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_sampler.hh
|
2023-11-14 11:12:19 +01:00
|
|
|
vulkan/vk_samplers.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_shader.hh
|
2024-09-20 08:30:09 +02:00
|
|
|
vulkan/vk_shader_compiler.hh
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_shader_interface.hh
|
2022-12-12 12:22:38 +01:00
|
|
|
vulkan/vk_shader_log.hh
|
2024-09-20 08:30:09 +02:00
|
|
|
vulkan/vk_shader_module.hh
|
2023-11-24 13:52:48 +01:00
|
|
|
vulkan/vk_staging_buffer.hh
|
2023-02-21 15:03:12 +01:00
|
|
|
vulkan/vk_state_manager.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_storage_buffer.hh
|
|
|
|
|
vulkan/vk_texture.hh
|
2024-03-26 11:35:16 +01:00
|
|
|
vulkan/vk_to_string.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_uniform_buffer.hh
|
2023-05-11 13:01:56 +02:00
|
|
|
vulkan/vk_vertex_attribute_object.hh
|
2022-10-31 16:01:02 +01:00
|
|
|
vulkan/vk_vertex_buffer.hh
|
|
|
|
|
)
|
|
|
|
|
|
2022-03-22 12:38:28 +01:00
|
|
|
set(METAL_SRC
|
|
|
|
|
metal/mtl_backend.mm
|
2022-10-18 12:18:25 +02:00
|
|
|
metal/mtl_batch.mm
|
2022-06-27 11:41:04 +02:00
|
|
|
metal/mtl_command_buffer.mm
|
2022-08-09 13:26:37 +10:00
|
|
|
metal/mtl_context.mm
|
2022-04-27 12:34:57 +02:00
|
|
|
metal/mtl_debug.mm
|
2022-06-27 11:41:04 +02:00
|
|
|
metal/mtl_framebuffer.mm
|
2022-09-22 17:27:51 +02:00
|
|
|
metal/mtl_immediate.mm
|
2022-09-01 21:42:47 +02:00
|
|
|
metal/mtl_index_buffer.mm
|
2022-07-01 10:30:16 +02:00
|
|
|
metal/mtl_memory.mm
|
2022-07-19 16:59:42 +02:00
|
|
|
metal/mtl_query.mm
|
2022-09-01 22:22:32 +02:00
|
|
|
metal/mtl_shader.mm
|
|
|
|
|
metal/mtl_shader_generator.mm
|
|
|
|
|
metal/mtl_shader_interface.mm
|
2023-05-03 19:08:59 +02:00
|
|
|
metal/mtl_shader_log.mm
|
2022-05-12 20:49:09 +02:00
|
|
|
metal/mtl_state.mm
|
2023-05-03 11:46:30 +02:00
|
|
|
metal/mtl_storage_buffer.mm
|
2022-04-27 12:34:57 +02:00
|
|
|
metal/mtl_texture.mm
|
|
|
|
|
metal/mtl_texture_util.mm
|
2022-07-19 17:11:03 +02:00
|
|
|
metal/mtl_uniform_buffer.mm
|
2022-09-22 17:13:07 +02:00
|
|
|
metal/mtl_vertex_buffer.mm
|
2022-03-22 12:38:28 +01:00
|
|
|
|
|
|
|
|
metal/mtl_backend.hh
|
2022-09-22 17:27:51 +02:00
|
|
|
metal/mtl_batch.hh
|
2022-03-22 12:38:28 +01:00
|
|
|
metal/mtl_capabilities.hh
|
2022-04-27 12:34:57 +02:00
|
|
|
metal/mtl_common.hh
|
|
|
|
|
metal/mtl_context.hh
|
|
|
|
|
metal/mtl_debug.hh
|
2022-06-27 11:41:04 +02:00
|
|
|
metal/mtl_framebuffer.hh
|
2022-09-22 17:27:51 +02:00
|
|
|
metal/mtl_immediate.hh
|
2022-09-01 21:42:47 +02:00
|
|
|
metal/mtl_index_buffer.hh
|
2022-07-01 10:30:16 +02:00
|
|
|
metal/mtl_memory.hh
|
2022-09-01 22:22:32 +02:00
|
|
|
metal/mtl_primitive.hh
|
2022-09-07 15:14:33 +10:00
|
|
|
metal/mtl_pso_descriptor_state.hh
|
2022-07-19 16:59:42 +02:00
|
|
|
metal/mtl_query.hh
|
2022-09-01 22:22:32 +02:00
|
|
|
metal/mtl_shader.hh
|
|
|
|
|
metal/mtl_shader_generator.hh
|
|
|
|
|
metal/mtl_shader_interface.hh
|
2022-09-07 15:14:33 +10:00
|
|
|
metal/mtl_shader_interface_type.hh
|
2023-05-03 19:08:59 +02:00
|
|
|
metal/mtl_shader_log.hh
|
2025-04-16 21:34:18 +02:00
|
|
|
metal/mtl_shader_shared.hh
|
2022-05-12 20:49:09 +02:00
|
|
|
metal/mtl_state.hh
|
2023-05-03 11:46:30 +02:00
|
|
|
metal/mtl_storage_buffer.hh
|
2022-04-27 12:34:57 +02:00
|
|
|
metal/mtl_texture.hh
|
2022-07-19 17:11:03 +02:00
|
|
|
metal/mtl_uniform_buffer.hh
|
2022-09-22 17:13:07 +02:00
|
|
|
metal/mtl_vertex_buffer.hh
|
2022-03-22 12:38:28 +01:00
|
|
|
)
|
|
|
|
|
|
2023-01-19 17:07:23 +11:00
|
|
|
set(LIB
|
2024-12-23 20:08:37 +01:00
|
|
|
PRIVATE bf::blenkernel
|
2023-07-10 22:04:18 +02:00
|
|
|
PRIVATE bf::blenlib
|
2024-12-23 17:47:25 +01:00
|
|
|
PRIVATE bf::bmesh
|
2023-07-10 15:07:37 +02:00
|
|
|
PRIVATE bf::dna
|
2024-12-28 21:38:19 +01:00
|
|
|
PRIVATE bf::draw
|
2024-12-25 23:32:15 +01:00
|
|
|
PRIVATE bf::imbuf
|
2023-07-07 15:37:02 +02:00
|
|
|
PRIVATE bf::intern::atomic
|
2023-11-24 17:12:24 +01:00
|
|
|
PRIVATE bf::intern::clog
|
2023-07-10 18:44:19 +02:00
|
|
|
PRIVATE bf::intern::guardedalloc
|
2024-11-01 20:00:31 +01:00
|
|
|
PRIVATE bf::extern::fmtlib
|
2024-12-26 19:52:49 +01:00
|
|
|
PRIVATE bf::nodes
|
Refactor: OpenColorIO integration
Briefly about this change:
- OpenColorIO C-API is removed.
- The information about color spaces in ImBuf module is removed.
It was stored in global ListBase in colormanagement.cc.
- Both OpenColorIO and fallback implementation supports GPU drawing.
- Fallback implementation supports white point, RGB curves, etc.
- Removed check for support of GPU drawing in IMB.
Historically it was implemented in a separate library with C-API, this
is because way back C++ code needed to stay in intern. This causes all
sort of overheads, and even calls that are strictly considered bad
level.
This change moves OpenColorIO integration into a module within imbuf,
next to movie, and next to IMB_colormanagement which is the main user
of it. This allows to avoid copy of color spaces, displays, views etc
in the ImBuf: they were used to help quickly querying information to
be shown on the interface. With this change it can be stored in the
same data structures as what is used by the OpenColorIO integration.
While it might not be fully avoiding duplication it is now less, and
there is no need in the user code to maintain the copies.
In a lot of cases this change also avoids allocations done per access
to the OpenColorIO. For example, it is not needed anymore to allocate
image descriptor in a heap.
The bigger user-visible change is that the fallback implementation now
supports GLSL drawing, with the whole list of supported features, such
as curve mapping and white point. This should help simplifying code
which relies on color space conversion on GPU: there is no need to
figure out fallback solution in such cases. The only case when drawing
will not work is when there is some actual bug, or driver issue, and
shader has failed to compile.
The change avoids having an opaque type for color space, and instead
uses forward declaration. It is a bit verbose on declaration, but helps
avoiding unsafe type-casts. There are ways to solve this in the future,
like having a header for forward declaration, or to flatten the name
space a bit.
There should be no user-level changes under normal operation.
When building without OpenColorIO or the configuration has a typo or
is missing a fuller set of color management tools is applies (such as the
white point correction).
Pull Request: https://projects.blender.org/blender/blender/pulls/138433
2025-05-09 14:01:43 +02:00
|
|
|
PRIVATE bf::dependencies::optional::opencolorio
|
2023-01-19 17:07:23 +11:00
|
|
|
)
|
|
|
|
|
|
2022-03-22 12:38:28 +01:00
|
|
|
# Select Backend source based on availability
|
2023-07-11 09:17:31 +02:00
|
|
|
if(WITH_OPENGL_BACKEND)
|
2023-10-07 18:29:52 +11:00
|
|
|
list(APPEND INC_SYS
|
|
|
|
|
${Epoxy_INCLUDE_DIRS}
|
|
|
|
|
)
|
|
|
|
|
list(APPEND SRC
|
|
|
|
|
${OPENGL_SRC}
|
|
|
|
|
)
|
|
|
|
|
list(APPEND LIB
|
|
|
|
|
${Epoxy_LIBRARIES}
|
|
|
|
|
)
|
2023-07-11 09:17:31 +02:00
|
|
|
add_definitions(-DWITH_OPENGL_BACKEND)
|
2022-03-22 12:38:28 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_METAL_BACKEND)
|
|
|
|
|
list(APPEND SRC ${METAL_SRC})
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
|
2022-11-23 14:42:11 +01:00
|
|
|
if(WITH_VULKAN_BACKEND)
|
2023-01-19 17:07:23 +11:00
|
|
|
list(APPEND INC
|
2023-03-01 22:46:04 +11:00
|
|
|
../../../extern/vulkan_memory_allocator
|
2023-01-19 17:07:23 +11:00
|
|
|
)
|
2022-11-23 14:42:11 +01:00
|
|
|
list(APPEND INC_SYS
|
|
|
|
|
${VULKAN_INCLUDE_DIRS}
|
2023-10-07 18:25:44 +11:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
list(APPEND INC_SYS
|
2023-01-30 11:24:06 +01:00
|
|
|
${SHADERC_INCLUDE_DIRS}
|
2022-11-23 14:42:11 +01:00
|
|
|
)
|
2023-01-19 17:07:23 +11:00
|
|
|
list(APPEND SRC
|
|
|
|
|
${VULKAN_SRC}
|
2022-11-23 14:42:11 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
list(APPEND LIB
|
2023-01-19 17:07:23 +11:00
|
|
|
${VULKAN_LIBRARIES}
|
2023-01-30 11:24:06 +01:00
|
|
|
${SHADERC_LIBRARIES}
|
2022-11-23 14:42:11 +01:00
|
|
|
extern_vulkan_memory_allocator
|
2024-12-17 12:43:20 +01:00
|
|
|
PRIVATE bf::extern::xxhash
|
2022-11-23 14:42:11 +01:00
|
|
|
)
|
2023-04-14 10:17:35 +02:00
|
|
|
|
2023-01-19 17:07:23 +11:00
|
|
|
add_definitions(-DWITH_VULKAN_BACKEND)
|
2022-11-23 14:42:11 +01:00
|
|
|
endif()
|
|
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
set(GLSL_SRC
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_shader_shared.hh
|
2022-01-17 14:45:22 +01:00
|
|
|
|
2025-09-25 10:57:02 +02:00
|
|
|
shaders/infos/gpu_clip_planes_infos.hh
|
|
|
|
|
shaders/infos/gpu_index_load_infos.hh
|
|
|
|
|
shaders/infos/gpu_interface_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_area_borders_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_checker_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_diag_stripes_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_desaturate_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_overlays_merge_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_overlays_stereo_merge_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_rect_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_image_shuffle_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_node_socket_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_nodelink_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_point_varying_size_varying_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_2D_widget_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_depth_only_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_flat_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_image_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_point_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_polyline_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_smooth_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_3D_uniform_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_fullscreen_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_gpencil_stroke_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_icon_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_index_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_keyframe_shape_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_line_dashed_uniform_color_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_print_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_sequencer_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_simple_lighting_infos.hh
|
|
|
|
|
shaders/infos/gpu_shader_text_infos.hh
|
|
|
|
|
shaders/infos/gpu_srgb_to_framebuffer_space_infos.hh
|
|
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_depth_only_frag.glsl
|
|
|
|
|
shaders/gpu_shader_uniform_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_checker_frag.glsl
|
|
|
|
|
shaders/gpu_shader_diag_stripes_frag.glsl
|
|
|
|
|
shaders/gpu_shader_simple_lighting_frag.glsl
|
|
|
|
|
shaders/gpu_shader_flat_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_area_borders_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_area_borders_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_widget_base_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_widget_base_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_widget_shadow_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_widget_shadow_frag.glsl
|
2024-11-23 16:42:38 +01:00
|
|
|
shaders/gpu_shader_2D_node_socket_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_node_socket_vert.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_2D_nodelink_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_nodelink_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_line_dashed_frag.glsl
|
|
|
|
|
shaders/gpu_shader_2D_image_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_image_rect_vert.glsl
|
2023-02-26 13:23:40 +01:00
|
|
|
shaders/gpu_shader_icon_multi_vert.glsl
|
2022-10-20 16:37:07 +02:00
|
|
|
shaders/gpu_shader_icon_frag.glsl
|
|
|
|
|
shaders/gpu_shader_icon_vert.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_image_frag.glsl
|
|
|
|
|
shaders/gpu_shader_image_desaturate_frag.glsl
|
|
|
|
|
shaders/gpu_shader_image_overlays_merge_frag.glsl
|
|
|
|
|
shaders/gpu_shader_image_overlays_stereo_merge_frag.glsl
|
|
|
|
|
shaders/gpu_shader_image_shuffle_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_image_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_3D_image_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_normal_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_flat_color_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_line_dashed_uniform_color_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_polyline_frag.glsl
|
|
|
|
|
shaders/gpu_shader_3D_polyline_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_smooth_color_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_smooth_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_3D_clipped_uniform_color_vert.glsl
|
|
|
|
|
|
|
|
|
|
shaders/gpu_shader_point_uniform_color_aa_frag.glsl
|
|
|
|
|
shaders/gpu_shader_point_uniform_color_outline_aa_frag.glsl
|
|
|
|
|
shaders/gpu_shader_point_varying_color_frag.glsl
|
|
|
|
|
shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl
|
|
|
|
|
shaders/gpu_shader_3D_point_uniform_size_aa_vert.glsl
|
2025-05-29 14:36:32 +02:00
|
|
|
shaders/gpu_shader_3D_point_flat_color_vert.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_point_uniform_size_aa_vert.glsl
|
|
|
|
|
shaders/gpu_shader_2D_point_uniform_size_outline_aa_vert.glsl
|
|
|
|
|
|
|
|
|
|
shaders/gpu_shader_text_vert.glsl
|
|
|
|
|
shaders/gpu_shader_text_frag.glsl
|
|
|
|
|
shaders/gpu_shader_keyframe_shape_vert.glsl
|
|
|
|
|
shaders/gpu_shader_keyframe_shape_frag.glsl
|
|
|
|
|
|
VSE: Do Scopes on the GPU, improve their look, HDR for waveform/parade
Faster and better looking VSE scopes & "show overexposed". Waveform &
RGB Parade now can also show HDR color intensities. (Note: this is
only about VSE scopes; Image Space scopes are to be improved separately)
- Waveform, RGB Parade, Vectorscope scopes are done on the GPU now, by
drawing points for each input pixel, and placing them according to
scope logic. The point drawing is implemented in a compute shader,
with a fragment shader resolve pass; this is because drawing lots of
points in the same location is very slow on some GPUs (e.g. Apple).
The compute shader rasterizer is several times faster on regular
desktop GPU as well.
- If a non-default color management is needed (e.g. VSE colorspace is
not the same as display colorspace, or a custom look transform is used
etc. etc.), then transform the VSE preview texture into display space
RGBA 16F texture using OCIO GPU machinery, and calculate scopes
from that.
- The "show overexposed" (zebra) preview option is also done on the
GPU now.
- Waveform/Parade scopes unlock zoom X/Y aspect for viewing HDR scope,
similar to how it was done for HDR histograms recently.
- Added SEQ_preview_cache.hh that holds GPU textures of VSE preview,
this is so that when you have a preview and several scopes, each of
them does not have to create/upload their own GPU texture (that would
both waste memory, and be slow).
Screenshots and performance details in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/144867
2025-08-26 12:25:43 +02:00
|
|
|
shaders/gpu_shader_sequencer_scope_comp.glsl
|
|
|
|
|
shaders/gpu_shader_sequencer_scope_frag.glsl
|
2024-06-04 20:05:35 +02:00
|
|
|
shaders/gpu_shader_sequencer_strips_vert.glsl
|
|
|
|
|
shaders/gpu_shader_sequencer_strips_frag.glsl
|
VSE: Faster timeline thumbnail drawing
VSE timeline, when many (hundreds/thousands) of thumbnails were visible, was
very slow to redraw. This PR makes them 3-10x faster to redraw, by stopping
doing things that are slow :) Part of #126087 thumbnail improvements task.
- No longer do mute semitransparency or corner rounding on the CPU, do it in
shader instead.
- Stop creating a separate GPU texture for each thumbnail, on every repaint,
and drawing each thumbnail as a separate draw call. Instead, put thumbnails
into a single texture atlas (using a simple shelf packing algorithm), and
draw them in batch, passing data via UBO. The atlas is still re-created every
frame, but that does not seem to be a performance issue. Thumbnails are
cropped horizontally based on how much of their parts are visible (e.g. a
narrow strip on screen), so realistically the atlas size is kinda
proportional to screen size, and ends up being just several megabytes of data
transfer between CPU -> GPU each frame.
On this Sprite Fright edit timeline view (612 visible thumbnails), time taken
to repaint the timeline window:
- Mac (M1 Max, Metal): 68.1ms -> 4.7ms
- Windows (Ryzen 5950X, RTX 3080Ti, OpenGL): 23.7ms -> 6.8ms
This also fixes a visual issue with thumbnails, where when strips are very
tall, the "rounded corners" that were poked right into the thumbnail bitmap
on the CPU were showing up due to actual bitmap being scaled up a lot.
Pull Request: https://projects.blender.org/blender/blender/pulls/126972
2024-09-03 08:25:15 +02:00
|
|
|
shaders/gpu_shader_sequencer_thumbs_vert.glsl
|
|
|
|
|
shaders/gpu_shader_sequencer_thumbs_frag.glsl
|
VSE: Do Scopes on the GPU, improve their look, HDR for waveform/parade
Faster and better looking VSE scopes & "show overexposed". Waveform &
RGB Parade now can also show HDR color intensities. (Note: this is
only about VSE scopes; Image Space scopes are to be improved separately)
- Waveform, RGB Parade, Vectorscope scopes are done on the GPU now, by
drawing points for each input pixel, and placing them according to
scope logic. The point drawing is implemented in a compute shader,
with a fragment shader resolve pass; this is because drawing lots of
points in the same location is very slow on some GPUs (e.g. Apple).
The compute shader rasterizer is several times faster on regular
desktop GPU as well.
- If a non-default color management is needed (e.g. VSE colorspace is
not the same as display colorspace, or a custom look transform is used
etc. etc.), then transform the VSE preview texture into display space
RGBA 16F texture using OCIO GPU machinery, and calculate scopes
from that.
- The "show overexposed" (zebra) preview option is also done on the
GPU now.
- Waveform/Parade scopes unlock zoom X/Y aspect for viewing HDR scope,
similar to how it was done for HDR histograms recently.
- Added SEQ_preview_cache.hh that holds GPU textures of VSE preview,
this is so that when you have a preview and several scopes, each of
them does not have to create/upload their own GPU texture (that would
both waste memory, and be slow).
Screenshots and performance details in the PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/144867
2025-08-26 12:25:43 +02:00
|
|
|
shaders/gpu_shader_sequencer_zebra_frag.glsl
|
2024-06-04 20:05:35 +02:00
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_codegen_lib.glsl
|
|
|
|
|
|
2024-08-03 11:06:17 +02:00
|
|
|
shaders/common/gpu_shader_attribute_load_lib.glsl
|
2023-03-07 18:02:20 +01:00
|
|
|
shaders/common/gpu_shader_bicubic_sampler_lib.glsl
|
2022-05-06 12:58:14 +02:00
|
|
|
shaders/common/gpu_shader_common_color_ramp.glsl
|
|
|
|
|
shaders/common/gpu_shader_common_color_utils.glsl
|
2022-05-06 13:33:23 +02:00
|
|
|
shaders/common/gpu_shader_common_curves.glsl
|
2022-05-06 12:58:14 +02:00
|
|
|
shaders/common/gpu_shader_common_hash.glsl
|
|
|
|
|
shaders/common/gpu_shader_common_math_utils.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_common_math.glsl
|
2022-05-06 12:58:14 +02:00
|
|
|
shaders/common/gpu_shader_common_mix_rgb.glsl
|
2023-10-13 17:59:46 +02:00
|
|
|
shaders/common/gpu_shader_debug_gradients_lib.glsl
|
2025-04-16 20:08:28 +02:00
|
|
|
shaders/common/gpu_shader_fullscreen_vert.glsl
|
2024-08-03 11:06:17 +02:00
|
|
|
shaders/common/gpu_shader_index_load_lib.glsl
|
2025-08-27 09:49:43 +02:00
|
|
|
shaders/common/gpu_shader_index_range_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_angle_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_axis_angle_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_math_base_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_constants_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_euler_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_math_fast_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_matrix_adjoint_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_compare_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_construct_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_conversion_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_interpolate_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_math_matrix_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_matrix_normalize_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_projection_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_matrix_transform_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_quaternion_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_rotation_conversion_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_math_rotation_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_safe_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_vector_compare_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_math_vector_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_math_vector_reduce_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_math_vector_safe_lib.glsl
|
2025-08-27 09:49:43 +02:00
|
|
|
shaders/common/gpu_shader_offset_indices_lib.glsl
|
2024-07-19 15:48:00 +02:00
|
|
|
shaders/common/gpu_shader_print_lib.glsl
|
2025-09-15 12:07:26 +02:00
|
|
|
shaders/common/gpu_shader_ray_utils_lib.glsl
|
2025-09-23 17:21:56 +02:00
|
|
|
shaders/common/gpu_shader_ray_lib.glsl
|
VSE: Faster timeline thumbnail drawing
VSE timeline, when many (hundreds/thousands) of thumbnails were visible, was
very slow to redraw. This PR makes them 3-10x faster to redraw, by stopping
doing things that are slow :) Part of #126087 thumbnail improvements task.
- No longer do mute semitransparency or corner rounding on the CPU, do it in
shader instead.
- Stop creating a separate GPU texture for each thumbnail, on every repaint,
and drawing each thumbnail as a separate draw call. Instead, put thumbnails
into a single texture atlas (using a simple shelf packing algorithm), and
draw them in batch, passing data via UBO. The atlas is still re-created every
frame, but that does not seem to be a performance issue. Thumbnails are
cropped horizontally based on how much of their parts are visible (e.g. a
narrow strip on screen), so realistically the atlas size is kinda
proportional to screen size, and ends up being just several megabytes of data
transfer between CPU -> GPU each frame.
On this Sprite Fright edit timeline view (612 visible thumbnails), time taken
to repaint the timeline window:
- Mac (M1 Max, Metal): 68.1ms -> 4.7ms
- Windows (Ryzen 5950X, RTX 3080Ti, OpenGL): 23.7ms -> 6.8ms
This also fixes a visual issue with thumbnails, where when strips are very
tall, the "rounded corners" that were poked right into the thumbnail bitmap
on the CPU were showing up due to actual bitmap being scaled up a lot.
Pull Request: https://projects.blender.org/blender/blender/pulls/126972
2024-09-03 08:25:15 +02:00
|
|
|
shaders/common/gpu_shader_sequencer_lib.glsl
|
2024-05-30 19:59:18 +02:00
|
|
|
shaders/common/gpu_shader_shared_exponent_lib.glsl
|
2023-03-26 16:59:13 +02:00
|
|
|
shaders/common/gpu_shader_smaa_lib.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
shaders/common/gpu_shader_test_lib.glsl
|
|
|
|
|
shaders/common/gpu_shader_utildefines_lib.glsl
|
2022-05-06 12:58:14 +02:00
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_add_shader.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_ambient_occlusion.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_attribute.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_background.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_bevel.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_wavelength.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_blackbody.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_bright_contrast.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_bump.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_camera.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_clamp.glsl
|
Nodes: Add general Combine/Separate Color nodes
Inspired by D12936 and D12929, this patch adds general purpose
"Combine Color" and "Separate Color" nodes to Geometry, Compositor,
Shader and Texture nodes.
- Within Geometry Nodes, it replaces the existing "Combine RGB" and
"Separate RGB" nodes.
- Within Compositor Nodes, it replaces the existing
"Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA"
nodes.
- Within Texture Nodes, it replaces the existing "Combine RGBA" and
"Separate RGBA" nodes.
- Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and
"Separate RGB/HSV" nodes.
Python addons have not been updated to the new nodes yet.
**New shader code**
In node_color.h, color.h and gpu_shader_material_color_util.glsl,
missing methods hsl_to_rgb and rgb_to_hsl are added by directly
converting existing C code. They always produce the same result.
**Old code**
As requested by T96219, old nodes still exist but are not displayed in
the add menu. This means Python scripts can still create them as usual.
Otherwise, versioning replaces the old nodes with the new nodes when
opening .blend files.
Differential Revision: https://developer.blender.org/D14034
2022-05-04 18:44:03 +02:00
|
|
|
shaders/material/gpu_shader_material_combine_color.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_combine_xyz.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_diffuse.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_displacement.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_eevee_specular.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_emission.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_fractal_noise.glsl
|
2023-06-13 09:18:12 +02:00
|
|
|
shaders/material/gpu_shader_material_fractal_voronoi.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_fresnel.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_gamma.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_geometry.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_glass.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_glossy.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_hair_info.glsl
|
2022-04-14 18:47:58 +02:00
|
|
|
shaders/material/gpu_shader_material_hair.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_holdout.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_hue_sat_val.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_invert.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_layer_weight.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_light_falloff.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_light_path.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_mapping.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_map_range.glsl
|
2024-08-27 17:20:46 +02:00
|
|
|
shaders/material/gpu_shader_material_metallic.glsl
|
2022-08-30 11:05:46 +01:00
|
|
|
shaders/material/gpu_shader_material_mix_color.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_mix_shader.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_noise.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_normal.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_normal_map.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_object_info.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_output_aov.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_output_material.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_output_world.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_particle_info.glsl
|
2022-01-25 13:25:33 +01:00
|
|
|
shaders/material/gpu_shader_material_point_info.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_principled.glsl
|
2024-04-29 12:37:51 +02:00
|
|
|
shaders/material/gpu_shader_material_ray_portal.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_refraction.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_rgb_to_bw.glsl
|
2025-09-22 16:02:37 +02:00
|
|
|
shaders/material/gpu_shader_material_radial_tiling.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_radial_tiling_shared.glsl
|
Nodes: Add general Combine/Separate Color nodes
Inspired by D12936 and D12929, this patch adds general purpose
"Combine Color" and "Separate Color" nodes to Geometry, Compositor,
Shader and Texture nodes.
- Within Geometry Nodes, it replaces the existing "Combine RGB" and
"Separate RGB" nodes.
- Within Compositor Nodes, it replaces the existing
"Combine RGBA/HSVA/YCbCrA/YUVA" and "Separate RGBA/HSVA/YCbCrA/YUVA"
nodes.
- Within Texture Nodes, it replaces the existing "Combine RGBA" and
"Separate RGBA" nodes.
- Within Shader Nodes, it replaces the existing "Combine RGB/HSV" and
"Separate RGB/HSV" nodes.
Python addons have not been updated to the new nodes yet.
**New shader code**
In node_color.h, color.h and gpu_shader_material_color_util.glsl,
missing methods hsl_to_rgb and rgb_to_hsl are added by directly
converting existing C code. They always produce the same result.
**Old code**
As requested by T96219, old nodes still exist but are not displayed in
the add menu. This means Python scripts can still create them as usual.
Otherwise, versioning replaces the old nodes with the new nodes when
opening .blend files.
Differential Revision: https://developer.blender.org/D14034
2022-05-04 18:44:03 +02:00
|
|
|
shaders/material/gpu_shader_material_separate_color.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_separate_xyz.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_set.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_shader_to_rgba.glsl
|
2023-07-24 15:36:36 +02:00
|
|
|
shaders/material/gpu_shader_material_sheen.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_squeeze.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_subsurface_scattering.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tangent.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_brick.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_checker.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_environment.glsl
|
Nodes: Implement Gabor noise
This patch implements a new Gabor noise node based on [1] but with the
improvements from [2] and the phasor formulation from [3].
We compare with the most popular existing implementation, that of OSL,
from the user's point of view:
- This implementation produces C1 continuous noise as opposed to the
non continuous OSL implementation, so it can be used for bump
mapping and is generally smother. This is achieved by windowing the
Gabor kernel using a Hann window.
- The Bandwidth input of OSL was hard-coded to 1 and was replaced with
a frequency input, which OSL hard codes to 2, since frequency is
more natural to control. This is even more true now that that Gabor
kernel is windowed as opposed to truncated, which means increasing
the bandwidth will just turn the Gaussian component of the Gabor
into a Hann window. While decreasing the bandwidth will eliminate
the harmonic from the Gabor kernel, which is the point of Gabor
noise.
- OSL had three discrete modes of operation for orienting the kernel.
Anisotropic, Isotropic, and a hybrid mode. While this implementation
provides a continuous Anisotropy parameter which users are already
familiar with from the Glossy BSDF node.
- This implementation provides not just the Gabor noise value, but
also its phase and intensity components. The Gabor noise value is
basically sin(phase) * intensity, but the phase is arguably more
useful since it does not suffer from the low contrast issues that
Gabor suffers from. While the intensity is useful to hide the
singularities in the phase.
- This implementation converges faster that OSL's relative to the
impulse count, so we fix the impulses count to 8 for simplicitly.
- This implementation does not implement anisotropic filtering.
Future improvements to the node includes implementing surface noise and
filtering. As well as extending the spectral control of the noise,
either by providing specialized kernels as was done in #110802, or by
providing some more procedural control over the frequencies of the
Gabor.
References:
[1]: Lagae, Ares, et al. "Procedural noise using sparse Gabor
convolution." ACM Transactions on Graphics (TOG) 28.3 (2009): 1-10.
[2]: Tavernier, Vincent, et al. "Making gabor noise fast and
normalized." Eurographics 2019-40th Annual Conference of the European
Association for Computer Graphics. 2019.
[3]: Tricard, Thibault, et al. "Procedural phasor noise." ACM
Transactions on Graphics (TOG) 38.4 (2019): 1-13.
Pull Request: https://projects.blender.org/blender/blender/pulls/121820
2024-06-19 09:33:32 +02:00
|
|
|
shaders/material/gpu_shader_material_tex_gabor.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_tex_gradient.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_image.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_magic.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_noise.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_sky.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_texture_coordinates.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_voronoi.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_wave.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_tex_white_noise.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_toon.glsl
|
2022-05-06 12:58:14 +02:00
|
|
|
shaders/material/gpu_shader_material_transform_utils.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_translucent.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_transparent.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_uv_map.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_vector_displacement.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_vector_math.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_vector_rotate.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_vertex_color.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_volume_absorption.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_volume_principled.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_volume_scatter.glsl
|
2025-05-08 19:19:35 +02:00
|
|
|
shaders/material/gpu_shader_material_volume_coefficients.glsl
|
2023-06-13 09:18:12 +02:00
|
|
|
shaders/material/gpu_shader_material_voronoi.glsl
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/material/gpu_shader_material_wireframe.glsl
|
|
|
|
|
shaders/material/gpu_shader_material_world_normals.glsl
|
|
|
|
|
|
|
|
|
|
shaders/gpu_shader_gpencil_stroke_vert.glsl
|
|
|
|
|
shaders/gpu_shader_gpencil_stroke_frag.glsl
|
|
|
|
|
|
2023-02-23 14:25:08 +01:00
|
|
|
shaders/gpu_shader_display_fallback_vert.glsl
|
|
|
|
|
shaders/gpu_shader_display_fallback_frag.glsl
|
|
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
shaders/gpu_shader_cfg_world_clip_lib.glsl
|
|
|
|
|
shaders/gpu_shader_colorspace_lib.glsl
|
|
|
|
|
|
2024-02-25 17:22:58 +01:00
|
|
|
shaders/gpu_shader_index_2d_array_points.glsl
|
|
|
|
|
shaders/gpu_shader_index_2d_array_lines.glsl
|
|
|
|
|
shaders/gpu_shader_index_2d_array_tris.glsl
|
2023-01-06 22:22:11 +01:00
|
|
|
|
2025-09-15 17:22:19 +02:00
|
|
|
shaders/gpu_shader_compat_glsl.glsl
|
|
|
|
|
|
|
|
|
|
shaders/gpu_shader_glsl_extension.glsl
|
|
|
|
|
|
2024-03-23 01:24:18 +01:00
|
|
|
GPU_shader_shared_utils.hh
|
2022-01-17 14:45:22 +01:00
|
|
|
)
|
|
|
|
|
|
2023-01-30 15:43:49 +01:00
|
|
|
set(GLSL_SRC_TEST
|
2025-09-25 10:57:02 +02:00
|
|
|
shaders/infos/gpu_shader_test_infos.hh
|
|
|
|
|
|
2023-01-30 15:43:49 +01:00
|
|
|
tests/shaders/gpu_math_test.glsl
|
2023-05-30 13:54:51 +02:00
|
|
|
tests/shaders/gpu_buffer_texture_test.glsl
|
2023-01-30 15:43:49 +01:00
|
|
|
tests/shaders/gpu_compute_1d_test.glsl
|
|
|
|
|
tests/shaders/gpu_compute_2d_test.glsl
|
|
|
|
|
tests/shaders/gpu_compute_ibo_test.glsl
|
2023-02-21 15:03:12 +01:00
|
|
|
tests/shaders/gpu_compute_ssbo_test.glsl
|
2023-01-30 15:43:49 +01:00
|
|
|
tests/shaders/gpu_compute_vbo_test.glsl
|
2023-01-30 19:07:33 +01:00
|
|
|
tests/shaders/gpu_compute_dummy_test.glsl
|
2023-12-28 05:34:38 +01:00
|
|
|
tests/shaders/gpu_specialization_test.glsl
|
2023-08-08 17:12:49 +02:00
|
|
|
tests/shaders/gpu_framebuffer_layer_viewport_test.glsl
|
2023-09-06 14:39:38 +02:00
|
|
|
tests/shaders/gpu_framebuffer_subpass_input_test.glsl
|
2023-03-06 12:28:55 +01:00
|
|
|
tests/shaders/gpu_push_constants_test.glsl
|
2023-01-30 15:43:49 +01:00
|
|
|
)
|
|
|
|
|
|
2022-09-01 22:22:32 +02:00
|
|
|
set(MTL_BACKEND_GLSL_SRC
|
2025-09-25 10:57:02 +02:00
|
|
|
metal/kernels/depth_2d_update_infos.hh
|
|
|
|
|
metal/kernels/gpu_shader_fullscreen_blit_infos.hh
|
|
|
|
|
|
2022-09-01 22:22:32 +02:00
|
|
|
metal/kernels/depth_2d_update_float_frag.glsl
|
|
|
|
|
metal/kernels/depth_2d_update_int24_frag.glsl
|
|
|
|
|
metal/kernels/depth_2d_update_int32_frag.glsl
|
|
|
|
|
metal/kernels/depth_2d_update_vert.glsl
|
|
|
|
|
metal/kernels/gpu_shader_fullscreen_blit_vert.glsl
|
|
|
|
|
metal/kernels/gpu_shader_fullscreen_blit_frag.glsl
|
2025-09-15 17:22:19 +02:00
|
|
|
|
|
|
|
|
shaders/gpu_shader_msl_atomic.msl
|
|
|
|
|
shaders/gpu_shader_msl_attribute.msl
|
|
|
|
|
shaders/gpu_shader_msl_builtin.msl
|
|
|
|
|
shaders/gpu_shader_msl_image.msl
|
|
|
|
|
shaders/gpu_shader_msl_matrix_legacy.msl
|
|
|
|
|
shaders/gpu_shader_msl_matrix.msl
|
|
|
|
|
shaders/gpu_shader_msl_sampler.msl
|
|
|
|
|
shaders/gpu_shader_msl_types_legacy.msl
|
|
|
|
|
shaders/gpu_shader_msl_defines.msl
|
|
|
|
|
shaders/gpu_shader_compat_msl.msl
|
2022-09-01 22:22:32 +02:00
|
|
|
)
|
2022-01-17 14:45:22 +01:00
|
|
|
|
2022-09-01 22:22:32 +02:00
|
|
|
set(MSL_SRC
|
2025-04-17 01:04:16 +02:00
|
|
|
metal/mtl_shader_shared.hh
|
|
|
|
|
|
|
|
|
|
metal/kernels/compute_texture_update.msl
|
|
|
|
|
metal/kernels/compute_texture_read.msl
|
2022-09-01 22:22:32 +02:00
|
|
|
)
|
2022-04-27 12:34:57 +02:00
|
|
|
|
2025-08-22 10:11:55 +02:00
|
|
|
set(VULKAN_BACKEND_GLSL_SRC
|
2025-09-25 10:57:02 +02:00
|
|
|
vulkan/shaders/vk_backbuffer_blit_infos.hh
|
|
|
|
|
|
2025-08-22 10:11:55 +02:00
|
|
|
vulkan/shaders/vk_backbuffer_blit_comp.glsl
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-30 15:43:49 +01:00
|
|
|
if(WITH_GTESTS)
|
2024-12-17 13:28:21 +01:00
|
|
|
if(WITH_GPU_BACKEND_TESTS)
|
2023-01-30 15:43:49 +01:00
|
|
|
list(APPEND GLSL_SRC ${GLSL_SRC_TEST})
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
2022-04-27 12:34:57 +02:00
|
|
|
if(WITH_METAL_BACKEND)
|
2022-09-01 22:22:32 +02:00
|
|
|
list(APPEND GLSL_SRC ${MTL_BACKEND_GLSL_SRC})
|
|
|
|
|
|
2022-04-27 12:34:57 +02:00
|
|
|
set(MSL_C)
|
|
|
|
|
foreach(MSL_FILE ${MSL_SRC})
|
2024-10-16 08:59:36 +02:00
|
|
|
data_to_c_simple(${MSL_FILE} MSL_C)
|
2022-04-27 12:34:57 +02:00
|
|
|
endforeach()
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-08-22 10:11:55 +02:00
|
|
|
if(WITH_VULKAN_BACKEND)
|
|
|
|
|
list(APPEND GLSL_SRC ${VULKAN_BACKEND_GLSL_SRC})
|
|
|
|
|
endif()
|
|
|
|
|
|
2022-09-01 22:22:32 +02:00
|
|
|
set(GLSL_C)
|
|
|
|
|
foreach(GLSL_FILE ${GLSL_SRC})
|
2024-10-04 11:33:21 +02:00
|
|
|
glsl_to_c(${GLSL_FILE} GLSL_C)
|
2025-08-27 09:49:43 +02:00
|
|
|
endforeach()
|
|
|
|
|
|
2022-09-01 22:22:32 +02:00
|
|
|
set(SHADER_C)
|
|
|
|
|
list(APPEND SHADER_C ${GLSL_C})
|
|
|
|
|
if(WITH_METAL_BACKEND)
|
|
|
|
|
list(APPEND SHADER_C ${MSL_C})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
blender_add_lib(bf_gpu_shaders "${SHADER_C}" "" "" "")
|
2025-05-02 18:33:44 +02:00
|
|
|
blender_set_target_unity_build(bf_gpu_shaders 10)
|
2022-01-17 14:45:22 +01:00
|
|
|
|
|
|
|
|
list(APPEND LIB
|
|
|
|
|
bf_gpu_shaders
|
|
|
|
|
)
|
2019-05-31 01:45:41 +02:00
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
set(GLSL_SOURCE_CONTENT "")
|
2025-04-29 15:32:36 +02:00
|
|
|
set(GLSL_METADATA_CONTENT "")
|
2025-09-25 10:57:02 +02:00
|
|
|
set(GLSL_INFOS_CONTENT "")
|
2022-01-17 14:45:22 +01:00
|
|
|
foreach(GLSL_FILE ${GLSL_SRC})
|
|
|
|
|
get_filename_component(GLSL_FILE_NAME ${GLSL_FILE} NAME)
|
|
|
|
|
string(REPLACE "." "_" GLSL_FILE_NAME_UNDERSCORES ${GLSL_FILE_NAME})
|
2025-04-29 15:32:36 +02:00
|
|
|
string(APPEND GLSL_SOURCE_CONTENT "SHADER_SOURCE\(${GLSL_FILE_NAME_UNDERSCORES}, \"${GLSL_FILE_NAME}\", \"${GLSL_FILE}\"\)\n")
|
|
|
|
|
string(APPEND GLSL_METADATA_CONTENT "#include \"${GLSL_FILE}.hh\"\n")
|
2025-09-25 10:57:02 +02:00
|
|
|
string(APPEND GLSL_INFOS_CONTENT "#include \"${GLSL_FILE}.info\"\n")
|
2022-01-17 14:45:22 +01:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
|
|
set(glsl_source_list_file "${CMAKE_CURRENT_BINARY_DIR}/glsl_gpu_source_list.h")
|
|
|
|
|
file(GENERATE OUTPUT ${glsl_source_list_file} CONTENT "${GLSL_SOURCE_CONTENT}")
|
|
|
|
|
list(APPEND SRC ${glsl_source_list_file})
|
2025-04-29 15:32:36 +02:00
|
|
|
set(glsl_metadata_list_file "${CMAKE_CURRENT_BINARY_DIR}/glsl_gpu_metadata_list.hh")
|
|
|
|
|
file(GENERATE OUTPUT ${glsl_metadata_list_file} CONTENT "${GLSL_METADATA_CONTENT}")
|
|
|
|
|
list(APPEND SRC ${glsl_metadata_list_file})
|
2025-09-25 10:57:02 +02:00
|
|
|
set(glsl_infos_list_file "${CMAKE_CURRENT_BINARY_DIR}/glsl_gpu_infos_list.hh")
|
|
|
|
|
file(GENERATE OUTPUT ${glsl_infos_list_file} CONTENT "${GLSL_INFOS_CONTENT}")
|
|
|
|
|
list(APPEND SRC ${glsl_infos_list_file})
|
2022-01-17 14:45:22 +01:00
|
|
|
list(APPEND INC ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
2019-12-16 15:50:14 +01:00
|
|
|
if(WITH_MOD_FLUID)
|
|
|
|
|
add_definitions(-DWITH_FLUID)
|
2011-07-13 18:40:21 +00:00
|
|
|
endif()
|
|
|
|
|
|
2025-02-27 15:42:08 +01:00
|
|
|
if(WITH_OPENSUBDIV)
|
|
|
|
|
add_definitions(-DWITH_OPENSUBDIV)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-12-17 13:28:21 +01:00
|
|
|
if(WITH_GPU_BACKEND_TESTS)
|
|
|
|
|
add_definitions(-DWITH_GPU_BACKEND_TESTS)
|
2024-11-09 19:09:49 +01:00
|
|
|
endif()
|
2024-07-10 23:02:17 +02:00
|
|
|
|
2024-12-16 09:58:42 +01:00
|
|
|
if(WITH_GTESTS)
|
|
|
|
|
add_definitions(-DWITH_GTESTS)
|
2024-11-26 22:39:13 +01:00
|
|
|
endif()
|
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
blender_add_lib(bf_gpu "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
2024-12-23 21:38:19 +01:00
|
|
|
add_library(bf::gpu ALIAS bf_gpu)
|
2022-01-17 14:45:22 +01:00
|
|
|
target_link_libraries(bf_gpu PUBLIC
|
2022-11-02 13:55:23 +02:00
|
|
|
bf_compositor_shaders
|
2022-01-17 14:45:22 +01:00
|
|
|
bf_draw_shaders
|
|
|
|
|
bf_gpu_shaders
|
Refactor: OpenColorIO integration
Briefly about this change:
- OpenColorIO C-API is removed.
- The information about color spaces in ImBuf module is removed.
It was stored in global ListBase in colormanagement.cc.
- Both OpenColorIO and fallback implementation supports GPU drawing.
- Fallback implementation supports white point, RGB curves, etc.
- Removed check for support of GPU drawing in IMB.
Historically it was implemented in a separate library with C-API, this
is because way back C++ code needed to stay in intern. This causes all
sort of overheads, and even calls that are strictly considered bad
level.
This change moves OpenColorIO integration into a module within imbuf,
next to movie, and next to IMB_colormanagement which is the main user
of it. This allows to avoid copy of color spaces, displays, views etc
in the ImBuf: they were used to help quickly querying information to
be shown on the interface. With this change it can be stored in the
same data structures as what is used by the OpenColorIO integration.
While it might not be fully avoiding duplication it is now less, and
there is no need in the user code to maintain the copies.
In a lot of cases this change also avoids allocations done per access
to the OpenColorIO. For example, it is not needed anymore to allocate
image descriptor in a heap.
The bigger user-visible change is that the fallback implementation now
supports GLSL drawing, with the whole list of supported features, such
as curve mapping and white point. This should help simplifying code
which relies on color space conversion on GPU: there is no need to
figure out fallback solution in such cases. The only case when drawing
will not work is when there is some actual bug, or driver issue, and
shader has failed to compile.
The change avoids having an opaque type for color space, and instead
uses forward declaration. It is a bit verbose on declaration, but helps
avoiding unsafe type-casts. There are ways to solve this in the future,
like having a header for forward declaration, or to flatten the name
space a bit.
There should be no user-level changes under normal operation.
When building without OpenColorIO or the configuration has a typo or
is missing a fuller set of color management tools is applies (such as the
white point correction).
Pull Request: https://projects.blender.org/blender/blender/pulls/138433
2025-05-09 14:01:43 +02:00
|
|
|
bf_imbuf_opencolorio_shaders
|
2022-01-17 14:45:22 +01:00
|
|
|
)
|
2020-09-08 11:31:47 +02:00
|
|
|
|
2025-08-08 15:23:42 +02:00
|
|
|
if(WITH_OPENGL_BACKEND AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2025-01-03 13:23:38 +11:00
|
|
|
target_link_libraries(bf_gpu PUBLIC rt)
|
2024-06-05 18:45:57 +02:00
|
|
|
endif()
|
|
|
|
|
|
2025-09-02 04:04:20 +00:00
|
|
|
# If `execinfo.h` exists on a *BSD system then also link in `libexecinfo`.
|
|
|
|
|
# Needed for `backtrace` / `backtrace_symbols` (GNU extensions)
|
|
|
|
|
# brought in by `blenlib/intern/system.cc`.
|
|
|
|
|
if(HAVE_EXECINFO_H AND CMAKE_SYSTEM_NAME MATCHES "FreeBSD|NetBSD|OpenBSD|DragonFly")
|
|
|
|
|
target_link_libraries(bf_gpu PUBLIC execinfo)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-03-10 07:31:59 +01:00
|
|
|
if(WITH_OPENSUBDIV)
|
|
|
|
|
target_link_libraries(bf_gpu PUBLIC bf_osd_shaders)
|
|
|
|
|
endif()
|
|
|
|
|
|
2023-03-23 16:37:52 +01:00
|
|
|
if(WITH_RENDERDOC)
|
|
|
|
|
target_link_libraries(bf_gpu PUBLIC bf_intern_renderdoc_dynload)
|
|
|
|
|
endif()
|
|
|
|
|
|
2022-02-17 17:03:23 +01:00
|
|
|
|
2021-04-24 01:54:30 +05:30
|
|
|
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
2021-04-09 13:07:21 +02:00
|
|
|
target_compile_options(bf_gpu PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-Wsuggest-override>)
|
|
|
|
|
endif()
|
|
|
|
|
|
2022-01-17 14:45:22 +01:00
|
|
|
|
2020-09-08 11:31:47 +02:00
|
|
|
if(WITH_GTESTS)
|
2023-11-24 13:27:41 +01:00
|
|
|
set(TEST_SRC)
|
|
|
|
|
set(TEST_INC)
|
2024-01-03 18:35:50 +01:00
|
|
|
set(TEST_LIB
|
|
|
|
|
bf_intern_ghost
|
|
|
|
|
bf_imbuf
|
|
|
|
|
bf_windowmanager
|
|
|
|
|
)
|
2023-11-24 13:27:41 +01:00
|
|
|
|
2024-12-17 13:28:21 +01:00
|
|
|
if(WITH_GPU_BACKEND_TESTS)
|
2023-11-24 13:27:41 +01:00
|
|
|
list(APPEND TEST_SRC
|
2023-05-30 13:54:51 +02:00
|
|
|
tests/buffer_texture_test.cc
|
2023-06-12 14:56:38 +02:00
|
|
|
tests/compute_test.cc
|
2023-03-28 11:51:32 +02:00
|
|
|
tests/framebuffer_test.cc
|
2023-05-11 09:15:39 +02:00
|
|
|
tests/immediate_test.cc
|
2023-03-13 11:12:05 +01:00
|
|
|
tests/index_buffer_test.cc
|
|
|
|
|
tests/push_constants_test.cc
|
2024-01-09 12:17:12 +11:00
|
|
|
tests/shader_create_info_test.cc
|
2025-05-05 10:53:42 +02:00
|
|
|
tests/shader_preprocess_test.cc
|
2025-06-14 15:57:33 +10:00
|
|
|
tests/shader_test.cc
|
2023-12-28 05:34:38 +01:00
|
|
|
tests/specialization_constants_test.cc
|
2023-05-11 09:15:39 +02:00
|
|
|
tests/state_blend_test.cc
|
2023-03-13 11:12:05 +01:00
|
|
|
tests/storage_buffer_test.cc
|
|
|
|
|
tests/texture_test.cc
|
2023-05-11 12:23:23 +02:00
|
|
|
tests/vertex_buffer_test.cc
|
2020-09-08 11:31:47 +02:00
|
|
|
)
|
2023-11-24 13:27:41 +01:00
|
|
|
endif()
|
2023-03-06 12:28:55 +01:00
|
|
|
|
2023-11-24 13:27:41 +01:00
|
|
|
if(WITH_VULKAN_BACKEND)
|
|
|
|
|
list(APPEND TEST_SRC
|
2024-04-18 12:47:23 +02:00
|
|
|
vulkan/tests/vk_data_conversion_test.cc
|
|
|
|
|
vulkan/tests/vk_memory_layout_test.cc
|
2024-04-19 10:46:50 +02:00
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_compute.cc
|
|
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_present.cc
|
2024-05-10 15:39:56 +02:00
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_render.cc
|
2024-06-13 09:37:17 +02:00
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_scheduler.cc
|
2024-05-06 09:20:57 +10:00
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_transfer.cc
|
2024-07-25 11:24:11 +10:00
|
|
|
|
|
|
|
|
vulkan/render_graph/tests/vk_render_graph_test_types.hh
|
2020-09-08 11:31:47 +02:00
|
|
|
)
|
2023-11-24 13:27:41 +01:00
|
|
|
endif()
|
|
|
|
|
|
2024-09-20 13:14:57 +10:00
|
|
|
# Enable shader validation on build-bot for Metal
|
2025-01-07 12:39:13 +01:00
|
|
|
if(WITH_METAL_BACKEND AND NOT WITH_GPU_DRAW_TESTS AND
|
|
|
|
|
NOT (WITH_GTESTS AND WITH_GPU_BACKEND_TESTS)) # Avoid duplicate source file
|
2023-12-12 10:14:13 +01:00
|
|
|
list(APPEND TEST_SRC
|
|
|
|
|
tests/shader_create_info_test.cc
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2025-01-24 11:00:34 +01:00
|
|
|
set(TEST_COMMON_SRC
|
|
|
|
|
tests/gpu_testing.cc
|
|
|
|
|
tests/gpu_testing.hh
|
|
|
|
|
)
|
2023-12-12 10:14:13 +01:00
|
|
|
|
2025-01-24 11:00:34 +01:00
|
|
|
blender_add_test_suite_lib(gpu
|
|
|
|
|
"${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}" "${TEST_COMMON_SRC}"
|
|
|
|
|
)
|
2020-09-08 11:31:47 +02:00
|
|
|
endif()
|