浏览代码

Fixes to skymanager and decaldata lifted from p4

/sample_game
Peter Andreasen 7 年前
当前提交
27da3d9e
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/DecalData.hlsl
  2. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Material/Decal/DecalData.hlsl


texCoord.uv = texCoordDS.xy;
#if _NORMALMAP
surfaceData.normalWS.xyz = mul((float3x3)_DecalToWorldR, SAMPLE_UVMAPPING_NORMALMAP(_NormalMap, sampler_NormalMap, texCoord, 1)) * 0.5f + 0.5f;
surfaceData.normalWS.w = totalBlend;
surfaceData.normalWS.w = surfaceData.baseColor.w;
surfaceData.mask = SAMPLE_TEXTURE2D(_MaskMap, sampler_MaskMap, texCoordDS.xy);
surfaceData.mask.z = totalBlend;
surfaceData.mask = 2*(SAMPLE_TEXTURE2D(_MaskMap, sampler_MaskMap, texCoordDS.xy));
surfaceData.mask.z = surfaceData.baseColor.w;
#endif
}

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs


UpdateSkyTypes();
UpdateCurrentSkySettings(camera);
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, sunLight, m_UpdateRequired, cmd);
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, null, m_UpdateRequired, cmd);
SkyUpdateContext currentSky = m_LightingOverrideSky.IsValid() ? m_LightingOverrideSky : m_VisualSky;
m_NeedUpdateRealtimeEnv = m_SkyRenderingContext.UpdateEnvironment(currentSky, camera, sunLight, m_UpdateRequired, cmd);

正在加载...
取消
保存