Unity 빌트인 렌더 파이프라인의 셰이더는 다음 방법으로 작성됩니다.
셰이더 튜토리얼을 참조하여 가장 적합한 셰이더를 선택하십시오.
셰이더 코드는 타입과 관계없이 항상 셰이더 구조를 정리하는 ShaderLab 언어로 래핑됩니다. 다음은 셰이더 코드 없이 ShaderLab 래퍼를 생성한 예시입니다.
Shader "MyShader" {
Properties {
_MyTexture ("My Texture", 2D) = "white" { }
// place other properties here, such as colors or vectors.
}
SubShader {
// place the shader code here for your:
// - surface shader,
// - vertex and program shader, or
// - fixed function shader
}
SubShader {
// a simpler version of the subshader above goes here.
// this version is for supporting older graphics cards.
}
}
셰이더에 관한 기본 정보와 고정 함수 셰이더에 대한 내용은 ShaderLab 구문 섹션을 참조하십시오. 지원되는 다른 셰이더 타입에 대한 내용은 표면 셰이더 작성 또는 버텍스 및 프래그먼트 셰이더 작성을 참조하십시오. 포스트 프로세싱 효과를 셰이더와 함께 사용하여 전체 화면 필터를 비롯한 여러 흥미로운 효과를 만들 수도 있습니다.
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.