소스 검색

API changed to accomodate normal offset bias shadowmapping and this .azsl file needs to change (#235)

* the API changed for this, updating

Signed-off-by: mrieggeramzn <[email protected]>

* Setting vertex normal

Signed-off-by: mrieggeramzn <[email protected]>
mrieggeramzn 3 년 전
부모
커밋
ccb7f78231
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Materials/DynamicMaterialTest/EmissiveMaterial.azsl
  2. 1 0
      Shaders/StaticMesh.azsl

+ 1 - 1
Materials/DynamicMaterialTest/EmissiveMaterial.azsl

@@ -72,7 +72,7 @@ ForwardPassOutput MainPS(VSOutput IN)
     
     // Position, Normal, Roughness
     surface.position = IN.m_worldPosition.xyz;
-    surface.normal = normalize(IN.m_normal);
+    surface.normal = surface.vertexNormal = normalize(IN.m_normal);
     surface.roughnessLinear = 1.0f;
     surface.CalculateRoughnessA();
 

+ 1 - 0
Shaders/StaticMesh.azsl

@@ -70,6 +70,7 @@ VertexOutput MainVS(VertexInput input)
         DirectionalLightShadow::GetShadowCoords(
             lightIndex,
             worldPosition,
+            output.m_normal,
             output.m_shadowCoords);
     }