Skip to content

Commit

Permalink
fix aniso vis term in vrender
Browse files Browse the repository at this point in the history
  • Loading branch information
What-a-stupid-username committed Sep 29, 2021
1 parent 7d862ca commit c645889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Example/Cornell/metal_ani.mat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Material:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
m_CustomRenderQueue: 2000
stringTagMap:
Quque: Geometry
disabledShaderPasses: []
Expand Down Expand Up @@ -52,11 +52,13 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AOScale: 1
- _AnisoStrength: 1
- _BumpScale: 0.05
- _ClearCoat: 0
- _Cull: 2
- _Cutoff: 0
- _Dinc: 1
- _DstBlend: 0
Expand All @@ -69,10 +71,12 @@ Material:
- _Metallic: 1
- _Mode: 0
- _Modified: 0
- _OIT: 0
- _Sheen: 0
- _Smoothness: 0.779
- _SrcBlend: 1
- _Subsurface: 0
- _Trans: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
Expand Down
2 changes: 1 addition & 1 deletion Lighting/Runtime/Resources/Shaders/Includes/PBS.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ float3 BRDF(const int type, const float3 diffColor, const float3 specColor, cons
X = cross(normal, Y);
float2 r2 = CalculateAnisoRoughness(roughness, aniso);
D = AnisoGGXTerm(nh, r2, floatDir, X, Y);
G = SmithJointAniso(r2, nv, nl, viewDir, lightDir, X, Y);
G = SmithJointAniso(r2, nv, nl, viewDir, lightDir, X, Y) * M_PI;
}
else{
roughness = max(roughness, 0.008);
Expand Down

0 comments on commit c645889

Please sign in to comment.