浏览代码

Fixed most of the lightweight graphics tests.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
605dc966
共有 11 个文件被更改,包括 2908 次插入2179 次删除
  1. 241
      ImageTemplates/LightweightPipeline/Scenes/002_Camera_Clip.unity.png
  2. 619
      ImageTemplates/LightweightPipeline/Scenes/003_Camera_Ortho.unity.png
  3. 219
      ImageTemplates/LightweightPipeline/Scenes/004_Camera_TargetTexture.unity.png
  4. 999
      ImageTemplates/LightweightPipeline/Scenes/006_LitShaderLightProbes.unity.png
  5. 999
      ImageTemplates/LightweightPipeline/Scenes/007_LitShaderMaps.unity.png
  6. 999
      ImageTemplates/LightweightPipeline/Scenes/008_LitShaderReflection.unity.png
  7. 999
      ImageTemplates/LightweightPipeline/Scenes/009_LightweightShading.unity.png
  8. 2
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
  9. 2
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
  10. 6
      ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShader.shader
  11. 2
      Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/004_Camera_TargetTexture.unity

241
ImageTemplates/LightweightPipeline/Scenes/002_Camera_Clip.unity.png
文件差异内容过多而无法显示
查看文件

619
ImageTemplates/LightweightPipeline/Scenes/003_Camera_Ortho.unity.png
文件差异内容过多而无法显示
查看文件

219
ImageTemplates/LightweightPipeline/Scenes/004_Camera_TargetTexture.unity.png
文件差异内容过多而无法显示
查看文件

999
ImageTemplates/LightweightPipeline/Scenes/006_LitShaderLightProbes.unity.png
文件差异内容过多而无法显示
查看文件

999
ImageTemplates/LightweightPipeline/Scenes/007_LitShaderMaps.unity.png
文件差异内容过多而无法显示
查看文件

999
ImageTemplates/LightweightPipeline/Scenes/008_LitShaderReflection.unity.png
文件差异内容过多而无法显示
查看文件

999
ImageTemplates/LightweightPipeline/Scenes/009_LightweightShading.unity.png
文件差异内容过多而无法显示
查看文件

2
ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


// TODO: This is at the moment required for all pipes. We should not implicitly change user project settings
// instead this should be forced when using SRP, since all SRP use linear lighting.
GraphicsSettings.lightsUseLinearIntensity = true;
Debug.Log(GraphicsSettings.lightsUseLinearIntensity);
foreach (Camera camera in cameras)
{

if (!lightData.isSingleLight)
configuration |= RendererConfiguration.PerObjectLightIndices8;
PostProcessLayer postProcessLayer = GetCurrCameraPostProcessLayer();
bool postProcessEnabled = postProcessLayer != null && postProcessLayer.enabled;

2
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader


}
#endif
#ifdef _LIGHT_PROBES_ON
#if defined(_LIGHT_PROBES_ON) && !defined(LIGHTMAP_ON)
o.fogCoord.yzw += max(half3(0, 0, 0), ShadeSH9(half4(normal, 1)));
#endif

6
ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightStandardShader.shader


float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
o.posWS.xyz = worldPos;
half3 viewDir = normalize(_WorldSpaceCameraPos - worldPos);
o.viewDir.xyz = viewDir;
#ifndef _METALLICGLOSSMAP

o.posWS.w = Pow4(1 - saturate(dot(normal, viewDir))); // fresnel term
#ifdef _LIGHT_PROBES_ON
#if defined(_LIGHT_PROBES_ON) && !defined(LIGHTMAP_ON)
o.fogCoord.yzw += max(half3(0, 0, 0), ShadeSH9(half4(normal, 1)));
#endif

half3 specColor;
half3 diffColor = DiffuseAndSpecularFromMetallic(albedo, metallicGloss.x, specColor, oneMinusReflectivity);
half3 normal;
NormalMap(i, normal);

2
Tests/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/004_Camera_TargetTexture.unity


field of view: 15
orthographic: 0
orthographic size: 1.2
m_Depth: -1
m_Depth: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295

正在加载...
取消
保存