{"id":2212,"date":"2020-08-21T23:53:31","date_gmt":"2020-08-21T15:53:31","guid":{"rendered":"http:\/\/blog.coolcoding.cn\/?p=2212"},"modified":"2020-08-21T23:53:31","modified_gmt":"2020-08-21T15:53:31","slug":"shaderunityshaderlab%e5%b1%9e%e6%80%a7%e5%b8%b8%e7%94%a8%e9%99%90%e5%ae%9a%e8%af%ad%e4%b9%89","status":"publish","type":"post","link":"https:\/\/blog.coolcoding.cn\/?p=2212","title":{"rendered":"[Shader]UnityShaderLab\u5c5e\u6027\u5e38\u7528\u9650\u5b9a\u8bed\u4e49"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>[NoScaleOffset]\n\u4e0d\u5141\u8bb8\u8c03\u7eb9\u7406\u7684Tiling\u548cOffset\u503c\n\n[HideInInspector]\n\u5728Shader\u7684Inspector\u4e2d\u4e0d\u663e\u793a\n\n[PerRendererData]\nTexture value for this property will be queried from renderer's MaterialPropertyBlock, instead of from the material. This corresponds to the \"[PerRendererData]\" attribute in front of a property in the shader code.\n\u6bd4\u5982\u5728UI\u4e2d\u4f7f\u7528\n\n[Normal]\nSignifies that values of this property contain Normal (normalized vector) data.\nWhen this flag is set, the default material Inspector will display warning if incompatible data was assigned in the Material. For instance default material Inspector will warn and suggest to fix the texture that is not marked as Normalmap. This corresponds to \"[Normal]\" attribute in front of property in the shader code.\n\u6307\u793a\u4ed6\u662f\u6cd5\u7ebf\n\n[HDR]\nSignifies that values of this property contain High Dynamic Range (HDR) data.\nWhen this flag is set, the default material Inspector will display warning if incompatible data was assigned in the Material. For instance default material Inspector will warn and suggest to fix the texture that contain alpha channel (unsupported in HDR textures). This corresponds to \"[HDR]\" attribute in front of property in the shader code.\n\u6307\u793aHDR\n\n[Gamma]\nSignifies that values of this property are in gamma space and should not be gamma corrected.\nWhen this flag is set, colors passed into the shader will not be linearized. For more information see https:\/\/docs.unity3d.com\/Manual\/LinearLighting.html:\n\n[NonModifiableTextureData]\nDo not allow this texture property to be edited in the Inspector.\nThis property is specified via the shader importer and should not be user controlled.<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2212"}],"collection":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2212"}],"version-history":[{"count":1,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2212\/revisions"}],"predecessor-version":[{"id":2213,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=\/wp\/v2\/posts\/2212\/revisions\/2213"}],"wp:attachment":[{"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.coolcoding.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}