19void Instance::antialiasing_init()
22 const int2 size(size_f[0], size_f[1]);
108void Instance::antialiasing_draw(
Manager &manager)
127 float w = -
logf((1.0f - a) * (1.0f + a));
132 p = p *
w + 3.43273939e-07f;
133 p = p *
w + -3.5233877e-06f;
134 p = p *
w + -4.39150654e-06f;
135 p = p *
w + 0.00021858087f;
136 p = p *
w + -0.00125372503f;
137 p = p *
w + -0.00417768164f;
138 p = p *
w + 0.246640727f;
139 p = p *
w + 1.50140941f;
143 p = -0.000200214257f;
144 p = p *
w + 0.000100950558f;
145 p = p *
w + 0.00134934322f;
146 p = p *
w + -0.00367342844f;
147 p = p *
w + 0.00573950773f;
148 p = p *
w + -0.0076224613f;
149 p = p *
w + 0.00943887047f;
150 p = p *
w + 1.00167406f;
151 p = p *
w + 2.83297682f;
158 if (sample_count < 2) {
164 uint primes[2] = {2, 3};
165 double ofs[2] = {0, 0};
171 const float2 rand_remap = rand * 2.0f - 1.0f;
173 const float2 rand_adjusted = rand_remap * 0.93f;
177 const float sigma = 0.284f;
179 return offset *
sqrt(sigma);
185 "This should only be called during render");
#define BLI_assert_msg(a, msg)
void BLI_halton_2d(const unsigned int prime[2], double offset[2], int n, double *r)
const unsigned char searchTexBytes[]
const unsigned char areaTexBytes[]
#define GPU_ATTACHMENT_TEXTURE(_texture)
#define GPU_ATTACHMENT_NONE
void GPU_framebuffer_bind(GPUFrameBuffer *fb)
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_SHADER_WRITE
@ GPU_TEXTURE_USAGE_HOST_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
void GPU_texture_filter_mode(GPUTexture *texture, bool use_filter)
void GPU_texture_update(GPUTexture *texture, eGPUDataFormat data_format, const void *data)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void ensure(GPUAttachment depth=GPU_ATTACHMENT_NONE, GPUAttachment color1=GPU_ATTACHMENT_NONE, GPUAttachment color2=GPU_ATTACHMENT_NONE, GPUAttachment color3=GPU_ATTACHMENT_NONE, GPUAttachment color4=GPU_ATTACHMENT_NONE, GPUAttachment color5=GPU_ATTACHMENT_NONE, GPUAttachment color6=GPU_ATTACHMENT_NONE, GPUAttachment color7=GPU_ATTACHMENT_NONE, GPUAttachment color8=GPU_ATTACHMENT_NONE)
void submit(PassSimple &pass, View &view)
void acquire(int2 extent, eGPUTextureFormat format, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL)
bool ensure_2d(eGPUTextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
void bind_texture(const char *name, GPUTexture *texture, GPUSamplerState state=sampler_auto)
void bind_image(const char *name, GPUTexture *image)
void clear_color(float4 color)
void state_set(DRWState state, int clip_plane_count=0)
void push_constant(const char *name, const float &data)
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceHandleRange handle={0}, uint custom_id=0)
void shader_set(GPUShader *shader)
static ShaderCache & get()
#define GPENCIL_ACCUM_FORMAT
static float erfinv_approx(const float x)
detail::Pass< command::DrawCommandBuf > PassSimple
T min(const T &a, const T &b)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
blender::float2 viewport_size_get() const
float smaa_threshold_render
struct SceneGpencil grease_pencil_settings
TextureFromPool smaa_edge_tx
PassSimple smaa_resolve_ps
Framebuffer smaa_weight_fb
PassSimple smaa_weight_ps
GPUFrameBuffer * scene_fb
const DRWContext * draw_ctx
static float2 antialiasing_sample_get(int sample_index, int sample_count)
TextureFromPool reveal_tx
TextureFromPool smaa_weight_tx
Framebuffer accumulation_fb
void antialiasing_accumulate(Manager &manager, float alpha)