27 int size = matcap_diffuse->
x * matcap_diffuse->
y * 4;
30 buffer = combined_buffer.
begin();
37 int2(matcap_diffuse->
x, matcap_diffuse->
y),
48 float V[4][4],
R[4][4];
58 const float4x4 &world_shading_rotation)
63 light.direction =
float4(direction, 0.0f);
69 light.direction =
float4(1.0f, 0.0f, 0.0f, 0.0f);
70 light.specular_color =
float4(0.0f);
71 light.diffuse_color_wrap =
float4(0.0f);
80 const float total_samples_inv = 1.0f / total_samples;
83 for (
int x = 0; x < 64; x++) {
84 for (
int y = 0; y < 64; y++) {
91 bn =
clamp_f(bn, -0.499f, 0.499f);
92 jitter[
y][
x].z = bn * total_samples_inv;
115 if (
U.edit_studio_light) {
128 if (studio_light ==
nullptr) {
141 for (
int i = 0; i < 4; i++) {
146 if (studio_light !=
nullptr) {
@ STUDIOLIGHT_MATCAP_SPECULAR_GPUTEXTURE
@ STUDIOLIGHT_MATCAP_DIFFUSE_GPUTEXTURE
@ STUDIOLIGHT_TYPE_MATCAP
@ STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS
@ STUDIOLIGHT_TYPE_STUDIO
struct StudioLight * BKE_studiolight_find(const char *name, int flag)
void BKE_studiolight_ensure_flag(StudioLight *sl, int flag)
StudioLight * BKE_studiolight_studio_edit_get(void)
MINLINE float clamp_f(float value, float min, float max)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void axis_angle_to_mat4_single(float R[4][4], char axis, float angle)
MINLINE void negate_v3(float r[3])
MINLINE void swap_v3_v3(float a[3], float b[3])
@ V3D_SHADING_SPECULAR_HIGHLIGHT
@ V3D_SHADING_WORLD_ORIENTATION
@ V3D_SHADING_MATCAP_FLIP_X
@ GPU_TEXTURE_USAGE_SHADER_READ
Contains defines and structs used throughout the imbuf module.
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 Texture
void extend(Span< T > array)
bool ensure_1d_array(eGPUTextureFormat format, int extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_2d_array(eGPUTextureFormat format, int2 extent, int layers, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
bool ensure_2d(eGPUTextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
void init(const SceneState &scene_state, SceneResources &resources)
const float * DRW_viewport_invert_size_get()
const float * DRW_viewport_size_get()
bool DRW_state_is_image_render()
void DRW_view_viewmat_get(const DRWView *view, float mat[4][4], bool inverse)
RAYTRACE_GROUP_SIZE additional_info("eevee_shared", "eevee_gbuffer_data", "eevee_global_ubo", "eevee_sampling_data", "eevee_utility_texture", "eevee_hiz_data", "draw_view") .specialization_constant(Type RAYTRACE_GROUP_SIZE in_sh_0_tx in_sh_2_tx screen_normal_tx GPU_RGBA8
const float blue_noise[64][64][4]
T cos(const AngleRadianBase< T > &a)
T sin(const AngleRadianBase< T > &a)
VecBase< T, 3 > transform_direction(const MatBase< T, 3, 3 > &mat, const VecBase< T, 3 > &direction)
static bool get_matcap_tx(Texture &matcap_tx, StudioLight &studio_light)
static LightData get_light_data_from_studio_solidlight(const SolidLight *sl, const float4x4 &world_shading_rotation)
static float4x4 get_world_shading_rotation_matrix(float studiolight_rot_z)
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
ImBufFloatBuffer float_buffer
StudioLightImage matcap_specular
SolidLight light[STUDIOLIGHT_MAX_LIGHT]
StudioLightImage matcap_diffuse
float4 object_outline_color
static MatBase identity()
void init(const SceneState &scene_state)
static const int jitter_tx_size
UniformBuffer< WorldData > world_buf
void load_jitter_tx(int total_samples)
MaterialTexture missing_texture
Texture dummy_tile_array_tx
Texture dummy_tile_data_tx
UniformArrayBuffer< float4, 6 > clip_planes_buf
StringRefNull current_matcap
Vector< float4 > clip_planes
CCL_NAMESPACE_BEGIN struct Window V