WIP: Metal: Experimenal AMD DOF fix #119457
|
@ -35,6 +35,9 @@ void lmh(vec4 s1, vec4 s2, vec4 s3, out vec4 l, out vec4 m, out vec4 h)
|
|||
h = h3;
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
vec4 median_filter(sampler2D tex, vec2 uv)
|
||||
{
|
||||
vec2 texel_size = 1.0 / vec2(textureSize(tex, 0).xy);
|
||||
|
|
|
@ -48,6 +48,9 @@ bool dof_do_density_change(float base_radius, float min_intersectable_radius)
|
|||
return need_new_density && larger_than_min_density;
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_gather_init(float base_radius,
|
||||
vec4 noise,
|
||||
out vec2 center_co,
|
||||
|
@ -73,6 +76,9 @@ void dof_gather_init(float base_radius,
|
|||
intersection_multiplier = pow(0.5, lod);
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_gather_accumulator(float base_radius,
|
||||
float min_intersectable_radius,
|
||||
const bool do_fast_gather,
|
||||
|
|
|
@ -357,6 +357,9 @@ void dof_gather_ammend_weight(inout DofGatherData sample_data, float weight)
|
|||
sample_data.weight *= weight;
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_gather_accumulate_sample(DofGatherData sample_data,
|
||||
float weight,
|
||||
inout DofGatherData accum_data)
|
||||
|
@ -367,6 +370,9 @@ void dof_gather_accumulate_sample(DofGatherData sample_data,
|
|||
accum_data.weight += weight;
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_gather_accumulate_sample_pair(DofGatherData pair_data[2],
|
||||
float bordering_radius,
|
||||
float intersection_multiplier,
|
||||
|
@ -427,6 +433,9 @@ void dof_gather_accumulate_sample_pair(DofGatherData pair_data[2],
|
|||
}
|
||||
}
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_gather_accumulate_sample_ring(DofGatherData ring_data,
|
||||
int sample_count,
|
||||
bool first_ring,
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
#pragma BLENDER_REQUIRE(common_utiltex_lib.glsl)
|
||||
#pragma BLENDER_REQUIRE(effect_dof_lib.glsl)
|
||||
|
||||
#if (defined(GPU_METAL) && defined(GPU_ATI))
|
||||
__attribute__((noinline))
|
||||
#endif
|
||||
void dof_slight_focus_gather(float radius, out vec4 out_color, out float out_weight)
|
||||
{
|
||||
/* offset coord to avoid correlation with sampling pattern. */
|
||||
|
|
Loading…
Reference in New Issue