浏览代码

Merge pull request #1854 from Unity-Technologies/lw/light-attenuation

Light attenuation matching that of baked GI
/main
GitHub 6 年前
当前提交
3198eb4a
共有 23 个文件被更改,包括 3043 次插入1052 次删除
  1. 3
      TestProjects/LWGraphicsTest/ProjectSettings/EditorBuildSettings.asset
  2. 5
      com.unity.render-pipelines.lightweight/CHANGELOG.md
  3. 42
      com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs
  4. 76
      com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs
  5. 3
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Input.hlsl
  6. 43
      com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl
  7. 999
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/053_UnlitShader.png
  8. 999
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/053_UnlitShader.png
  9. 22
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/054_Lighting_Attenuation.png
  10. 88
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/054_Lighting_Attenuation.png.meta
  11. 17
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/054_Lighting_Attenuation.png
  12. 88
      com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/054_Lighting_Attenuation.png.meta
  13. 8
      com.unity.testing.srp.lightweight/Tests/Scenes/052_Lighting_Attenuation.meta
  14. 8
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.meta
  15. 1001
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.unity
  16. 7
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.unity.meta
  17. 8
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/LightingData.asset.meta
  18. 88
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_dir.png.meta
  19. 88
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_light.exr.meta
  20. 7
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/LightingData.asset
  21. 87
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_dir.png
  22. 408
      com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_light.exr

3
TestProjects/LWGraphicsTest/ProjectSettings/EditorBuildSettings.asset


- enabled: 1
path: Packages/com.unity.testing.srp.lightweight/Tests/Scenes/053_UnlitShader.unity
guid: a28e1d48e6e3c0e42a4050ab4e770bf8
- enabled: 1
path: Packages/com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.unity
guid: 93a99004f07ca6f4dbbc9ccb319c7698
m_configObjects: {}

5
com.unity.render-pipelines.lightweight/CHANGELOG.md


### Fixed
- Lightweight Unlit shader UI doesn't throw an error about missing receive shadow property anymore.
### Changed
- Change real-time attenuation to inverse square.
- Change attenuation for baked GI to inverse square, to match real-time attenuation.
- Small optimization in light attenuation shader code.
## [3.2.0-preview]
### Changed
- Receive Shadows property is now exposed in the material instead of in the renderer.

42
com.unity.render-pipelines.lightweight/LWRP/LightweightPipeline.cs


using System;
using System.Collections.Generic;
using Unity.Collections;
#if UNITY_EDITOR
using UnityEditor;
using UnityEditor.Experimental.Rendering.LightweightPipeline;

using UnityEngine.Experimental.GlobalIllumination;
using Lightmapping = UnityEngine.Experimental.GlobalIllumination.Lightmapping;
namespace UnityEngine.Experimental.Rendering.LightweightPipeline
{

QualitySettings.antiAliasing = m_PipelineSettings.msaaSampleCount;
Shader.globalRenderPipeline = "LightweightPipeline";
Lightmapping.SetDelegate(lightsDelegate);
}
public override void Dispose()

#endif
m_Renderer.Dispose();
Lightmapping.ResetDelegate();
}
public interface IBeforeCameraRender

Matrix4x4 invViewProjMatrix = Matrix4x4.Inverse(viewProjMatrix);
Shader.SetGlobalMatrix(PerCameraBuffer._InvCameraViewProj, invViewProjMatrix);
}
public static Lightmapping.RequestLightsDelegate lightsDelegate = (Light[] requests, NativeArray<LightDataGI> lightsOutput) =>
{
LightDataGI lightData = new LightDataGI();
for (int i = 0; i < requests.Length; i++)
{
Light light = requests[i];
switch (light.type)
{
case LightType.Directional:
DirectionalLight directionalLight = new DirectionalLight();
LightmapperUtils.Extract(light, ref directionalLight); lightData.Init(ref directionalLight);
break;
case LightType.Point:
PointLight pointLight = new PointLight();
LightmapperUtils.Extract(light, ref pointLight); lightData.Init(ref pointLight);
break;
case LightType.Spot:
SpotLight spotLight = new SpotLight();
LightmapperUtils.Extract(light, ref spotLight); lightData.Init(ref spotLight);
break;
case LightType.Area:
RectangleLight rectangleLight = new RectangleLight();
LightmapperUtils.Extract(light, ref rectangleLight); lightData.Init(ref rectangleLight);
break;
default:
lightData.InitNoBake(light.GetInstanceID());
break;
}
lightData.falloff = FalloffType.InverseSquared;
lightsOutput[i] = lightData;
}
};
}
}

76
com.unity.render-pipelines.lightweight/LWRP/Passes/SetupLightweightConstanstPass.cs


public static int _AdditionalLightCount;
public static int _AdditionalLightPosition;
public static int _AdditionalLightColor;
public static int _AdditionalLightDistanceAttenuation;
public static int _AdditionalLightAttenuation;
public static int _AdditionalLightSpotAttenuation;
public static int _LightIndexBuffer;
}

Vector4 k_DefaultLightPosition = new Vector4(0.0f, 0.0f, 1.0f, 0.0f);
Vector4 k_DefaultLightColor = Color.black;
Vector4 k_DefaultLightAttenuation = new Vector4(0.0f, 1.0f, 0.0f, 1.0f);
Vector4 k_DefaultLightAttenuation = new Vector4(1.0f, 0.0f, 0.0f, 1.0f);
Vector4 k_DefaultLightSpotAttenuation = new Vector4(0.0f, 1.0f, 0.0f, 0.0f);
Vector4[] m_LightDistanceAttenuations;
Vector4[] m_LightAttenuations;
Vector4[] m_LightSpotAttenuations;
private int maxVisibleLocalLights { get; set; }
private ComputeBuffer perObjectLightIndices { get; set; }

LightConstantBuffer._AdditionalLightCount = Shader.PropertyToID("_AdditionalLightCount");
LightConstantBuffer._AdditionalLightPosition = Shader.PropertyToID("_AdditionalLightPosition");
LightConstantBuffer._AdditionalLightColor = Shader.PropertyToID("_AdditionalLightColor");
LightConstantBuffer._AdditionalLightDistanceAttenuation = Shader.PropertyToID("_AdditionalLightDistanceAttenuation");
LightConstantBuffer._AdditionalLightAttenuation = Shader.PropertyToID("_AdditionalLightAttenuation");
LightConstantBuffer._AdditionalLightSpotAttenuation = Shader.PropertyToID("_AdditionalLightSpotAttenuation");
m_LightDistanceAttenuations = new Vector4[0];
m_LightAttenuations = new Vector4[0];
m_LightSpotAttenuations = new Vector4[0];
}
public void Setup(int maxVisibleLocalLights, ComputeBuffer perObjectLightIndices)

{
m_LightPositions = new Vector4[maxVisibleLocalLights];
m_LightColors = new Vector4[maxVisibleLocalLights];
m_LightDistanceAttenuations = new Vector4[maxVisibleLocalLights];
m_LightAttenuations = new Vector4[maxVisibleLocalLights];
m_LightSpotAttenuations = new Vector4[maxVisibleLocalLights];
void InitializeLightConstants(List<VisibleLight> lights, int lightIndex, out Vector4 lightPos, out Vector4 lightColor, out Vector4 lightDistanceAttenuation, out Vector4 lightSpotDir,
out Vector4 lightSpotAttenuation)
void InitializeLightConstants(List<VisibleLight> lights, int lightIndex, out Vector4 lightPos, out Vector4 lightColor, out Vector4 lightAttenuation, out Vector4 lightSpotDir)
lightDistanceAttenuation = k_DefaultLightSpotAttenuation;
lightAttenuation = k_DefaultLightAttenuation;
lightSpotAttenuation = k_DefaultLightAttenuation;
float subtractiveMixedLighting = 0.0f;
// When no lights are visible, main light will be set to -1.
// In this case we initialize it to default values and return

else
{
Vector4 pos = lightData.localToWorld.GetColumn(3);
lightPos = new Vector4(pos.x, pos.y, pos.z, 1.0f);
lightPos = new Vector4(pos.x, pos.y, pos.z, 0.0f);
}
// VisibleLight.finalColor already returns color in active color space

if (lightData.lightType != LightType.Directional)
{
// Light attenuation in lightweight matches the unity vanilla one.
// attenuation = 1.0 / 1.0 + distanceToLightSqr * quadraticAttenuation
// then a smooth factor is applied to linearly fade attenuation to light range
// the attenuation smooth factor starts having effect at 80% of light range
// attenuation = 1.0 / distanceToLightSqr
// We offer two different smoothing factors.
// The smoothing factors make sure that the light intensity is zero at the light range limit.
// The first smoothing factor is a linear fade starting at 80 % of the light range.
// The other smoothing factor matches the one used in the Unity lightmapper but is slower than the linear one.
// smoothFactor = (1.0 - saturate((distanceSqr * 1.0 / lightrangeSqr)^2))^2
float quadAtten = 25.0f / lightRangeSqr;
lightDistanceAttenuation = new Vector4(quadAtten, oneOverFadeRangeSqr, lightRangeSqrOverFadeRangeSqr, 1.0f);
float oneOverLightRangeSqr = 1.0f / Mathf.Max(0.0001f, lightData.range * lightData.range);
// On mobile: Use the faster linear smoothing factor.
// On other devices: Use the smoothing factor that matches the GI.
lightAttenuation.x = Application.isMobilePlatform ? oneOverFadeRangeSqr : oneOverLightRangeSqr;
lightAttenuation.y = lightRangeSqrOverFadeRangeSqr;
subtractiveMixedLighting = 1.0f;
}
if (lightData.lightType == LightType.Spot)

float smoothAngleRange = Mathf.Max(0.001f, cosInnerAngle - cosOuterAngle);
float invAngleRange = 1.0f / smoothAngleRange;
float add = -cosOuterAngle * invAngleRange;
lightSpotAttenuation = new Vector4(invAngleRange, add, 0.0f);
lightAttenuation.z = invAngleRange;
lightAttenuation.w = add;
}
Light light = lightData.light;

if (m_MixedLightingSetup == MixedLightingSetup.None && lightData.light.shadows != LightShadows.None)
{
m_MixedLightingSetup = MixedLightingSetup.Subtractive;
lightDistanceAttenuation.w = 0.0f;
subtractiveMixedLighting = 0.0f;
// Use the w component of the light position to indicate subtractive mixed light mode.
// The only directional light is the main light, and the rest are punctual lights.
// The main light will always have w = 0 and the additional lights have w = 1.
lightPos.w = subtractiveMixedLighting;
}
void SetupShaderLightConstants(CommandBuffer cmd, ref LightData lightData)

InitializeLightConstants(lightData.visibleLights, -1, out m_LightPositions[i],
out m_LightColors[i],
out m_LightDistanceAttenuations[i],
out m_LightSpotDirections[i],
out m_LightSpotAttenuations[i]);
out m_LightAttenuations[i],
out m_LightSpotDirections[i]);
m_MixedLightingSetup = MixedLightingSetup.None;

void SetupMainLightConstants(CommandBuffer cmd, ref LightData lightData)
{
Vector4 lightPos, lightColor, lightDistanceAttenuation, lightSpotDir, lightSpotAttenuation;
Vector4 lightPos, lightColor, lightAttenuation, lightSpotDir;
InitializeLightConstants(lightData.visibleLights, lightData.mainLightIndex, out lightPos, out lightColor, out lightDistanceAttenuation, out lightSpotDir, out lightSpotAttenuation);
InitializeLightConstants(lightData.visibleLights, lightData.mainLightIndex, out lightPos, out lightColor, out lightAttenuation, out lightSpotDir);
if (lightData.mainLightIndex >= 0)
{

}
}
cmd.SetGlobalVector(LightConstantBuffer._MainLightPosition, new Vector4(lightPos.x, lightPos.y, lightPos.z, lightDistanceAttenuation.w));
cmd.SetGlobalVector(LightConstantBuffer._MainLightPosition, lightPos);
cmd.SetGlobalVector(LightConstantBuffer._MainLightColor, lightColor);
}

{
InitializeLightConstants(lights, i, out m_LightPositions[localLightsCount],
out m_LightColors[localLightsCount],
out m_LightDistanceAttenuations[localLightsCount],
out m_LightSpotDirections[localLightsCount],
out m_LightSpotAttenuations[localLightsCount]);
out m_LightAttenuations[localLightsCount],
out m_LightSpotDirections[localLightsCount]);
localLightsCount++;
}
}

cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightPosition, m_LightPositions);
cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightColor, m_LightColors);
cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightDistanceAttenuation, m_LightDistanceAttenuations);
cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightAttenuation, m_LightAttenuations);
cmd.SetGlobalVectorArray(LightConstantBuffer._AdditionalLightSpotAttenuation, m_LightSpotAttenuations);
}
void SetShaderKeywords(CommandBuffer cmd, ref CameraData cameraData, ref LightData lightData, ref ShadowData shadowData)

3
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Input.hlsl


half4 _AdditionalLightCount;
float4 _AdditionalLightPosition[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightColor[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightDistanceAttenuation[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightAttenuation[MAX_VISIBLE_LIGHTS];
half4 _AdditionalLightSpotAttenuation[MAX_VISIBLE_LIGHTS];
CBUFFER_END
#if USE_STRUCTURED_BUFFER_FOR_LIGHT_DATA

43
com.unity.render-pipelines.lightweight/LWRP/ShaderLibrary/Lighting.hlsl


{
float4 position;
half3 color;
half4 distanceAttenuation;
half4 distanceAndSpotAttenuation;
half4 spotAttenuation;
};
// Abstraction over Light shading data.

// Matches Unity Vanila attenuation
// Attenuation smoothly decreases to light range.
half DistanceAttenuation(half distanceSqr, half3 distanceAttenuation)
half DistanceAttenuation(half distanceSqr, half2 distanceAttenuation)
half quadFalloff = distanceAttenuation.x;
half denom = distanceSqr * quadFalloff + 1.0h;
half lightAtten = 1.0h / denom;
half lightAtten = 1.0h / distanceSqr;
#if defined(SHADER_HINT_NICE_QUALITY)
// Use the smoothing factor also used in the Unity lightmapper.
half factor = distanceSqr * distanceAttenuation.x;
half smoothFactor = saturate(1.0h - factor * factor);
smoothFactor = smoothFactor * smoothFactor;
#else
// We need to smoothly fade attenuation to light range. We start fading linearly at 80% of light range
// Therefore:
// fadeDistance = (0.8 * 0.8 * lightRangeSq)

// distanceSqr * distanceAttenuation.y + distanceAttenuation.z
half smoothFactor = saturate(distanceSqr * distanceAttenuation.y + distanceAttenuation.z);
half smoothFactor = saturate(distanceSqr * distanceAttenuation.x + distanceAttenuation.y);
#endif
half SpotAttenuation(half3 spotDirection, half3 lightDirection, half4 spotAttenuation)
half SpotAttenuation(half3 spotDirection, half3 lightDirection, half2 spotAttenuation)
{
// Spot Attenuation with a linear falloff can be defined as
// (SdotL - cosOuterAngle) / (cosInnerAngle - cosOuterAngle)

float distanceSqr = max(dot(posToLightVec, posToLightVec), FLT_MIN);
directionAndAttenuation.xyz = half3(posToLightVec * rsqrt(distanceSqr));
directionAndAttenuation.w = DistanceAttenuation(distanceSqr, lightInput.distanceAttenuation.xyz);
directionAndAttenuation.w *= SpotAttenuation(lightInput.spotDirection.xyz, directionAndAttenuation.xyz, lightInput.spotAttenuation);
return directionAndAttenuation;
}
half4 GetMainLightDirectionAndAttenuation(LightInput lightInput, float3 positionWS)
{
half4 directionAndAttenuation = GetLightDirectionAndAttenuation(lightInput, positionWS);
// Cookies disabled for now due to amount of shader variants
//directionAndAttenuation.w *= CookieAttenuation(positionWS);
directionAndAttenuation.w = DistanceAttenuation(distanceSqr, lightInput.distanceAndSpotAttenuation.xy);
directionAndAttenuation.w *= SpotAttenuation(lightInput.spotDirection.xyz, directionAndAttenuation.xyz, lightInput.distanceAndSpotAttenuation.zw);
return directionAndAttenuation;
}

// dynamic indexing. Ideally we need to configure light data at a cluster of
// objects granularity level. We will only be able to do that when scriptable culling kicks in.
// TODO: Use StructuredBuffer on PC/Console and profile access speed on mobile that support it.
lightInput.position = _AdditionalLightPosition[lightIndex];
float4 positionAndSubtractiveLightMode = _AdditionalLightPosition[lightIndex];
lightInput.position = float4(positionAndSubtractiveLightMode.xyz, 1.);
lightInput.distanceAttenuation = _AdditionalLightDistanceAttenuation[lightIndex];
lightInput.distanceAndSpotAttenuation = _AdditionalLightAttenuation[lightIndex];
lightInput.spotAttenuation = _AdditionalLightSpotAttenuation[lightIndex];
half4 directionAndRealtimeAttenuation = GetLightDirectionAndAttenuation(lightInput, positionWS);

light.attenuation = directionAndRealtimeAttenuation.w;
light.subtractiveModeAttenuation = lightInput.distanceAttenuation.w;
light.subtractiveModeAttenuation = positionAndSubtractiveLightMode.w;
light.color = lightInput.color;
return light;

999
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/053_UnlitShader.png
文件差异内容过多而无法显示
查看文件

999
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/053_UnlitShader.png
文件差异内容过多而无法显示
查看文件

22
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/054_Lighting_Attenuation.png

之前 之后
宽度: 640  |  高度: 360  |  大小: 21 KiB

88
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/OSXEditor/Metal/054_Lighting_Attenuation.png.meta


fileFormatVersion: 2
guid: 77454810ee6d94b4f8e94a5db6b50f60
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

17
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/054_Lighting_Attenuation.png
文件差异内容过多而无法显示
查看文件

88
com.unity.testing.srp.lightweight/Tests/ReferenceImages/Linear/WindowsEditor/Direct3D11/054_Lighting_Attenuation.png.meta


fileFormatVersion: 2
guid: e07d781d2760434448497ef86cd0d485
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.testing.srp.lightweight/Tests/Scenes/052_Lighting_Attenuation.meta


fileFormatVersion: 2
guid: 12028400f279f18429395c8b46a8b90b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.meta


fileFormatVersion: 2
guid: 079312de60075284cb8f893462f9b6f8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.unity
文件差异内容过多而无法显示
查看文件

7
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation.unity.meta


fileFormatVersion: 2
guid: 93a99004f07ca6f4dbbc9ccb319c7698
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/LightingData.asset.meta


fileFormatVersion: 2
guid: 56ea575a5cc3efc4f9ffc9f1b53eb566
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 25800000
userData:
assetBundleName:
assetBundleVariant:

88
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_dir.png.meta


fileFormatVersion: 2
guid: 4d3edf7b91d25034c888da1f58ae39e7
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 3
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

88
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_light.exr.meta


fileFormatVersion: 2
guid: 3e6496c2664a90341b98b6a16d506002
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 7
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 1
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 3
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 0
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 6
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 2
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

7
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/LightingData.asset


5�9H62018.3.0b1�������-%)oZæu���_��7���������� E� ��"�.�+�4a� ��"�.�+���r� ��" �.�+
�H������� �1�1����� @��� Q�j�IX�����_z�������������1�1�����@����j�P������������������������0������" ��&!��*"��.#��2$��6%��:&��>'��B(��F)��J����*�1�1�����+@���,��j� - ��U. ��W/ ��Y0 ��[����1�1�1�����2@���3gj�4u}5���6���7���8���9���:���;���<���=���>���?���@���A���B���C��D��E��F��#G��*����H�1�1�����I@���J��j� K ��UL ��WM ��YN ��6����O1�1�����P���Q�j�Ru��S���T���U���V���W���X���Y���Z���[���\���]���^���_���`���a��b��c��
�d��[����e�1�1�����f@���goj�lh���i���j���k���l���m���n���o���p���q���r���s���t���u���v���w���x���y���z��{�� |��}��~����%���,���3���:���A������1�1������@����Wj������;�k�����1�1������������j��;�������1�1������������j��;�������1�1����������5�j��LightProbesPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>LightProbeDatam_DataProbeSetTetrahedralizationm_Tetrahedralizationm_TetrahedraTetrahedronindices[0]indices[1]indices[2]indices[3]neighbors[0]neighbors[1]neighbors[2]neighbors[3]Matrix3x4fmatrixe00e01e02e03e10e11e12e13e20e21e22e23m_HullRaysxyzm_ProbeSetsProbeSetIndexHash128m_Hashbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]m_Offsetm_Sizem_Positionsm_NonTetrahedralizedProbeSetIndexMapm_BakedCoefficientsSphericalHarmonicsL2sh[ 0]sh[ 1]sh[ 2]sh[ 3]sh[ 4]sh[ 5]sh[ 6]sh[ 7]sh[ 8]sh[ 9]sh[10]sh[11]sh[12]sh[13]sh[14]sh[15]sh[16]sh[17]sh[18]sh[19]sh[20]sh[21]sh[22]sh[23]sh[24]sh[25]sh[26]m_BakedLightOcclusionLightProbeOcclusionm_ProbeOcclusionLightIndexm_Occlusionm_OcclusionMaskChannel`���I���]�O楃_���5�7����������E� ��(�.�1�:a� ��(�.�1���r� ��( �.�1
�H������� �1�1����� @��� Q�j�O` ��(�.�1���h�����1�1�����@���tj�$��� ��(�.�1���� ��(�.�1���� ��(�.�1���������1�1����� ����!H�j�����"�1�1�����#@���$Q�j�%�� &��('�.�1(����)�l*��+��%,��,-��3.��:/��A0��H1��O2��V3��]4��d5��k6��r7��y8���9���:���;���<���=���>���?���@���A���B���C���D���E�������F�1�1�����G@���H�j�`I  J��(K�.�1L���M ��'N ��)O ��+P ��-Q ��/R ��'S ��)T ��+U ��-V ��GW��UX��jY ��'Z ��)[ ��+\ ��-] ��u^ ��'_ ��)` ��+a ��-b ��c���d���e���f���g���h���i���j���k���l���m���n��o��p��q��&r��0s��:����t�1�1�����u@���vWj�w.�mx.�zy������z��������{�1�1�����|@���}�j�@~y�� ��(��.�1������ ��'� ��)� ��+� ��-� ����
��������������������������������������������������������&���0�������������������������������������������������������������������������&����0����$������1�1������@����.j�4���I���W���d���o���|�����������������������������������������������������������&���0�����������������������������������������������������������&���0����������1�1������@�����j���������������������������������������������������������&���0����������1�1������@�����j����������������������������������������������������������������&���0������� �����1�1�����@���j� �����=��J��W�����1�1�����@��� Wj�
.�m .�z ��z���� �1�1�����@���Wj�.�m.�z��������1�1����������j��������������� L�@��%�����1�1���������H�j����� �1�1�����!@���"Q�j�#��M����$�1�1�����%@���&��j� '��((�.�1)���l����*�1�1�����+@���,Wj�-.�m..�z/�������0�1�1�����1@���2��j�3���4LightingDataAssetPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>PPtr<SceneAsset>m_Scenem_LightmapsLightmapDatam_Lightmapm_DirLightmapm_ShadowMaskm_LightmapsCacheFilesPPtr<LightProbes>m_LightProbesm_LightmapsModeSphericalHarmonicsL2m_BakedAmbientProbeInLinearsh[ 0]sh[ 1]sh[ 2]sh[ 3]sh[ 4]sh[ 5]sh[ 6]sh[ 7]sh[ 8]sh[ 9]sh[10]sh[11]sh[12]sh[13]sh[14]sh[15]sh[16]sh[17]sh[18]sh[19]sh[20]sh[21]sh[22]sh[23]sh[24]sh[25]sh[26]m_LightmappedRendererDataRendererDataPPtr<Mesh>uvMeshterrainDynamicUVSTxyzwterrainChunkDynamicUVSTlightmapIndexlightmapIndexDynamiclightmapSTlightmapSTDynamicHash128explicitProbeSetHashbytes[0]bytes[1]bytes[2]bytes[3]bytes[4]bytes[5]bytes[6]bytes[7]bytes[8]bytes[9]bytes[10]bytes[11]bytes[12]bytes[13]bytes[14]bytes[15]m_LightmappedRendererDataIDsSceneObjectIdentifiertargetObjecttargetPrefabEnlightenSceneMappingm_EnlightenSceneMappingm_RenderersEnlightenRendererInformationrendererdynamicLightmapSTInSystemsystemIdinstanceHashgeometryHashm_SystemsEnlightenSystemInformationrendererIndexrendererSizeatlasIndexatlasOffsetXatlasOffsetYinputSystemHashradiositySystemHashm_Probesetsm_SystemAtlasesEnlightenSystemAtlasInformationatlasSizeatlasHashfirstSystemIdm_TerrainChunksEnlightenTerrainChunksInformationnumChunksInXnumChunksInYm_EnlightenSceneMappingRendererIDsm_Lightsm_LightBakingOutputsLightBakingOutputprobeOcclusionLightIndexocclusionMaskChannelLightmapBakeModelightmapBakeModelightmapBakeTypemixedLightingModeisBakedm_BakedReflectionProbeCubemapCacheFilesm_BakedReflectionProbeCubemapsm_BakedReflectionProbesm_EnlightenDatam_EnlightenDataVersion@��T��X�9� @�jO��ɼ�g��Fi,f� C��k� ����-C�������~ LightingDataLightingData-0 !"��*��*@���?�?�?�?���>�>�?�?�?�?�?�?����->��->J?�?�?�?�?�?�?���>�>�>�?�?4$� ���7G4Pn��g����;UnityFS5.x.x2018.3.0b1;
�Pp

87
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_dir.png

之前 之后
宽度: 512  |  高度: 512  |  大小: 21 KiB

408
com.unity.testing.srp.lightweight/Tests/Scenes/054_Lighting_Attenuation/Lightmap-0_comp_light.exr
文件差异内容过多而无法显示
查看文件

正在加载...
取消
保存