19void Instance::antialiasing_init()
22 const int2 size(size_f[0], size_f[1]);
23 const float4 metrics = {1.0f / size[0], 1.0f / size[1],
float(size[0]),
float(size[1])};
110void Instance::antialiasing_draw(
Manager &manager)
143 float w = -
logf((1.0f - a) * (1.0f + a));
148 p = p *
w + 3.43273939e-07f;
149 p = p *
w + -3.5233877e-06f;
150 p = p *
w + -4.39150654e-06f;
151 p = p *
w + 0.00021858087f;
152 p = p *
w + -0.00125372503f;
153 p = p *
w + -0.00417768164f;
154 p = p *
w + 0.246640727f;
155 p = p *
w + 1.50140941f;
159 p = -0.000200214257f;
160 p = p *
w + 0.000100950558f;
161 p = p *
w + 0.00134934322f;
162 p = p *
w + -0.00367342844f;
163 p = p *
w + 0.00573950773f;
164 p = p *
w + -0.0076224613f;
165 p = p *
w + 0.00943887047f;
166 p = p *
w + 1.00167406f;
167 p = p *
w + 2.83297682f;
174 if (sample_count < 2) {
180 uint primes[2] = {2, 3};
181 double ofs[2] = {0, 0};
187 const float2 rand_remap = rand * 2.0f - 1.0f;
189 const float2 rand_adjusted = rand_remap * 0.93f;
193 const float sigma = 0.284f;
195 return offset *
sqrt(sigma);
201 "This should only be called during render");
#define RE_PASSNAME_COMBINED
#define GPU_ATTACHMENT_TEXTURE(_texture)
#define GPU_ATTACHMENT_NONE
#define BLI_assert_msg(a, msg)
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)
bool acquire_2d(int2 extent, gpu::TextureFormat format, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, int mip_len=1)
bool ensure_2d(gpu::TextureFormat format, int2 extent, eGPUTextureUsage usage=GPU_TEXTURE_USAGE_GENERAL, const float *data=nullptr, int mip_len=1)
gpu::Texture * gpu_texture()
int3 size(int miplvl=0) const
void draw_procedural(GPUPrimType primitive, uint instance_len, uint vertex_len, uint vertex_first=-1, ResourceIDRange res_id={}, uint custom_id=0)
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 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)
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
void BLI_halton_2d(const unsigned int prime[2], double offset[2], int n, double *r)
void GPU_framebuffer_clear(gpu::FrameBuffer *fb, GPUFrameBufferBits buffers, const double4 clear_col, float clear_depth, unsigned int clear_stencil)
void GPU_texture_update(gpu::Texture *texture, eGPUDataFormat data_format, const void *data)
const unsigned char areaTexBytes[]
const unsigned char searchTexBytes[]
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
@ GPU_TEXTURE_USAGE_SHADER_READ
@ GPU_TEXTURE_USAGE_SHADER_WRITE
@ GPU_TEXTURE_USAGE_HOST_READ
@ GPU_TEXTURE_USAGE_ATTACHMENT
void GPU_texture_filter_mode(gpu::Texture *texture, bool use_filter)
bool DRW_viewport_pass_texture_exists(const char *pass_name)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
float2 viewport_size_get() const
float smaa_threshold_render
struct SceneGpencil grease_pencil_settings
TextureFromPool smaa_edge_tx
Framebuffer gpencil_pass_fb
Framebuffer combined_pass_fb
bool need_grease_pencil_pass
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)