HLSL
3. 프로그램의 흐름
Awesome Red Tomato
2021. 12. 24. 14:31
HLSL의 조건 분기, 반복 등은 C++과 동일하다.
return (expression);
if(condition)
{
statement(s);
}
if(condition)
{
statement(s);
}
else
{
statement(s);
}
The for statement:
for(initial; condition; increment)
{
statement(s);
}
The while statement:
while(condition)
{
statement(s);
}
The do…while statement:
do
{
statement(s);
} while(condition);