ドキュメント

Unity Engine

Unity Engine

Writing shaders in code

Resources for writing custom shader code in high-level shader language (HLSL) and ShaderLab.
読み終わるまでの所要時間 1 分最終更新 2ヶ月前

This section contains information on the following subjects:

Page

Description

Introduction to writing shaders in codeLearn about ShaderLab, Surface Shaders, and High Level Shader Language (HLSL), and which languages and approaches to use for each render pipeline.
Shader object fundamentalsUnderstand the object that Unity uses as a wrapper for shader programs and other information.
Writing a custom shader in ShaderLab and HLSLResources and techniques for writing Shader objects, subshaders and shader passes in ShaderLab and HLSL.
Adding material properties to shadersResources and techniques for adding properties that artists can use to create, edit, and share materials with different configurations.
Changing how shaders work using keywordsResources and techniques for writing shader code so it uses conditionals to do different things under different circumstances.
Branch in a shader via built-in macrosResources for adding shader branches with built-in macros based on platform, graphics API, shader model, Unity version, shader pass, or shader stage.
Configure if or when Unity uses a shaderResources for using tags and blocks in a shader to configure how and when Unity uses the shader.

Additional resources