blob: e16596d8ea4099f4993fd650677f733e2e148eea [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
sampler Sampler;
texture2d<float, access::sample> randomTexture;
texture2d<float, access::sample> depthTexture;
};
struct tint_symbol_outputs {
float4 tint_symbol_1 [[color(0)]];
};
struct tint_symbol_inputs {
float2 vUV [[user(locn0)]];
};
float4 tint_symbol_inner(float2 vUV, tint_module_vars_struct tint_module_vars) {
float3 const random = tint_module_vars.randomTexture.sample(tint_module_vars.Sampler, vUV).xyz;
int i = 0;
{
while(true) {
if ((i < 1)) {
} else {
break;
}
float3 const offset = float3(random[0u]);
bool v = false;
if ((offset[0u] < 0.0f)) {
v = true;
} else {
v = (offset[1u] < 0.0f);
}
bool v_1 = false;
if (v) {
v_1 = true;
} else {
v_1 = (offset[0u] > 1.0f);
}
bool v_2 = false;
if (v_1) {
v_2 = true;
} else {
v_2 = (offset[1u] > 1.0f);
}
if (v_2) {
i = (i + 1);
{
}
continue;
}
float const sampleDepth = 0.0f;
i = (i + 1);
{
}
continue;
}
}
return float4(1.0f);
}
fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], sampler Sampler [[sampler(0)]], texture2d<float, access::sample> randomTexture [[texture(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture};
return tint_symbol_outputs{.tint_symbol_1=tint_symbol_inner(inputs.vUV, tint_module_vars)};
}