34 int size = matcap_diffuse->
x * matcap_diffuse->
y * 4;
37 buffer = combined_buffer.
begin();
42 gpu::TextureFormat::SFLOAT_16_16_16_16,
44 int2(matcap_diffuse->
x, matcap_diffuse->
y),
64 const float4x4 &world_shading_rotation)
86 const float total_samples_inv = 1.0f / total_samples;
89 for (
int x = 0;
x < 64;
x++) {
90 for (
int y = 0;
y < 64;
y++) {
97 bn =
clamp_f(bn, -0.499f, 0.499f);
98 jitter[
y][
x].z = bn * total_samples_inv;
104 jitter_tx.ensure_2d(gpu::TextureFormat::SFLOAT_16_16_16_16,
123 if (
U.edit_studio_light) {
136 if (studio_light ==
nullptr) {
150 for (
int i = 0;
i < 4;
i++) {
155 if (studio_light !=
nullptr) {
167 cavity.init(scene_state, *
this);
187 missing_tx.ensure_2d(gpu::TextureFormat::UNORM_8_8_8_8,
190 float4(1.0f, 0.0f, 1.0f, 1.0f));
197 float4(0.0f, 0.0f, 0.0f, 0.0f));
202 float4(0.0f, 0.0f, 0.0f, 0.0f));
207 float4(0.0f, 0.0f, 0.0f, 0.0f));
@ 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
blender::gpu::Batch * GPU_batch_unit_cube() ATTR_WARN_UNUSED_RESULT
@ GPU_TEXTURE_USAGE_SHADER_READ
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void extend(Span< T > array)
const float4x4 & viewmat(int view_id=0) const
static View & default_get()
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
bool is_image_render() const
blender::float2 viewport_size_get() const
ImBufFloatBuffer float_buffer
float4 diffuse_color_wrap
StudioLightImage matcap_specular
SolidLight light[STUDIOLIGHT_MAX_LIGHT]
StudioLightImage matcap_diffuse
float object_outline_color[3]
static MatBase identity()
static const int jitter_tx_size
UniformBuffer< WorldData > world_buf
void load_jitter_tx(int total_samples)
MaterialTexture missing_texture
gpu::Batch * volume_cube_batch
Texture dummy_tile_array_tx
void init(const SceneState &scene_state, const DRWContext *ctx)
Texture dummy_tile_data_tx
UniformArrayBuffer< float4, 6 > clip_planes_buf
StringRefNull current_matcap
Vector< float4 > clip_planes
CCL_NAMESPACE_BEGIN struct Window V