Return to site

Opengl 2.0 es specific optimizatinos

broken image

If a shader defines a geometry stage (with #pragma geometry), Unity automatically adds geometry to the list of requirements.If your shader defines certain shader stages, Unity automatically adds items to the list of requirements. Default behaviorīy default, Unity compiles shaders with #pragma require derivatives, which corresponds to #pragma target 2.5. If your shader uses features that are not included in the list of requirements, this can result in either compile time errors, or in devices failing to support shaders at runtime. It is important to correctly describe the GPU features that your shader requires.

broken image

A shader model is a shorthand for a group of GPU features internally, it is the same as a #pragma require directive with the same list of features. You can specify individual GPU features with the #pragma require directive, or specify a shader model with the #pragma target directive.

broken image

At runtime, Unity uses this information to determine whether a shader program is compatible with the current hardware. More info See in Glossary requires certain GPU features.

broken image

You can use #pragma directives to indicate that a shader A program that runs on the GPU.

broken image