2022-05-11 22:05:15 +00:00
|
|
|
bug/fxc/gradient_in_varying_loop/1112.wgsl:23:33 warning: 'textureSample' must only be called from uniform control flow
|
|
|
|
let sampleDepth : f32 = textureSample(depthTexture, Sampler, offset.xy).r;
|
|
|
|
^^^^^^^^^^^^^
|
|
|
|
|
2022-01-06 15:31:21 +00:00
|
|
|
#version 310 es
|
|
|
|
precision mediump float;
|
|
|
|
|
2022-01-28 22:36:58 +00:00
|
|
|
layout(location = 0) in vec2 vUV_1;
|
|
|
|
layout(location = 0) out vec4 value;
|
2022-01-24 17:17:22 +00:00
|
|
|
uniform highp sampler2D randomTexture_Sampler;
|
|
|
|
uniform highp sampler2D depthTexture_Sampler;
|
|
|
|
|
2022-01-28 22:36:58 +00:00
|
|
|
vec4 tint_symbol(vec2 vUV) {
|
2022-01-24 17:17:22 +00:00
|
|
|
vec3 random = texture(randomTexture_Sampler, vUV).rgb;
|
2022-01-06 15:31:21 +00:00
|
|
|
int i = 0;
|
|
|
|
while (true) {
|
|
|
|
if ((i < 1)) {
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
vec3 offset = vec3(random.x);
|
|
|
|
bool tint_tmp_2 = (offset.x < 0.0f);
|
|
|
|
if (!tint_tmp_2) {
|
|
|
|
tint_tmp_2 = (offset.y < 0.0f);
|
|
|
|
}
|
|
|
|
bool tint_tmp_1 = (tint_tmp_2);
|
|
|
|
if (!tint_tmp_1) {
|
|
|
|
tint_tmp_1 = (offset.x > 1.0f);
|
|
|
|
}
|
|
|
|
bool tint_tmp = (tint_tmp_1);
|
|
|
|
if (!tint_tmp) {
|
|
|
|
tint_tmp = (offset.y > 1.0f);
|
|
|
|
}
|
|
|
|
if ((tint_tmp)) {
|
|
|
|
i = (i + 1);
|
|
|
|
continue;
|
|
|
|
}
|
2022-01-24 17:17:22 +00:00
|
|
|
float sampleDepth = texture(depthTexture_Sampler, offset.xy).r;
|
2022-01-06 15:31:21 +00:00
|
|
|
i = (i + 1);
|
|
|
|
}
|
|
|
|
return vec4(1.0f);
|
|
|
|
}
|
|
|
|
|
|
|
|
void main() {
|
2022-01-28 22:36:58 +00:00
|
|
|
vec4 inner_result = tint_symbol(vUV_1);
|
|
|
|
value = inner_result;
|
|
|
|
return;
|
2022-01-06 15:31:21 +00:00
|
|
|
}
|