17Material::Material() =
default;
22 packed_data = Material::pack_data(0.0f, 0.4f, 1.0f);
47bool Material::is_transparent()
49 uint32_t full_alpha_ref = 0x00ff0000;
50 return (
packed_data & full_alpha_ref) != full_alpha_ref;
56 roughness =
sqrtf(roughness);
60 return (packed_alpha << 16u) | (packed_roughness << 8u) | packed_metallic;
65 const ::bNode *node =
nullptr;
70 if (!node || !
image) {
ImageGPUTextures BKE_image_get_gpu_material_texture(Image *image, ImageUser *iuser, const bool use_tile_mapping)
#define SH_NODE_TEX_IMAGE
#define SH_NODE_TEX_ENVIRONMENT
#define BLI_assert_msg(a, msg)
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
BLI_INLINE float BLI_hash_int_01(unsigned int k)
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3])
@ IMA_ALPHA_CHANNEL_PACKED
@ SHD_IMAGE_EXTENSION_MIRROR
@ SHD_IMAGE_EXTENSION_CLIP
@ SHD_IMAGE_EXTENSION_REPEAT
@ SHD_IMAGE_EXTENSION_EXTEND
bool ED_object_get_active_image(Object *ob, int mat_nr, Image **r_ima, ImageUser **r_iuser, const bNode **r_node, const bNodeTree **r_ntree)
@ GPU_SAMPLER_EXTEND_MODE_MIRRORED_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_EXTEND_MODE_EXTEND
@ GPU_SAMPLER_EXTEND_MODE_CLAMP_TO_BORDER
@ GPU_SAMPLER_FILTERING_LINEAR
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 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
input_tx image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img") .compute_source("compositor_compute_preview.glsl") .do_static_compilation(true)
IMETHOD void random(Vector &a)
addDelta operator for displacement rotational velocity.
#define unit_float_to_uchar_clamp(val)
VecBase< float, 3 > float3
GPUSamplerState sampler_state
MaterialTexture()=default