Harbor

branch main
showing the latest snapshot on main
loop_control.hlsl 764 B · Plain text
shader/tests/golden/loop_control.hlsl 0644 Raw
struct _shade_Input {
	float4 _sv_position : SV_Position;
	float value : TEXCOORD0;
};

struct _shade_Output {
	float4 _value : SV_Target0;
};

_shade_Output shade(_shade_Input input) {
	_shade_Output __luma_output;
	float result = 0.0;
	for (int i = 0; i <= 10; i++) {
		if (((i % 2) == 0)) {
			continue;
		}
		result = (result + (float)i);
	}
	float total = 0.0;
	for (int j = 0; j <= 100; j++) {
		if ((j > 5)) {
			break;
		}
		total = (total + 1.0);
	}
	int k = 0;
	while ((k < 100)) {
		if ((k > 10)) {
			break;
		}
		k = (k + 1);
	}
	float sum = 0.0;
	int m = 0;
	while ((m < 10)) {
		m = (m + 1);
		if ((m == 5)) {
			continue;
		}
		sum = (sum + 1.0);
	}
	__luma_output._value = float4(((result + total) + sum), 0.0, 0.0, 1.0);
	return __luma_output;
}