浏览代码

Merge pull request #31 from EvgeniiG/master

Add the basic impl. of light cookies
/main
GitHub 8 年前
当前提交
fe929a4c
共有 9 个文件被更改,包括 721 次插入106 次删除
  1. 5
      .gitignore
  2. 1
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset
  3. 47
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  4. 37
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs
  5. 36
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs.hlsl
  6. 30
      Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePass.hlsl
  7. 81
      Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.hlsl
  8. 10
      Assets/ScriptableRenderLoop/ShaderLibrary/AreaLighting.hlsl
  9. 580
      Assets/TestScenes/HDTest/HDRenderLoopTest.unity

5
.gitignore


Library/*
Temp/*
obj/*
*.csproj
*.sln
*.suo

*.aspx
*.sdf
*.userprefs
Assets/UnityHDRI.meta
Assets/UnityHDRI/Gareoult/GareoultWhiteBalanced.exr
obj/Debug/Assembly-CSharp.csproj.FileListAbsolute.txt

1
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset


rotation: 0
exposure: 0
multiplier: 1
skyResolution: 256
m_ShadowSettings:
enabled: 1
shadowAtlasWidth: 4096

47
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


var directionalLightData = new DirectionalLightData();
// Light direction for directional and is opposite to the forward direction
directionalLightData.direction = -light.light.transform.forward;
directionalLightData.direction = -light.light.transform.forward;
directionalLightData.up = light.light.transform.up;
directionalLightData.right = light.light.transform.right;
directionalLightData.positionWS = light.light.transform.position;
directionalLightData.invScaleX = 1.0f / light.light.transform.localScale.x;
directionalLightData.invScaleY = 1.0f / light.light.transform.localScale.y;
directionalLightData.cookieIndex = -1;
if (light.light.cookie != null)
{
directionalLightData.tileCookie = (light.light.cookie.wrapMode == TextureWrapMode.Repeat);
directionalLightData.cookieIndex = m_CookieTexArray.FetchSlice(light.light.cookie);
}
bool hasDirectionalShadows = light.light.shadows != LightShadows.None && shadowOutput.GetShadowSliceCountLightIndex(lightIndex) != 0;
bool hasDirectionalNotReachMaxLimit = lightList.directionalShadows.Count == 0; // Only one cascade shadow allowed

var innerConePercent = additionalData.GetInnerSpotPercent01();
var cosSpotOuterHalfAngle = Mathf.Clamp(Mathf.Cos(spotAngle * 0.5f * Mathf.Deg2Rad), 0.0f, 1.0f);
var sinSpotOuterHalfAngle = Mathf.Sqrt(1.0f - cosSpotOuterHalfAngle * cosSpotOuterHalfAngle);
// TODO: find a proper place to store the cotangent.
lightData.size.x = cosSpotOuterHalfAngle / sinSpotOuterHalfAngle;
}
else
{

lightData.cookieIndex = -1;
lightData.shadowIndex = -1;
bool hasCookie = light.light.cookie != null;
if (hasCookie)
if (light.light.cookie != null)
if (light.lightType == LightType.Point)
// TODO: add texture atlas support for cookie textures.
switch (light.lightType)
lightData.cookieIndex = m_CubeCookieTexArray.FetchSlice(light.light.cookie);
}
else if (light.lightType == LightType.Spot)
{
lightData.cookieIndex = m_CookieTexArray.FetchSlice(light.light.cookie);
case LightType.Spot:
lightData.cookieIndex = m_CookieTexArray.FetchSlice(light.light.cookie);
break;
case LightType.Point:
lightData.cookieIndex = m_CubeCookieTexArray.FetchSlice(light.light.cookie);
break;
}
}

}
}
lightData.size = new Vector2(additionalData.areaLightLength, additionalData.areaLightWidth);
lightData.twoSided = additionalData.isDoubleSided;
if (additionalData.archetype == LightArchetype.Punctual)
{
lightList.punctualLights.Add(lightData);

{
lightData.twoSided = additionalData.isDoubleSided;
lightData.size = new Vector2(additionalData.areaLightLength,
additionalData.areaLightWidth);
// Area and line lights are both currently stored as area lights on the GPU.
lightList.areaLights.Add(lightData);
lightList.areaCullIndices.Add(lightIndex);

public void PushGlobalParams(Camera camera, RenderLoop renderLoop, HDRenderLoop.LightList lightList)
{
//Shader.SetGlobalTexture("_CookieTextures", m_CookieTexArray.GetTexCache());
//Shader.SetGlobalTexture("_CubeCookieTextures", m_CubeCookieTexArray.GetTexCache());
Shader.SetGlobalTexture("_CookieTextures", m_CookieTexArray.GetTexCache());
Shader.SetGlobalTexture("_CookieCubeTextures", m_CubeCookieTexArray.GetTexCache());
Shader.SetGlobalTexture("_EnvTextures", m_CubeReflTexArray.GetTexCache());
if (m_SkyRenderer.IsSkyValid(m_SkyParameters))

37
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs


public enum GPULightType
{
Directional,
Spot,
Spot,
Point,
ProjectorOrtho,
ProjectorPyramid,

public float invSqrAttenuationRadius;
public Vector3 color;
public float angleScale; // Spot light
public float angleScale; // Spot light
public float angleOffset;
public float angleOffset; // Spot light
public float diffuseScale; // Spot light
public float diffuseScale;
public float shadowDimmer;
// index are -1 if not used
public int shadowIndex;

public GPULightType lightType;
public GPULightType lightType;
public Vector2 size;
public Vector2 size; // x = cot(outerHalfAngle) for spot lights
public bool twoSided;
};

public Vector3 direction;
public float diffuseScale;
public float diffuseScale;
public Vector3 up;
public float invScaleY;
public Vector3 right;
public float invScaleX;
public Vector3 positionWS;
public bool tileCookie;
public float specularScale;
public float specularScale;
// Sun disc size
public float cosAngle; // Distance to disk
public float sinAngle; // Disk radius
public int shadowIndex;
public float unused;
// Sun disc size
public float cosAngle; // Distance to the disk
public float sinAngle; // Disk radius
public int shadowIndex; // -1 if unused
public int cookieIndex; // -1 if unused
};

36
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs.hlsl


{
float3 direction;
float diffuseScale;
float3 up;
float invScaleY;
float3 right;
float invScaleX;
float3 positionWS;
bool tileCookie;
float unused;
int cookieIndex;
};
// Generated from UnityEngine.Experimental.ScriptableRenderLoop.PunctualShadowData

{
return value.diffuseScale;
}
float3 GetUp(DirectionalLightData value)
{
return value.up;
}
float GetInvScaleY(DirectionalLightData value)
{
return value.invScaleY;
}
float3 GetRight(DirectionalLightData value)
{
return value.right;
}
float GetInvScaleX(DirectionalLightData value)
{
return value.invScaleX;
}
float3 GetPositionWS(DirectionalLightData value)
{
return value.positionWS;
}
bool GetTileCookie(DirectionalLightData value)
{
return value.tileCookie;
}
float3 GetColor(DirectionalLightData value)
{
return value.color;

{
return value.shadowIndex;
}
float GetUnused(DirectionalLightData value)
int GetCookieIndex(DirectionalLightData value)
return value.unused;
return value.cookieIndex;
}
//

30
Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePass.hlsl


TEXTURE2D_ARRAY(_IESArray);
SAMPLER2D(sampler_IESArray);
// Used by directional and spot lights
TEXTURE2D_ARRAY(_CookieTextures);
SAMPLER2D(sampler_CookieTextures);
// Used by point lights
TEXTURECUBE_ARRAY(_CookieCubeTextures);
SAMPLERCUBE(sampler_CookieCubeTextures);
// Use texture array for reflection
TEXTURECUBE_ARRAY(_EnvTextures);
SAMPLERCUBE(sampler_EnvTextures);

// float3 shadowPosDY = ddy_fine(positionTXS);
return SAMPLE_TEXTURE2D_SHADOW(g_tShadowBuffer, samplerg_tShadowBuffer, positionTXS);
}
//-----------------------------------------------------------------------------
// Cookie sampling functions
// ----------------------------------------------------------------------------
#define SINGLE_PASS_CONTEXT_SAMPLE_COOKIE_TEXTURES 0
// Used by directional and spot lights.
// Returns the color in the RGB components, and the transparency (lack of occlusion) in A.
float4 SampleCookie2D(LightLoopContext lightLoopContext, float2 coord, int index)
{
return SAMPLE_TEXTURE2D_ARRAY_LOD(_CookieTextures, sampler_CookieTextures, coord, index, 0);
}
#define SINGLE_PASS_CONTEXT_SAMPLE_COOKIE_CUBE_TEXTURES 0
// Used by point lights.
// Returns the color in the RGB components, and the transparency (lack of occlusion) in A.
float4 SampleCookieCube(LightLoopContext lightLoopContext, float3 coord, int index)
{
return SAMPLE_TEXTURECUBE_ARRAY_LOD(_CookieCubeTextures, sampler_CookieCubeTextures, coord, index, 0);
}
//-----------------------------------------------------------------------------

81
Assets/ScriptableRenderLoop/HDRenderLoop/Material/Lit/Lit.hlsl


float3 L = lightData.direction;
float illuminance = saturate(dot(bsdfData.normalWS, L));
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float3 cookieColor = float3(1.0, 1.0, 1.0);
[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0f)
{

}
[branch] if (lightData.cookieIndex >= 0 && illuminance > 0.0)
{
float3 unL = positionWS - lightData.positionWS;
// Project 'unL' onto the light's axes.
float2 coord = float2(dot(unL, lightData.right), dot(unL, lightData.up));
// Rescale the texture.
coord.x *= lightData.invScaleX;
coord.y *= lightData.invScaleY;
// Remap the texture coordinates from [-1, 1]^2 to [0, 1]^2.
coord = coord * 0.5 + 0.5;
// Tile the texture if the 'repeat' wrap mode is enabled.
if (lightData.tileCookie) coord = frac(coord);
float4 cookie = SampleCookie2D(lightLoopContext, coord, lightData.cookieIndex);
cookieColor = cookie.rgb;
illuminance *= cookie.a;
}
diffuseLighting *= lightData.color * illuminance * lightData.diffuseScale;
specularLighting *= lightData.color * illuminance * lightData.specularScale;
diffuseLighting *= (cookieColor * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookieColor * lightData.color) * (illuminance * lightData.specularScale);
}
}

attenuation *= GetAngleAttenuation(L, -lightData.forward, lightData.angleScale, lightData.angleOffset);
float illuminance = saturate(dot(bsdfData.normalWS, L)) * attenuation;
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
diffuseLighting = float3(0.0, 0.0, 0.0);
specularLighting = float3(0.0, 0.0, 0.0);
float3 cookieColor = float3(1.0, 1.0, 1.0);
/*
[branch] if (lightData.cookieIndex && illuminance > 0.0f)
[branch] if (lightData.cookieIndex >= 0 && illuminance > 0.0)
illuminance *= SampleCookie(lightData.cookieIndex, lightToWorld, L);
// Rotate 'L' into the light space.
// We perform the negation because lights are oriented backwards (-Z).
float3 coord = mul(-L, transpose(lightToWorld));
float4 cookie;
[branch] if (lightData.lightType == GPULIGHTTYPE_SPOT)
{
// Perform the perspective projection of the hemisphere onto the disk.
coord.xy /= coord.z;
// Rescale the projective coordinates to fit into the [-1, 1]^2 range.
float cotOuterHalfAngle = lightData.size.x;
coord.xy *= cotOuterHalfAngle;
// Remap the texture coordinates from [-1, 1]^2 to [0, 1]^2.
coord.xy = coord.xy * 0.5 + 0.5;
cookie = SampleCookie2D(lightLoopContext, coord.xy, lightData.cookieIndex);
}
else // GPULIGHTTYPE_POINT
{
cookie = SampleCookieCube(lightLoopContext, coord, lightData.cookieIndex);
}
cookieColor = cookie.rgb;
illuminance *= cookie.a;
*/
[branch] if (lightData.IESIndex >= 0 && illuminance > 0.0f)
[branch] if (lightData.IESIndex >= 0 && illuminance > 0.0)
{
float3x3 lightToWorld = float3x3(lightData.right, lightData.up, lightData.forward);
float2 sphericalCoord = GetIESTextureCoordinate(lightToWorld, L);

[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0f)
[branch] if (lightData.shadowIndex >= 0 && illuminance > 0.0)
{
float3 offset = float3(0.0, 0.0, 0.0); // GetShadowPosOffset(nDotL, normal);
float shadowAttenuation = GetPunctualShadowAttenuation(lightLoopContext, positionWS + offset, lightData.shadowIndex, L, preLightData.unPositionSS);

}
[branch] if (illuminance > 0.0f)
[branch] if (illuminance > 0.0)
diffuseLighting *= lightData.color * illuminance * lightData.diffuseScale;
specularLighting *= lightData.color * illuminance * lightData.specularScale;
diffuseLighting *= (cookieColor * lightData.color) * (illuminance * lightData.diffuseScale);
specularLighting *= (cookieColor * lightData.color) * (illuminance * lightData.specularScale);
}
}

10
Assets/ScriptableRenderLoop/ShaderLibrary/AreaLighting.hlsl


float tLDDL2 = l2rcpD / (d * d + l2 * l2);
float intWt = LineFwt(tLDDL2, l2) - LineFwt(tLDDL1, l1);
float intP0 = LineFpo(tLDDL2, l2rcpD, rcp(d)) - LineFpo(tLDDL1, l1rcpD, rcp(d));
// Guard against numerical precision issues.
return max(intP0 * normal.z + intWt * tangent.z, 0.0);
return intP0 * normal.z + intWt * tangent.z;
}
// Computes 1.0 / length(mul(ortho, transpose(inverse(invM)))).

float width = ComputeLineWidthFactor(invM, B);
if (P2.z <= 0.0)
if (P1.z > P2.z)
// Convention: 'P2' is above the horizon.
// Convention: 'P2' is above 'P1', with the tangent pointing upwards.
Swap(P1, P2);
}

// Integrate the clamped cosine over the line segment.
float irradiance = LineIrradiance(l1, l2, P0, T);
return INV_PI * width * irradiance;
// Guard against numerical precision issues.
return max(INV_PI * width * irradiance, 0.0);
}
#endif // UNITY_AREA_LIGHTING_INCLUDED

580
Assets/TestScenes/HDTest/HDRenderLoopTest.unity


minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &68487706

m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 646b4ac0331f8e447bd20f06eba916a3, type: 3}
m_IsPrefabParent: 0
--- !u!1 &192903503
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 192903504}
- component: {fileID: 192903506}
- component: {fileID: 192903505}
m_Layer: 0
m_Name: Spot Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &192903504
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 192903503}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.05, y: -0.25, z: -2.0000005}
m_LocalScale: {x: 0, y: 0, z: 1.0000005}
m_Children: []
m_Father: {fileID: 2026378394}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &192903505
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 192903503}
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: 1
areaLightLength: 4
areaLightWidth: 2
--- !u!108 &192903506
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 192903503}
m_Enabled: 1
serializedVersion: 7
m_Type: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 50
m_Range: 6
m_SpotAngle: 60
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 2800000, guid: 32c4b9c8ddc1c5d49ac7d10122540447, type: 3}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &209784732
GameObject:
m_ObjectHideFlags: 0

m_Name:
m_EditorClassIdentifier:
worldRayleighColorRamp:
key0:
serializedVersion: 2
rgba: 4288243277
key1:
serializedVersion: 2
rgba: 4291598720
key2:
serializedVersion: 2
rgba: 0
key3:
serializedVersion: 2
rgba: 0
key4:
serializedVersion: 2
rgba: 0
key5:
serializedVersion: 2
rgba: 0
key6:
serializedVersion: 2
rgba: 0
key7:
serializedVersion: 2
rgba: 0
serializedVersion: 2
key0: {r: 0.3019608, g: 0.4, b: 0.6, a: 1}
key1: {r: 0.5019608, g: 0.6, b: 0.8, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0

worldRayleighExtinctionFactor: 1.1
worldRayleighIndirectScatter: 0.33
worldMieColorRamp:
key0:
serializedVersion: 2
rgba: 4286627826
key1:
serializedVersion: 2
rgba: 4294960895
key2:
serializedVersion: 2
rgba: 0
key3:
serializedVersion: 2
rgba: 0
key4:
serializedVersion: 2
rgba: 0
key5:
serializedVersion: 2
rgba: 0
key6:
serializedVersion: 2
rgba: 0
key7:
serializedVersion: 2
rgba: 0
serializedVersion: 2
key0: {r: 0.9490196, g: 0.7490196, b: 0.5019608, a: 1}
key1: {r: 1, g: 0.9019608, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0

heightPlaneShift: {x: 0, y: 0, z: 0}
heightNearScatterPush: 0
heightNormalDistance: 1000
atmosphericShaderOverride: {fileID: 0}
atmosphericShader: {fileID: 0}
depthTexture: 0
debugMode: 0
--- !u!1 &609148480
GameObject:

m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_Range: 12
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:

m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_Range: 12
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:

m_Father: {fileID: 1586360512}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &858501138
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 858501139}
- component: {fileID: 858501141}
- component: {fileID: 858501140}
m_Layer: 0
m_Name: Point Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &858501139
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 858501138}
m_LocalRotation: {x: -0, y: 0, z: -0, w: 1}
m_LocalPosition: {x: 0.25, y: -0, z: -2.72}
m_LocalScale: {x: 0, y: 0, z: 1}
m_Children: []
m_Father: {fileID: 2026378394}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &858501140
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 858501138}
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: 1
areaLightLength: 4
areaLightWidth: 2
--- !u!108 &858501141
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 858501138}
m_Enabled: 1
serializedVersion: 7
m_Type: 2
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 50
m_Range: 6
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 8900000, guid: 7daac0a2e2877f94fb9990a7e09d9691, type: 3}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &891124079
GameObject:
m_ObjectHideFlags: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1072084077}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1085128921
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1085128922}
- component: {fileID: 1085128924}
- component: {fileID: 1085128923}
m_Layer: 0
m_Name: Directional light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1085128922
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1085128921}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.3, y: 0, z: -2.0000005}
m_LocalScale: {x: 1, y: 1, z: 1.0000005}
m_Children: []
m_Father: {fileID: 2026378394}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!114 &1085128923
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1085128921}
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: 1
areaLightLength: 4
areaLightWidth: 2
--- !u!108 &1085128924
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1085128921}
m_Enabled: 1
serializedVersion: 7
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 10
m_Range: 6
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 2800000, guid: 32c4b9c8ddc1c5d49ac7d10122540447, type: 3}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &1124705054
GameObject:
m_ObjectHideFlags: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1269195139}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1279943772
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1279943773}
- component: {fileID: 1279943776}
- component: {fileID: 1279943775}
- component: {fileID: 1279943774}
m_Layer: 0
m_Name: Quad
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1279943773
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1279943772}
m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0.2515, y: 0.0954, z: -1.61}
m_LocalScale: {x: 0.3, y: 8, z: 1}
m_Children: []
m_Father: {fileID: 2026378394}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
--- !u!23 &1279943774
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1279943772}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f03665895dc89b84487310c5216b8458, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!64 &1279943775
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1279943772}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Convex: 0
m_InflateMesh: 0
m_SkinWidth: 0.01
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &1279943776
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1279943772}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1314842926
Prefab:
m_ObjectHideFlags: 0

m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1989256444}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &2015022933
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2015022934}
- component: {fileID: 2015022936}
- component: {fileID: 2015022935}
m_Layer: 0
m_Name: Spot Light (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2015022934
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2015022933}
m_LocalRotation: {x: -0.258819, y: 0, z: 0, w: 0.9659259}
m_LocalPosition: {x: -0.05, y: 0, z: -2}
m_LocalScale: {x: 0, y: 0, z: 1.0000005}
m_Children: []
m_Father: {fileID: 2026378394}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: -30, y: 0, z: 0}
--- !u!114 &2015022935
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2015022933}
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: 1
areaLightLength: 4
areaLightWidth: 2
--- !u!108 &2015022936
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2015022933}
m_Enabled: 1
serializedVersion: 7
m_Type: 0
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 50
m_Range: 6
m_SpotAngle: 60
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 2800000, guid: 32c4b9c8ddc1c5d49ac7d10122540447, type: 3}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &2018759379
GameObject:
m_ObjectHideFlags: 0

m_Children: []
m_Father: {fileID: 1269195140}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2026378390
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2026378394}
- component: {fileID: 2026378393}
- component: {fileID: 2026378392}
- component: {fileID: 2026378391}
m_Layer: 0
m_Name: Test - Light Cookies
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &2026378391
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2026378390}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f03665895dc89b84487310c5216b8458, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!64 &2026378392
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2026378390}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Convex: 0
m_InflateMesh: 0
m_SkinWidth: 0.01
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &2026378393
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2026378390}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &2026378394
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2026378390}
m_LocalRotation: {x: 0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: -125, y: -0, z: 36}
m_LocalScale: {x: 20, y: 12, z: 1}
m_Children:
- {fileID: 858501139}
- {fileID: 192903504}
- {fileID: 2015022934}
- {fileID: 1085128922}
- {fileID: 1279943773}
m_Father: {fileID: 0}
m_RootOrder: 27
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2028486192
GameObject:

正在加载...
取消
保存