GetDynamicLighting

記述が無い場合は下記設定

  • マテリアル
    • BaseColor : 1.0, 1.0, 1.0
    • Metalic : 0.0
    • Roughtness 1.0
    • Specular : 0.5
  • ライト
    • ディフューズライト1灯のみ
    • Intencity : 6.0
    • Color : 0.0, 1.0, 0.0

基本パラメーター

  • Default Lit
    Rendering-DefaultLit.png
  • GBuffer.DiffuseColor
    Rendering-GBuffer.DeffuseColor.png
  • GBuffer.SpecularColor
    Rendering-GBuffer.SpecularColor.png
  • LightColor
    Rendering-LightColor.png

ライティングフロー

  • SurfaceLighting
     
    
    float3 SurfaceLighting = SurfaceShading(GBuffer, LobeRoughness, LobeEnergy, L, V, N, Random);
    Rendering-SurfaceLighting.png
  • SurfaceShadingの中身
     
    -
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    |
    !
    
    float3 StandardShading( float3 DiffuseColor, float3 SpecularColor, float3 LobeRoughness, float3 LobeEnergy, float3 L, float3 V, half3 N )
    {
        float3 H = normalize(V + L);
        float NoL = saturate( dot(N, L) );
        float NoV = saturate( abs( dot(N, V) ) + 1e-5 );
        float NoH = saturate( dot(N, H) );
        float VoH = saturate( dot(V, H) );
        
        // Generalized microfacet specular
        float D = D_GGX( LobeRoughness[1], NoH ) * LobeEnergy[1];
        float Vis = Vis_SmithJointApprox( LobeRoughness[1], NoV, NoL );
        float3 F = F_Schlick( SpecularColor, VoH );
     
        float3 Diffuse = Diffuse_Lambert( DiffuseColor );
        //float3 Diffuse = Diffuse_Burley( DiffuseColor, LobeRoughness[1], NoV, NoL, VoH );
        //float3 Diffuse = Diffuse_OrenNayar( DiffuseColor, LobeRoughness[1], NoV, NoL, VoH );
     
        return Diffuse * LobeEnergy[2] + (D * Vis) * F;
    }
    1. Diffuse * LobeEnergy[2] = x
      Rendering-SurfaceLighting-Diffuse.png * Rendering-SurfaceLighting-LobeEnegy[2].png = Rendering-SurfaceLighting-Diffuse-x-LobeEnegy[2].png
    2. (D * Vis) * F = y
      (Rendering-SurfaceLighting-D(Roughness_1.0).png * Rendering-SurfaceLighting-Vis(Roughness_1.0).png ) * Rendering-SurfaceLighting-F.png = Rendering-SurfaceLighting-(D-x-Vis)-x-F.png
    3. x + y = return
      Rendering-SurfaceLighting-Diffuse-x-LobeEnegy[2].png + Rendering-SurfaceLighting-(D-x-Vis)-x-F.png = Rendering-SurfaceLighting.png

Roughness = 0.0の時

  1. Diffuse * LobeEnergy[2] = x
    Rendering-SurfaceLighting-Diffuse.png * &ref(): File not found: "Rendering-SurfaceLighting-LobeEnegy[2](Roughtness_0.0).png" at page "エンジン改造-ライティング解析"; = &ref(): File not found: "Rendering-SurfaceLighting-Diffuse-x-LobeEnegy[2](Roughtness_0.0).png" at page "エンジン改造-ライティング解析";
  2. (D * Vis) * F = y
    (Rendering-SurfaceLighting-D(Roughness_0.0).png * Rendering-SurfaceLighting-Vis(Roughness_0.0).png ) * Rendering-SurfaceLighting-F.png = Rendering-SurfaceLighting-(D-x-Vis)-x-F(Roughtness_0.0).png
  3. x + y = return
    &ref(): File not found: "Rendering-SurfaceLighting-Diffuse-x-LobeEnegy[2](Roughtness_0.0).png" at page "エンジン改造-ライティング解析"; + Rendering-SurfaceLighting-(D-x-Vis)-x-F.png = &ref(): File not found: "Rendering-SurfaceLighting(Roughtness_0.0).png" at page "エンジン改造-ライティング解析";

  • ライトカラーとの合成
     
    
    LightAccumulator_Add(LightAccumulator, SurfaceLighting, (1.0/PI), LightColor * (NoL * SurfaceAttenuation), bNeedsSeparateSubsurfaceLightAccumulation);
    • (NoL * SurfaceAttenuation) =
      Rendering-NoL.png * Rendering-SurfaceAttenuation.png = Rendering-NoL-x-SurfaceAttenuation.png
    • LightColor * (NoL * SurfaceAttenuation) =
      Rendering-LightColor.png * Rendering-NoL-x-SurfaceAttenuation.png = Rendering-LightColor-x-(NoL-x-SurfaceAttenuation).png

    ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS