참고: 이 페이지의 ShaderLab 기능은 레거시이며, 이전 버전과의 호환성 목적으로만 문서화되었습니다. 셰이더 소스 파일에 HLSL 코드가 포함된 경우, Unity는 이러한 커맨드를 완전히 무시합니다. 셰이더 소스 파일에 HLSL 코드가 포함되지 않은 경우, Unity는 임포트 시 이러한 커맨드를 일반 셰이더 프로그램으로 컴파일합니다.
기능 이름 | 빌트인 렌더 파이프라인 | 유니버설 렌더 파이프라인(URP) | 고해상도 렌더 파이프라인(HDRP) | 커스텀 SRP |
---|---|---|---|---|
레거시 안개 | 지원 | 지원 안 함 | 지원 안 함 | 지원 안 함 |
고정된 함수 스타일의 레거시 커맨드를 사용하여 작성된 셰이더에서 Unity의 빌트인 안개를 활성화하거나 비활성화하려면 Fog 커맨드를 사용하십시오.
RenderSettings 클래스나 Lighting 창을 사용하여 프로젝트 설정에서 빌트인 안개 효과를 설정한 다음, 이 커맨드를 사용하여 특정 패스에서 안개를 활성화하거나 비활성화하십시오.
안개를 사용하면 생성된 픽셀의 컬러가 카메라와의 거리에 따라 특정한 컬러로 블렌드됩니다. 블렌드된 픽셀의 알파 값은 수정되지 않고 RGB 컴포넌트만 수정됩니다.
파라미터 | 값 | 기능 |
---|---|---|
Mode | Off |
이 패스에 빌트인 안개를 적용하지 않습니다. |
Global |
프로젝트 설정에 기반하여 이 패스에 빌트인 안개를 적용합니다. 프로젝트 설정에서 안개를 비활성화한 경우, Unity는 이 패스에 빌트인 안개를 적용하지 않습니다. |
이 예제 코드는 Pass 블록에서 이 커맨드를 사용하기 위한 구문을 나타냅니다.
Shader "Examples/FogExample"
{
SubShader
{
// The rest of the code that defines the SubShader goes here.
Pass
{
Fog Off
// The rest of the code that defines the Pass goes here.
}
}
}
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.