|
Blender V4.3
|
#include <limits>#include <list>#include <sstream>#include <string.h>#include <vector>#include <OpenColorIO/OpenColorIO.h>#include "GPU_immediate.hh"#include "GPU_shader.hh"#include "GPU_uniform_buffer.hh"#include "gpu_shader_create_info.hh"#include "BLI_math_color.h"#include "BLI_math_color.hh"#include "BLI_math_matrix.hh"#include "MEM_guardedalloc.h"#include "ocio_impl.h"#include "ocio_shader_shared.hh"Go to the source code of this file.
Classes | |
| struct | OCIO_GPUShader |
| struct | OCIO_GPULutTexture |
| struct | OCIO_GPUUniform |
| struct | OCIO_GPUTextures |
| struct | OCIO_GPUCurveMappping |
| struct | OCIO_GPUDisplayShader |
Enumerations | |
| enum | OCIO_GPUTextureSlots { TEXTURE_SLOT_IMAGE = 0 , TEXTURE_SLOT_OVERLAY = 1 , TEXTURE_SLOT_CURVE_MAPPING = 2 , TEXTURE_SLOT_LUTS_OFFSET = 3 } |
| enum | OCIO_GPUUniformBufSlots { UNIFORMBUF_SLOT_DISPLAY = 0 , UNIFORMBUF_SLOT_CURVEMAP = 1 , UNIFORMBUF_SLOT_LUTS = 2 } |
Functions | |
Shader | |
| static void | string_replace_all (std::string &haystack, const std::string &needle, const std::string &other) |
| static bool | createGPUShader (OCIO_GPUShader &shader, OCIO_GPUTextures &textures, const GpuShaderDescRcPtr &shaderdesc_to_scene_linear, const GpuShaderDescRcPtr &shaderdesc_to_display, const bool use_curve_mapping) |
Textures | |
| static bool | addGPUUniform (OCIO_GPUTextures &textures, const GpuShaderDescRcPtr &shader_desc, int index) |
| static bool | addGPULut1D2D (OCIO_GPUTextures &textures, const GpuShaderDescRcPtr &shader_desc, int index) |
| static bool | addGPULut3D (OCIO_GPUTextures &textures, const GpuShaderDescRcPtr &shader_desc, int index) |
| static bool | createGPUTextures (OCIO_GPUTextures &textures, const GpuShaderDescRcPtr &shaderdesc_to_scene_linear, const GpuShaderDescRcPtr &shaderdesc_to_display) |
Curve Mapping | |
| static bool | createGPUCurveMapping (OCIO_GPUCurveMappping &curvemap, OCIO_CurveMappingSettings *curve_mapping_settings) |
| static void | updateGPUCurveMapping (OCIO_GPUCurveMappping &curvemap, OCIO_CurveMappingSettings *curve_mapping_settings) |
| static void | updateGPUDisplayParameters (OCIO_GPUShader &shader, float exponent, float4x4 scene_linear_matrix, float dither, bool use_predivide, bool use_overlay, bool use_hdr) |
OCIO GPU Shader Implementation | |
| static OCIO_GPUDisplayShader & | getGPUDisplayShader (OCIO_ConstConfigRcPtr *config, const char *input, const char *view, const char *display, const char *look, OCIO_CurveMappingSettings *curve_mapping_settings) |
Variables | |
| static const int | SHADER_CACHE_MAX_SIZE = 4 |
| std::list< OCIO_GPUDisplayShader > | SHADER_CACHE |
| enum OCIO_GPUTextureSlots |
| Enumerator | |
|---|---|
| TEXTURE_SLOT_IMAGE | |
| TEXTURE_SLOT_OVERLAY | |
| TEXTURE_SLOT_CURVE_MAPPING | |
| TEXTURE_SLOT_LUTS_OFFSET | |
Definition at line 43 of file ocio_impl_glsl.cc.
| Enumerator | |
|---|---|
| UNIFORMBUF_SLOT_DISPLAY | |
| UNIFORMBUF_SLOT_CURVEMAP | |
| UNIFORMBUF_SLOT_LUTS | |
Definition at line 50 of file ocio_impl_glsl.cc.
|
static |
Definition at line 346 of file ocio_impl_glsl.cc.
References GPU_R16F, GPU_RGB16F, GPU_SAMPLER_EXTEND_MODE_EXTEND, GPU_texture_create_1d(), GPU_texture_create_2d(), GPU_texture_extend_mode(), GPU_texture_filter_mode(), GPU_TEXTURE_USAGE_SHADER_READ, OCIO_GPUTextures::luts, OCIO_GPULutTexture::sampler_name, and OCIO_GPULutTexture::texture.
Referenced by createGPUTextures().
|
static |
Definition at line 405 of file ocio_impl_glsl.cc.
References GPU_RGB16F, GPU_SAMPLER_EXTEND_MODE_EXTEND, GPU_texture_create_3d(), GPU_texture_extend_mode(), GPU_texture_filter_mode(), GPU_TEXTURE_USAGE_SHADER_READ, OCIO_GPUTextures::luts, OCIO_GPULutTexture::sampler_name, and OCIO_GPULutTexture::texture.
Referenced by createGPUTextures().
|
static |
Definition at line 332 of file ocio_impl_glsl.cc.
References OCIO_GPUUniform::data, OCIO_GPUUniform::name, and OCIO_GPUTextures::uniforms.
Referenced by createGPUTextures().
|
static |
Definition at line 492 of file ocio_impl_glsl.cc.
References OCIO_GPUCurveMappping::buffer, GPU_RGBA16F, GPU_SAMPLER_EXTEND_MODE_EXTEND, GPU_texture_create_1d(), GPU_texture_extend_mode(), GPU_texture_filter_mode(), GPU_TEXTURE_USAGE_SHADER_READ, GPU_uniformbuf_create, OCIO_CurveMappingSettings::lut_size, and OCIO_GPUCurveMappping::texture.
Referenced by getGPUDisplayShader().
|
static |
Definition at line 166 of file ocio_impl_glsl.cc.
References blender::gpu::shader::ShaderCreateInfo::define(), float, blender::gpu::shader::ShaderCreateInfo::fragment_out(), blender::gpu::shader::ShaderCreateInfo::fragment_source(), blender::gpu::shader::ShaderCreateInfo::fragment_source_generated, free(), GPU_shader_create_from_info(), GPU_texture_dimensions(), GPU_uniformbuf_create_ex(), int, OCIO_GPUTextures::luts, blender::gpu::shader::ShaderCreateInfo::push_constant(), blender::gpu::shader::ShaderCreateInfo::sampler(), blender::gpu::shader::StageInterfaceInfo::smooth(), string_replace_all(), blender::StringRefBase::substr(), TEXTURE_SLOT_CURVE_MAPPING, TEXTURE_SLOT_IMAGE, TEXTURE_SLOT_LUTS_OFFSET, TEXTURE_SLOT_OVERLAY, blender::gpu::shader::ShaderCreateInfo::typedef_source(), blender::gpu::shader::ShaderCreateInfo::typedef_source_generated, blender::gpu::shader::ShaderCreateInfo::uniform_buf(), UNIFORMBUF_SLOT_CURVEMAP, UNIFORMBUF_SLOT_DISPLAY, UNIFORMBUF_SLOT_LUTS, OCIO_GPUTextures::uniforms, OCIO_GPUTextures::uniforms_buffer, blender::gpu::shader::ShaderCreateInfo::vertex_in(), blender::gpu::shader::ShaderCreateInfo::vertex_out(), and blender::gpu::shader::ShaderCreateInfo::vertex_source().
Referenced by getGPUDisplayShader().
|
static |
Definition at line 443 of file ocio_impl_glsl.cc.
References addGPULut1D2D(), addGPULut3D(), addGPUUniform(), OCIO_GPUTextures::dummy, GPU_texture_create_error(), OCIO_GPUTextures::luts, and OCIO_GPUTextures::uniforms.
Referenced by getGPUDisplayShader().
|
static |
Definition at line 610 of file ocio_impl_glsl.cc.
References createGPUCurveMapping(), createGPUShader(), createGPUTextures(), OCIO_GPUDisplayShader::curvemap, OCIO_GPUDisplayShader::display, OCIO_GPUDisplayShader::input, OCIO_GPUDisplayShader::look, OCIO_configGetProcessorWithNames(), OCIO_createDisplayProcessor(), OCIO_processorRelease(), OCIO_GPUDisplayShader::shader, SHADER_CACHE, SHADER_CACHE_MAX_SIZE, OCIO_GPUDisplayShader::textures, OCIO_GPUDisplayShader::use_curve_mapping, OCIO_GPUDisplayShader::valid, OCIO_GPUDisplayShader::view, and view.
|
static |
Definition at line 155 of file ocio_impl_glsl.cc.
Referenced by createGPUShader().
|
static |
Definition at line 513 of file ocio_impl_glsl.cc.
References OCIO_CurveMappingSettings::black, OCIO_GPUCurveMappping::buffer, OCIO_CurveMappingSettings::bwmul, OCIO_CurveMappingSettings::cache_id, OCIO_GPUCurveMappping::cache_id, data, OCIO_CurveMappingSettings::ext_in_x, OCIO_CurveMappingSettings::ext_in_y, OCIO_CurveMappingSettings::ext_out_x, OCIO_CurveMappingSettings::ext_out_y, OCIO_CurveMappingSettings::first_x, OCIO_CurveMappingSettings::first_y, GPU_DATA_FLOAT, GPU_texture_update_sub(), GPU_uniformbuf_update(), OCIO_CurveMappingSettings::last_x, OCIO_CurveMappingSettings::last_y, OCIO_CurveMappingSettings::lut, OCIO_CurveMappingSettings::lut_size, OCIO_CurveMappingSettings::mintable, OCIO_CurveMappingSettings::range, OCIO_GPUCurveMappingParameters::range, OCIO_GPUCurveMappping::texture, UNPACK3, and OCIO_CurveMappingSettings::use_extend_extrapolate.
|
static |
Definition at line 555 of file ocio_impl_glsl.cc.
References GPU_uniformbuf_create, GPU_uniformbuf_update(), and OCIO_GPUParameters::scene_linear_matrix.
| std::list<OCIO_GPUDisplayShader> SHADER_CACHE |
Definition at line 149 of file ocio_impl_glsl.cc.
Referenced by getGPUDisplayShader().
|
static |
Definition at line 148 of file ocio_impl_glsl.cc.
Referenced by getGPUDisplayShader().