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);
'HLSL' 카테고리의 다른 글
4. 함수 (0) | 2021.12.24 |
---|---|
2. 키워드와 연산자 (0) | 2021.12.24 |
1. 변수 형식 (0) | 2021.12.24 |