19void Instance::antialiasing_init()
22 const int2 size(size_f[0], size_f[1]);
110void Instance::antialiasing_draw(
Manager &manager)
135 float w = -
logf((1.0f - a) * (1.0f + a));
140 p = p *
w + 3.43273939e-07f;
141 p = p *
w + -3.5233877e-06f;
142 p = p *
w + -4.39150654e-06f;
143 p = p *
w + 0.00021858087f;
144 p = p *
w + -0.00125372503f;
145 p = p *
w + -0.00417768164f;
146 p = p *
w + 0.246640727f;
147 p = p *
w + 1.50140941f;
151 p = -0.000200214257f;
152 p = p *
w + 0.000100950558f;
153 p = p *
w + 0.00134934322f;
154 p = p *
w + -0.00367342844f;
155 p = p *
w + 0.00573950773f;
156 p = p *
w + -0.0076224613f;
157 p = p *
w + 0.00943887047f;
158 p = p *
w + 1.00167406f;
159 p = p *
w + 2.83297682f;
166 if (sample_count < 2) {
172 uint primes[2] = {2, 3};
173 double ofs[2] = {0, 0};
179 const float2 rand_remap = rand * 2.0f - 1.0f;
181 const float2 rand_adjusted = rand_remap * 0.93f;
185 const float sigma = 0.284f;
187 return offset *
sqrt(sigma);
193 "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_clear(blender::gpu::FrameBuffer *fb, GPUFrameBufferBits buffers, const float clear_col[4], float clear_depth, unsigned int clear_stencil)
void GPU_framebuffer_bind(blender::gpu::FrameBuffer *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(blender::gpu::Texture *texture, bool use_filter)
void GPU_texture_update(blender::gpu::Texture *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, blender::gpu::TextureFormat format, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL)
bool ensure_2d(blender::gpu::TextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
void shader_set(gpu::Shader *shader)
void bind_texture(const char *name, gpu::Texture *texture, GPUSamplerState state=sampler_auto)
void clear_color(float4 color)
void bind_image(const char *name, gpu::Texture *image)
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceIndexRange res_index={}, uint custom_id=0)
void state_set(DRWState state, int clip_plane_count=0)
void push_constant(const char *name, const float &data)
static ShaderCache & get()
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
Framebuffer gpencil_pass_fb
PassSimple smaa_resolve_ps
Framebuffer smaa_weight_fb
PassSimple smaa_weight_ps
gpu::FrameBuffer * 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)