25 #define HSV_SATURATION 0.5
54 alpha *= ob->
color[3];
75 data->packed_data = (packed_alpha << 16u) | (packed_roughness << 8u) | packed_metallic;
95 if (
node && *r_image) {
124 bool resource_changed =
false;
127 *r_mat_id =
id & 0xFFFu;
134 resource_changed =
true;
141 resource_changed =
true;
143 return resource_changed;
166 switch (color_type) {
181 if (r_transp && transp) {
220 if (resource_changed) {
224 if (r_transp && transp) {
struct GPUTexture * BKE_image_get_gpu_tiles(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
struct GPUTexture * BKE_image_get_gpu_texture(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
struct GPUTexture * BKE_image_get_gpu_tilemap(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
struct Material * BKE_object_material_get_eval(struct Object *ob, short act)
struct Material * BKE_material_default_empty(void)
#define SH_NODE_TEX_ENVIRONMENT
#define BLI_assert_msg(a, msg)
A dynamically sized string ADT.
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT
BLI_INLINE float BLI_hash_int_01(unsigned int k)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_fl(float r[3], float f)
void * BLI_memblock_elem_get(BLI_memblock *mblk, int chunk, int elem) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void * BLI_memblock_alloc(BLI_memblock *mblk) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define SHD_IMAGE_EXTENSION_CLIP
#define SHD_IMAGE_EXTENSION_REPEAT
#define SHD_INTERP_CLOSEST
@ V3D_SHADING_TEXTURE_COLOR
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_MATERIAL_COLOR
@ V3D_SHADING_OBJECT_COLOR
@ V3D_SHADING_RANDOM_COLOR
@ V3D_SHADING_SINGLE_COLOR
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
bool ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **r_ima, struct ImageUser **r_iuser, struct bNode **r_node, struct bNodeTree **r_ntree)
@ GPU_SAMPLER_CLAMP_BORDER
struct GPUTexture GPUTexture
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a producing a negative Combine Generate a color from its and blue Hue Saturation Apply a color transformation in the HSV color model Specular Similar to the Principled BSDF node but uses the specular workflow instead of metallic
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its hue
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block SH_NODE_TEX_IMAGE
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value)
void DRW_shgroup_uniform_texture(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
void DRW_shgroup_uniform_texture_ex(DRWShadingGroup *shgroup, const char *name, const GPUTexture *tex, eGPUSamplerState sampler_state)
uint32_t DRW_object_resource_id_get(Object *UNUSED(ob))
DRWShadingGroup * DRW_shgroup_create_sub(DRWShadingGroup *shgroup)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
static const pxr::TfToken roughness("roughness", pxr::TfToken::Immortal)
struct DRWShadingGroup * vcol_shgrp
struct DRWShadingGroup * image_tiled_shgrp
struct DRWShadingGroup * common_shgrp
struct GHash * material_hash
struct DRWShadingGroup * image_shgrp
struct GPUUniformBuf * material_ubo_curr
struct BLI_memblock * material_ubo_data
struct BLI_memblock * material_ubo
struct GPUTexture * dummy_image_tx
WORKBENCH_UBO_Material * material_ubo_data_curr
WORKBENCH_Prepass prepass[2][2][WORKBENCH_DATATYPE_MAX]
GPUUniformBuf * workbench_material_ubo_alloc(WORKBENCH_PrivateData *wpd)
BLI_INLINE void workbench_material_get_image(Object *ob, int mat_nr, Image **r_image, ImageUser **r_iuser, eGPUSamplerState *r_sampler)
DRWShadingGroup * workbench_image_setup_ex(WORKBENCH_PrivateData *wpd, Object *ob, int mat_nr, Image *ima, ImageUser *iuser, eGPUSamplerState sampler, eWORKBENCH_DataType datatype)
BLI_INLINE Material * workbench_object_material_get(Object *ob, int mat_nr)
void workbench_material_ubo_data(WORKBENCH_PrivateData *wpd, Object *ob, Material *mat, WORKBENCH_UBO_Material *data, eV3DShadingColorType color_type)
BLI_INLINE bool workbench_material_chunk_select(WORKBENCH_PrivateData *wpd, uint32_t id, uint32_t *r_mat_id)
DRWShadingGroup * workbench_material_setup_ex(WORKBENCH_PrivateData *wpd, Object *ob, int mat_nr, eV3DShadingColorType color_type, eWORKBENCH_DataType datatype, bool *r_transp)