浏览代码

- Fixed Smoothness maps on Lit/LayeredLit shaders

- Reduced default heightmap scale to 0.01 for Lit/LayeredLit shaders.
/main
Julien Ignace 8 年前
当前提交
c95f1451
共有 3 个文件被更改,包括 26 次插入6 次删除
  1. 4
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.shader
  2. 2
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSurfaceData.hlsl
  3. 26
      Assets/TestScenes/HDTest/GlobalIlluminationTest.unity

4
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.shader


_NormalMap("NormalMap", 2D) = "bump" {}
_HeightMap("HeightMap", 2D) = "black" {}
_HeightScale("Height Scale", Float) = 1
_HeightScale("Height Scale", Float) = 0.01
_HeightBias("Height Bias", Float) = 0
_TangentMap("TangentMap", 2D) = "bump" {}

_DetailMask("DetailMask", 2D) = "white" {}
_DetailAlbedoScale("_DetailAlbedoScale", Range(-2.0, 2.0)) = 1
_DetailNormalScale("_DetailNormalScale", Range(0.0, 2.0)) = 1
_DetailSmoothnessScale("_DetailSmoothnessScale", Range(-2.0, 2.0)) = 1
_DetailSmoothnessScale("_DetailSmoothnessScale", Range(-2.0, 2.0)) = 0.01
_DetailHeightScale("_DetailHeightScale", Range(-2.0, 2.0)) = 1
_DetailAOScale("_DetailAOScale", Range(-2.0, 2.0)) = 1

2
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/LitSurfaceData.hlsl


#else
surfaceData.perceptualSmoothness = 1.0;
#endif
surfaceData.perceptualSmoothness = ADD_IDX(_Smoothness);
surfaceData.perceptualSmoothness *= ADD_IDX(_Smoothness);
#ifdef _DETAIL_MAP
surfaceData.perceptualSmoothness *= LerpWhiteTo(2.0 * saturate(detailSmoothness * ADD_IDX(_DetailSmoothnessScale)), detailMask);
#endif

26
Assets/TestScenes/HDTest/GlobalIlluminationTest.unity


m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.5456174, g: 0.39782104, b: 0.24038851, a: 1}
m_IndirectSpecularColor: {r: 0.6238628, g: 0.56322443, b: 0.5425187, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0

m_Component:
- component: {fileID: 565152815}
- component: {fileID: 565152816}
- component: {fileID: 565152817}
m_Layer: 0
m_Name: Spotlight
m_TagString: Untagged

m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!114 &565152817
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 565152814}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
shadowResolution: 512
shadowDimmer: 1
affectDiffuse: 1
affectSpecular: 1
archetype: 0
isDoubleSided: 0
areaLightLength: 0
areaLightWidth: 0
--- !u!1 &841702834
GameObject:
m_ObjectHideFlags: 0

shadowDimmer: 1
affectDiffuse: 1
affectSpecular: 1
treatAsAreaLight: 0
archetype: 0
isDoubleSided: 0
areaLightLength: 0
areaLightWidth: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1543726725}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -6.33, y: 0.428, z: -5.0499997}
m_LocalPosition: {x: -6.33, y: 0.428, z: -4.84}
m_LocalScale: {x: 1.6119599, y: 1.6119599, z: 1.6119599}
m_Children: []
m_Father: {fileID: 1027688891}

正在加载...
取消
保存