{"id":687,"date":"2026-03-23T23:14:00","date_gmt":"2026-03-23T15:14:00","guid":{"rendered":"https:\/\/www.s7arry.top\/?p=687"},"modified":"2026-03-23T23:17:11","modified_gmt":"2026-03-23T15:17:11","slug":"pbr02","status":"publish","type":"post","link":"https:\/\/www.s7arry.top\/index.php\/2026\/03\/23\/pbr02\/","title":{"rendered":"PBR \u5b66\u4e60\u603b\u7ed3\uff1a\u5b9e\u6218\u7bc7"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"j7E2d\">\u96f6\u3001\u524d\u8a00<\/h1>\n\n\n\n<p>\u8bed\u96c0\uff1a<a href=\"https:\/\/www.yuque.com\/starry-zvpk0\/aygygr\/qfe3050knzwxn6iz?singleDoc#%20%E3%80%8APBR%20%E5%AD%A6%E4%B9%A0%E6%80%BB%E7%BB%93%EF%BC%9A%E5%AE%9E%E6%88%98%E7%AF%87%E3%80%8B\" target=\"_blank\" rel=\"noreferrer noopener\"> PBR \u5b66\u4e60\u603b\u7ed3\uff1a\u5b9e\u6218\u7bc7<\/a><\/p>\n\n\n\n<p id=\"uf7bf1943\">\u4e0a\u4e00\u7bc7\u4ecb\u7ecd\u4e86PBR\u7684\u7406\u8bba\u77e5\u8bc6\uff0c\u8fd9\u7bc7\u4f7f\u7528Unity\u8fdb\u884c\u5b9e\u6218\uff0c\u5148\u6765\u770b\u4e0b\u6548\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/www.s7arry.top\/wp-content\/uploads\/2026\/03\/image-31.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"573\" data-original=\"https:\/\/www.s7arry.top\/wp-content\/uploads\/2026\/03\/image-31.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-689\"  sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"IseVR\"\/>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"ThRnW\">\u4e00\u3001\u5de5\u4f5c\u6d41<\/h1>\n\n\n\n<p id=\"u602989ef\">\u5728PBR\u4e2d\uff0c\u4e3a\u4e86\u5728\u4e0d\u540c\u7684\u5149\u7167\u73af\u5883\u4e0b\u4fdd\u6301\u6750\u8d28\u8868\u73b0\u7684\u4e00\u81f4\u6027\u548c\u771f\u5b9e\u611f\uff0c\u4e3b\u8981\u5206\u4e3a\u4e86\u4e24\u79cd\u5de5\u4f5c\u6d41\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u91d1\u5c5e\/\u7c97\u7cd9\u5ea6\uff08Metallic\/Roughness\uff09<\/li>\n\n\n\n<li>\u955c\u9762\u53cd\u5c04\/\u5149\u6cfd\u5ea6\uff08Specular\/Glossiness\uff09<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"BBThU\">1. \u91d1\u5c5e \/ \u7c97\u7cd9\u5ea6\u5de5\u4f5c\u6d41 (Metallic\/Roughness)<\/h2>\n\n\n\n<p id=\"u570accd0\">\u8fd9\u662f\u76ee\u524d\u6e38\u620f\u5f15\u64ce\u4e2d\u6700\u5e38\u7528\u7684\u5de5\u4f5c\u6d41<\/p>\n\n\n\n<p id=\"u2134ebe7\"><strong>\u8d34\u56fe\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Base Color\uff08\u57fa\u7840\u8272\uff09<\/strong>\uff1a \u5305\u542b\u975e\u91d1\u5c5e\u7684\u6f2b\u53cd\u5c04\u989c\u8272\u548c\u91d1\u5c5e\u7684\u955c\u9762\u53cd\u5c04\u989c\u8272\uff08\u9700\u8981\u914d\u5408metallic\u5c06diffuse\u548cspcular\u5206\u79bb\uff09<\/li>\n\n\n\n<li><strong>Metallic\uff08\u91d1\u5c5e\u5ea6\uff09\uff1a <\/strong>\u4e00\u5f20\u9ed1\u767d\u56fe\uff08\u901a\u5e38\u5efa\u8bae\u53ea\u7528\u7eaf\u9ed1\u6216\u7eaf\u767d\uff09\u3002\u767d\u8272\uff081.0\uff09\u8868\u793a\u91d1\u5c5e\uff0c\u9ed1\u8272\uff080.0\uff09\u8868\u793a\u975e\u91d1\u5c5e\uff08\u7edd\u7f18\u4f53\uff09<\/li>\n\n\n\n<li><strong>Roughness\uff08\u7c97\u7cd9\u5ea6\uff09<\/strong>\uff1a \u63cf\u8ff0\u8868\u9762\u7684\u5e73\u6574\u7a0b\u5ea6\u30021.0 \u4e3a\u5b8c\u5168\u7c97\u7cd9\uff08\u6f2b\u53cd\u5c04\u6563\u5c04\uff09\uff0c0.0 \u4e3a\u5b8c\u5168\u5e73\u6ed1\uff08\u955c\u9762\u53cd\u5c04\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"LM0bo\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"nKF6x\">2. \u955c\u9762\u53cd\u5c04\/\u5149\u6cfd\u5ea6\u5de5\u4f5c\u6d41 (Specular\/Glossiness)<\/h2>\n\n\n\n<p id=\"u85e177ef\">\u66f4\u4f20\u7edf\u7684 PBR \u65b9\u6848\uff0c\u5e38\u89c1\u4e8e\u5f71\u89c6\u6e32\u67d3\u548c\u8f83\u65e9\u7684\u6e38\u620f\u6e32\u67d3\u7ba1\u7ebf\u4e2d<\/p>\n\n\n\n<p id=\"u8785a909\"><strong>\u8d34\u56fe\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Diffuse\uff08\u6f2b\u53cd\u5c04\uff09\uff1a<\/strong>\u4ec5\u5305\u542b\u975e\u91d1\u5c5e\u7684\u6f2b\u53cd\u5c04\u989c\u8272<\/li>\n\n\n\n<li><strong>Specular\uff08\u955c\u9762\u53cd\u5c04\uff09\uff1a<\/strong>\u4e00\u5f20 RGB \u5f69\u8272\u8d34\u56fe\u3002\u63a7\u5236\u6750\u8d28\u8868\u9762\u7684\u53cd\u5c04\u989c\u8272\u548c\u5f3a \u5ea6<\/li>\n\n\n\n<li><strong>Glossiness\uff08\u5149\u6cfd\u5ea6\uff09\uff1a<\/strong> \u4e0e Roughness \u76f8\u53cd\u30021.0 \u8868\u793a\u975e\u5e38\u5e73\u6ed1\uff0c0.0 \u8868\u793a\u975e\u5e38\u7c97\u7cd9<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"umoVa\"\/>\n\n\n\n<p id=\"ue1592d30\">\u672c\u6587\u4e2d\u4f7f\u7528\u91d1\u5c5e\u3001\u7c97\u7cd9\u5ea6\u7684\u5de5\u4f5c\u6d41\uff0c\u6765\u5236\u4f5c<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"NdmI0\"\/>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"bE3F4\">\u4e8c\u3001\u9879\u76ee\u8bbe\u7f6e<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lsSMX\">1. \u8d34\u56fe\u8bbe\u7f6e<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Albedo\u3001BaseMap\u3001DiffuseMap\u3001SpecularMap\u9700\u8981\u52fe\u9009sRGB<\/li>\n\n\n\n<li>Roughness\u3001Metallic\u3001AO\u7b49\u662f\u7ebf\u6027\u7a7a\u95f4\u8ba1\u7b97\u7684\uff0c\u4e0d\u8981\u52fe\u9009sRGB<\/li>\n\n\n\n<li>Normal\u5728Unity\u4e2d\u9009\u62e9Normal Map<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"uGTA9\">2. \u540e\u5904\u7406\u8bbe\u7f6e<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ToneMapping &#8211; ACES<\/li>\n\n\n\n<li>ColorGrading \u8c03\u4e0b\u8272\uff08\u5904\u7406ACES\u540e\u8fc7\u6697\uff09<\/li>\n\n\n\n<li><s>Bloom<\/s>\uff08\u592a\u95ea\u4e0d\u597d\u770b\uff09<\/li>\n\n\n\n<li>\u6697\u89d2<\/li>\n\n\n\n<li>DoF<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"YmOpB\">3. \u6444\u50cf\u673a\u8bbe\u7f6e<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8c03\u6574FOV \uff1a20~30<\/li>\n\n\n\n<li>\u5254\u9664<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"Md3mB\"\/>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"Adhxf\">\u4e09\u3001\u4ee3\u7801<\/h1>\n\n\n\n<p>\u8bb0\u5f97\u52a0\u4e0aShadowCaster\u7b49Pass<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"JpjrT\">\u9762\u677f\u53c2\u6570<\/h2>\n\n\n\n<p id=\"ua1b00d16\">\u5982\u4e0b<\/p>\n\n\n\n<pre id=\"nUzu2\" class=\"wp-block-code\"><code>_Albedo (\"Albedo\", 2D) = \"white\" {}\n_BaseColor(\"Base Color\", Color) = (1.0, 1.0, 1.0, 1.0)    \n_MetallicTex (\"Metallic Tex\", 2D) = \"white\" {}\n_Metallic (\"Metallic\", Range(0,1)) = 0.0   \n_RoughnessTex (\"Roughness Tex\", 2D) = \"white\" {}\n_Roughness (\"Roughness\", Range(0,1)) = 0.5   \n_NormalTex (\"Normal Tex\", 2D) = \"bump\" {}\n_NormalScale (\"Normal Scale\",Range(0, 1)) = 0.5     \n_OcculsionTex (\"Occlusion Tex\", 2D) = \"white\" {}\n_OcclusionStrength (\"Occlusion Strength\", Range(0,1)) = 1.0    \n_EmissionTex (\"Emission Tex\", 2D) = \"white\" {}\n_EmissionIntensity (\"Emission Intensity\", Range(0,10)) = 1.0<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"lh2WM\">\u5411\u91cf\u3001\u8d34\u56fe<\/h2>\n\n\n\n<pre id=\"nQ17s\" class=\"wp-block-code\"><code>\/\/ \u5411\u91cf\u51c6\u5907\nhalf3 normalWS = normalize(input.normalWS);\nhalf3 tangentWS = normalize(input.tangentWS);\nhalf3 bitangentWS = cross(normalWS, tangentWS);\nhalf3x3 TBN = half3x3(tangentWS, bitangentWS, normalWS);\nfloat3 positionWS = input.positionWS;\nhalf4 shadowMask = half4 (1.0, 1.0, 1.0, 1.0);\nhalf3 viewDir = GetWorldSpaceNormalizeViewDir(positionWS);\n\n\/\/ \u4e3b\u5149\u6e90\nLight mainLight = GetMainLight(input.shadowCoord, positionWS, shadowMask);\nfloat shadow = mainLight.shadowAttenuation;\nfloat3 lightDir = mainLight.direction;\nfloat3 lightColor = mainLight.color;\n\n\/\/ \u8d34\u56fe\u91c7\u6837\nfloat4 baseMap = SAMPLE_TEXTURE2D(_Albedo, sampler_Albedo, input.uv) * _BaseColor;\nfloat metallic = _Metallic * SAMPLE_TEXTURE2D(_MetallicMap, sampler_MetallicMap, input.uv).r;\nfloat roughness = _Roughness * SAMPLE_TEXTURE2D(_RoughnessMap, sampler_RoughnessMap, input.uv).r;\nfloat4 normalMap = SAMPLE_TEXTURE2D(_NormalMap, sampler_NormalMap, input.uv);\nfloat3 normalMapTS = UnpackNormalScale(normalMap,_NormalScale);\nfloat3 normalMapWS = normalize(mul(normalMapTS, TBN));\nfloat occlusionMap = SAMPLE_TEXTURE2D(_OcculsionMap, sampler_OcculsionMap, input.uv).r;\nfloat3 Emission = SAMPLE_TEXTURE2D(_EmissionMap, sampler_EmissionMap, input.uv).rgb * _EmissionIntensity;\nfloat occlusion = lerp(1.0, occlusionMap, _OcclusionStrength);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OCqTV\">BRDF\u53c2\u6570<\/h2>\n\n\n\n<p id=\"u3700b583\">\u5728\u91d1\u5c5e\u7c97\u7cd9\u5ea6\u5de5\u4f5c\u6d41\u4e2d\uff0c\u4eceBaseMap\/Albedo\u4e2d\u83b7\u53d6DiffuseColor\u548cSpcularColor<\/p>\n\n\n\n<pre id=\"LArCI\" class=\"wp-block-code\"><code>float3 DiffuseColor = lerp(baseMap * (1 - 0.04), 0, metallic);\nfloat3 SpecualrColor = lerp(0.04, baseMap, metallic);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"bGPGG\">\u76f4\u63a5\u5149<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"jkfr4\">\u6f2b\u53cd\u5c04<\/h3>\n\n\n\n<pre id=\"Qq8l1\" class=\"wp-block-code\"><code>float3 Diffuse_Lambert( float3 DiffuseColor )\n{\n    return DiffuseColor * (1 \/ PI);\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ahpSX\">\u955c\u9762\u53cd\u5c04<\/h3>\n\n\n\n<p id=\"u5892cc96\"><strong>D\u9879<\/strong><\/p>\n\n\n\n<pre id=\"Wm1F4\" class=\"wp-block-code\"><code>\/\/ GGX \/ Trowbridge-Reitz\n\/\/ &#91;Walter et al. 2007, \"Microfacet models for refraction through rough surfaces\"]\nfloat D_GGX( float a2, float NoH )\n{\n    float d = ( NoH * a2 - NoH ) * NoH + 1;\t\/\/ 2 mad\n    return a2 \/ ( PI*d*d );\t\t\t\t\t\/\/ 4 mul, 1 rcp\n}<\/code><\/pre>\n\n\n\n<p id=\"uae37d861\"><strong>F\u9879<\/strong><\/p>\n\n\n\n<pre id=\"Z9MBo\" class=\"wp-block-code\"><code>\/\/ &#91;Schlick 1994, \"An Inexpensive BRDF Model for Physically-Based Rendering\"]\nfloat3 F_Schlick( float3 SpecularColor, float VoH )\n{\n    float Fc = Pow5( 1 - VoH );\t\t\t\t\t\/\/ 1 sub, 3 mul\n    \/\/return Fc + (1 - Fc) * SpecularColor;\t\t\/\/ 1 add, 3 mad\n\t\n    \/\/ Anything less than 2% is physically impossible and is instead considered to be shadowing\n    return saturate( 50.0 * SpecularColor.g ) * Fc + (1 - Fc) * SpecularColor;\n}<\/code><\/pre>\n\n\n\n<p id=\"uec646e0e\"><strong>V\u9879<\/strong><\/p>\n\n\n\n<pre id=\"OUGr2\" class=\"wp-block-code\"><code>\/\/ Appoximation of joint Smith term for GGX\n\/\/ &#91;Heitz 2014, \"Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs\"]\nfloat Vis_SmithJointApprox( float a2, float NoV, float NoL )\n{\n    float a = sqrt(max(a2, 1e-7));\n    float Vis_SmithV = NoL * ( NoV * ( 1 - a ) + a );\n    float Vis_SmithL = NoV * ( NoL * ( 1 - a ) + a );\n    return 0.5 * rcp( Vis_SmithV + Vis_SmithL + 1e-5 );\n}<\/code><\/pre>\n\n\n\n<p id=\"ufe1deab9\">V\u9879\u5c31\u662f\u5c06 \u516c\u5f0f\u4e2d\u7684\u5206\u6bcd\u548cG\u9879\u653e\u5728\u4e00\u8d77\u8ba1\u7b97<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ev8gd\"><strong>\u6574\u5408<\/strong><\/h3>\n\n\n\n<pre id=\"TZGUr\" class=\"wp-block-code\"><code>float D = D_GGX_UE(a2, NoH);\nfloat Vis = Vis_SmithJointApprox(a2, NoV, NoL);\nfloat3 F = F_Schlick_UE(SpecularColor, VoH);\n\nfloat3 DiffuseTerm = Diffuse_Lambert(DiffuseColor) * Radiance;\nfloat3 SpecularTerm = D * Vis * F * Radiance;\n\nfloat3 kS = F; \/\/ \u955c\u9762\u53cd\u5c04\u7cfb\u6570\nfloat3 kD = (1.0 - kS) * (1.0 - metallic); \/\/ \u5269\u4e0b\u7684\u624d\u662f\u6f2b\u53cd\u5c04\nfloat3 DirectLighting = kD * DiffuseTerm + SpecularTerm;<\/code><\/pre>\n\n\n\n<p id=\"ua06f4827\">\u591a\u5149\u6e90\u548c\u4e3b\u5149\u8ba1\u7b97\u903b\u8f91\u4e00\u6837\uff0cfor\u5faa\u73af\u5904\u7406\u6bcf\u4e00\u76cf\u706f<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"TDO3T\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"vmpBO\">\u95f4\u63a5\u5149<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"xrhTE\">\u6f2b\u53cd\u5c04<\/h3>\n\n\n\n<p id=\"u14796293\">\u7403\u8c10\u51fd\u6570\uff0c\u6a21\u62df\u73af\u5883\u5149\u6f2b\u53cd\u5c04<\/p>\n\n\n\n<pre id=\"dlaG6\" class=\"wp-block-code\"><code>float3 RadianceSH = SampleSH(N);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"EN6XZ\">\u955c\u9762\u53cd\u5c04<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"LCm56\">a. \u9884\u8fc7\u6ee4\u73af\u5883\u8d34\u56fe<\/h4>\n\n\n\n<p id=\"u9a91baff\">\u91c7\u6837CubeMap\u7684MipMap<\/p>\n\n\n\n<pre id=\"JYXrR\" class=\"wp-block-code\"><code>float mipLevel = perceptualRoughness * (1.7 - 0.7 * perceptualRoughness) * UNITY_SPECCUBE_LOD_STEPS;\nfloat4 encodeSpecularRadiance = unity_SpecCube0.SampleLevel(samplerunity_SpecCube0, reflect(-v, normal), mipLevel);\nfloat3 specularRadiance = DecodeHDREnvironment(encodeSpecularRadiance, unity_SpecCube0_HDR);\n\n\/\/Unity\u4e5f\u7ed9\u6211\u4eec\u5199\u597d\u4e86\u65b9\u6cd5\nfloat3 specularRadiance = GlossyEnvironmentReflection(R, positionWS, Roughness, Occlusion);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"xmkoo\">b. \u73af\u5883BRDF<\/h4>\n\n\n\n<p id=\"u22cb02ad\">\u6d41\u6d3e1\uff1aLUT<\/p>\n\n\n\n<pre id=\"ZF8Dz\" class=\"wp-block-code\"><code>\/\/LUT\u91c7\u6837\nfloat2 env_brdf = tex2D(_BRDFLut,float2(lerp(0,0.99,NV),lerp(0,0.99,Roughness))).rg;<\/code><\/pre>\n\n\n\n<p id=\"uf7788134\">\u6d41\u6d3e2\uff1a\u89e3\u6790\u62df\u5408<\/p>\n\n\n\n<pre id=\"ThPes\" class=\"wp-block-code\"><code>half3 EnvBRDFApprox( half3 SpecularColor, half Roughness, half NoV )\n{\n    \/\/ &#91; Lazarov 2013, \"Getting More Physical in Call of Duty: Black Ops II\" ]\n    \/\/ Adaptation to fit our G term.\n    const half4 c0 = { -1, -0.0275, -0.572, 0.022 };\n    const half4 c1 = { 1, 0.0425, 1.04, -0.04 };\n    half4 r = Roughness * c0 + c1;\n    half a004 = min( r.x * r.x, exp2( -9.28 * NoV ) ) * r.x + r.y;\n    half2 AB = half2( -1.04, 1.04 ) * a004 + r.zw;\n\n    \/\/ Anything less than 2% is physically impossible and is instead considered to be shadowing\n    \/\/ Note: this is needed for the 'specular' show flag to work, since it uses a SpecularColor of 0\n    AB.y *= saturate( 50.0 * SpecularColor.g );\n\n    return SpecularColor * AB.x + AB.y;\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"Ltogx\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"qeumK\"><strong>\u6574\u5408<\/strong><\/h3>\n\n\n\n<pre id=\"pB5zs\" class=\"wp-block-code\"><code>\/\/\u6f2b\u53cd\u5c04\uff1aSH\nfloat3 DiffuseTerm = DiffuseColor * RadianceSH * Occlusion;\n\n\/\/\u955c\u9762\u53cd\u5c04\uff1aIBL\n\/\/\u7b2c\u4e00\u9879\nfloat3 Env_IBL = GlossyEnvironmentReflection(R, positionWS, Roughness, Occlusion);\n\/\/\u7b2c\u4e8c\u9879\nfloat3 Env_Brdf = EnvBRDFApprox(SpecularColor, Roughness, NoV);\nfloat3 SpecularTerm = Env_IBL * Env_Brdf * Occlusion;\n\nfloat3 kS = Env_Brdf; \nfloat3 kD = (1.0 - kS) * (1.0 - metallic);\n    \nfloat3 IndirectLighting = kD * DiffuseTerm + SpecularTerm;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" id=\"I2EwZ\"\/>\n\n\n\n<p id=\"u5d612939\">\u5b8c\u7ed3\u6492\u82b1~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u96f6\u3001\u524d\u8a00 \u8bed\u96c0\uff1a PBR \u5b66\u4e60\u603b\u7ed3\uff1a\u5b9e\u6218\u7bc7 \u4e0a\u4e00\u7bc7\u4ecb\u7ecd\u4e86PBR\u7684\u7406\u8bba\u77e5\u8bc6\uff0c\u8fd9\u7bc7\u4f7f\u7528Unity\u8fdb\u884c\u5b9e\u6218\uff0c\u5148\u6765\u770b\u4e0b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":628,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[17],"class_list":["post-687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11","tag-17"],"_links":{"self":[{"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/posts\/687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":5,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/posts\/687\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/posts\/687\/revisions\/693"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/media\/628"}],"wp:attachment":[{"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/media?parent=687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/categories?post=687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.s7arry.top\/index.php\/wp-json\/wp\/v2\/tags?post=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}