Filip Iliescu
8 年前
当前提交
4adbf45e
共有 125 个文件被更改,包括 4692 次插入 和 2712 次删除
-
2Assets/GraphicsTests/Framework/Editor/TestFramework.cs
-
3Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/2D/Common/box.prefab
-
208Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/2D/SpriteDemo.unity
-
938Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/MultiplePointLights.unity
-
3Assets/ScriptableRenderPipeline/Core/Debugging/DebugActionManager.cs
-
125Assets/ScriptableRenderPipeline/Core/Shadow/Shadow.cs
-
34Assets/ScriptableRenderPipeline/Core/Shadow/ShadowBase.cs
-
2Assets/ScriptableRenderPipeline/Core/Shadow/ShadowBase.cs.hlsl
-
67Assets/ScriptableRenderPipeline/Core/TextureCache.cs
-
74Assets/ScriptableRenderPipeline/Fptl/FptlLighting.cs
-
2Assets/ScriptableRenderPipeline/Fptl/LightDefinitions.cs.hlsl
-
16Assets/ScriptableRenderPipeline/Fptl/LightingTemplate.hlsl
-
4Assets/ScriptableRenderPipeline/Fptl/ShadowDispatch.hlsl
-
5Assets/ScriptableRenderPipeline/HDRenderPipeline/AdditionalData/HDAdditionalLightData.cs
-
47Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs
-
11Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.cs.hlsl
-
39Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplay.hlsl
-
124Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugFullScreen.shader
-
40Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugViewTiles.shader
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Debug/LightingDebugPanel.cs
-
18Assets/ScriptableRenderPipeline/HDRenderPipeline/Editor/HDRenderPipelineInspector.cs
-
655Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
12Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.asset
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipelineAsset.cs
-
66Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/AmbientOcclusion/ScreenSpaceAmbientOcclusion.cs
-
66Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs
-
180Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightDefinition.cs.hlsl
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/ShadowDispatch.hlsl
-
702Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
-
22Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs.hlsl
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.hlsl
-
73Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePassLoop.hlsl
-
14Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/builddispatchindirect.compute
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/lightlistbuild.compute
-
7Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/materialflags.compute
-
68Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/shadeopaque.compute
-
33Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.cs.hlsl
-
702Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataInternal.hlsl
-
39Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitTessellation.hlsl
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CombineSubsurfaceScattering.shader
-
20Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SubsurfaceScatteringProfile.cs
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/RenderPipelineMaterial.cs
-
43Assets/ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/CameraMotionVectors.shader
-
6Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderConfig.cs
-
1Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderConfig.cs.hlsl
-
1Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassForward.hlsl
-
37Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassLightTransport.hlsl
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassVelocity.hlsl
-
2Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/VertMesh.hlsl
-
4Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderVariables.hlsl
-
47Assets/ScriptableRenderPipeline/HDRenderPipeline/ShaderVariablesFunctions.hlsl
-
9Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/HDRISkyRenderer.cs
-
8Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/ProceduralSky/ProceduralSkyRenderer.cs
-
35Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/RuntimeFilterIBL.cs
-
114Assets/ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs
-
162Assets/ScriptableRenderPipeline/HDRenderPipeline/Utilities.cs
-
44Assets/ScriptableRenderPipeline/LightweightPipeline/Editor/LightweightAssetInspector.cs
-
170Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs
-
6Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.asset
-
26Assets/ScriptableRenderPipeline/LightweightPipeline/LightweightPipelineAsset.cs
-
4Assets/ScriptableRenderPipeline/LightweightPipeline/Materials/Lightweight-Default.mat
-
4Assets/ScriptableRenderPipeline/LightweightPipeline/Materials/Lightweight-DefaultSprite.mat
-
19Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipeline.shader
-
2Assets/ScriptableRenderPipeline/LightweightPipeline/Shaders/LightweightPipelineCore.cginc
-
50Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/LDRenderPipelineBasicScene.unity
-
12Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/Materials/LDRenderPipeMaterials/MobilePlane.mat
-
17Assets/ScriptableRenderPipeline/LightweightPipeline/TestScenes/Textures/154.JPG.meta
-
3Assets/ScriptableRenderPipeline/ShaderLibrary/AreaLighting.hlsl
-
28Assets/ScriptableRenderPipeline/ShaderLibrary/Common.hlsl
-
6Assets/ScriptableRenderPipeline/ShaderLibrary/CommonMaterial.hlsl
-
16Assets/ScriptableRenderPipeline/ShaderLibrary/Packing.hlsl
-
12Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/Shadow.hlsl
-
78Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithms.hlsl
-
10Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowAlgorithmsCustom.hlsl
-
2Assets/ScriptableRenderPipeline/ShaderLibrary/Shadow/ShadowMoments.hlsl
-
12Assets/ScriptableRenderPipeline/ShaderLibrary/Tessellation.hlsl
-
195Assets/TestScenes/HDTest/BasicProfiling.unity
-
287Assets/TestScenes/HDTest/CascadedShadowsTest.unity
-
593Assets/TestScenes/HDTest/HDRenderLoopTest.unity
-
3Assets/TestScenes/HDTest/Material/StandardShaderMaterials/Gray.mat
-
3Assets/TestScenes/HDTest/Material/StandardShaderMaterials/Green.mat
-
3Assets/TestScenes/HDTest/Material/StandardShaderMaterials/Red.mat
-
3Assets/TestScenes/HDTest/Material/StandardShaderMaterials/Std_Blue_Emissive.mat
-
404Assets/Textures/Batman.png
-
2ProjectSettings/ProjectVersion.txt
-
7README.md
-
10Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Assets/Scripts.meta
-
10Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/Materials.meta
-
248Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitReference.hlsl
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitReference.hlsl.meta
-
58Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Resources/CopyStencilBuffer.shader.meta
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/SSSProfile/Resources.meta
-
10Assets/ScriptableRenderPipeline/HDRenderPipeline/Resources.meta
-
79Assets/ScriptableRenderPipeline/LightweightPipeline/Materials/Lightweight-DefaultETC1.mat
-
10Assets/ScriptableRenderPipeline/LightweightPipeline/Materials/Lightweight-DefaultETC1.mat.meta
208
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/2D/SpriteDemo.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
938
Assets/GraphicsTests/RenderPipeline/LightweightPipeline/Scenes/MultiplePointLights.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
702
Assets/ScriptableRenderPipeline/HDRenderPipeline/Lighting/TilePass/TilePass.cs
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
287
Assets/TestScenes/HDTest/CascadedShadowsTest.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
593
Assets/TestScenes/HDTest/HDRenderLoopTest.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
m_EditorVersion: 2017.2.0b1 |
|||
m_EditorVersion: 2017.3.0a2 |
|
|||
fileFormatVersion: 2 |
|||
guid: ac5e33c9370558b4d88db4eca81a4c4f |
|||
folderAsset: yes |
|||
timeCreated: 1498746585 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 53a4327b506073b47b9c4e843d28f306 |
|||
folderAsset: yes |
|||
timeCreated: 1498824718 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
//----------------------------------------------------------------------------- |
|||
// EvaluateBSDF_Line - Reference |
|||
//----------------------------------------------------------------------------- |
|||
|
|||
void IntegrateBSDF_LineRef(float3 V, float3 positionWS, |
|||
PreLightData preLightData, LightData lightData, BSDFData bsdfData, |
|||
out float3 diffuseLighting, out float3 specularLighting, |
|||
int sampleCount = 128) |
|||
{ |
|||
diffuseLighting = float3(0.0, 0.0, 0.0); |
|||
specularLighting = float3(0.0, 0.0, 0.0); |
|||
|
|||
const float len = lightData.size.x; |
|||
const float3 T = lightData.right; |
|||
const float3 P1 = lightData.positionWS - T * (0.5 * len); |
|||
const float dt = len * rcp(sampleCount); |
|||
const float off = 0.5 * dt; |
|||
|
|||
// Uniformly sample the line segment with the Pdf = 1 / len. |
|||
const float invPdf = len; |
|||
|
|||
for (int i = 0; i < sampleCount; ++i) |
|||
{ |
|||
// Place the sample in the middle of the interval. |
|||
float t = off + i * dt; |
|||
float3 sPos = P1 + t * T; |
|||
float3 unL = sPos - positionWS; |
|||
float dist2 = dot(unL, unL); |
|||
float3 L = normalize(unL); |
|||
float sinLT = length(cross(L, T)); |
|||
float NdotL = saturate(dot(bsdfData.normalWS, L)); |
|||
|
|||
if (NdotL > 0) |
|||
{ |
|||
float3 lightDiff, lightSpec; |
|||
|
|||
BSDF(V, L, positionWS, preLightData, bsdfData, lightDiff, lightSpec); |
|||
|
|||
diffuseLighting += lightDiff * (sinLT / dist2 * NdotL); |
|||
specularLighting += lightSpec * (sinLT / dist2 * NdotL); |
|||
} |
|||
} |
|||
|
|||
// The factor of 2 is due to the fact: Integral{0, 2 PI}{max(0, cos(x))dx} = 2. |
|||
float normFactor = 2.0 * invPdf * rcp(sampleCount); |
|||
|
|||
diffuseLighting *= normFactor * lightData.diffuseScale * lightData.color; |
|||
specularLighting *= normFactor * lightData.specularScale * lightData.color; |
|||
} |
|||
|
|||
//----------------------------------------------------------------------------- |
|||
// EvaluateBSDF_Area - Reference |
|||
//----------------------------------------------------------------------------- |
|||
|
|||
void IntegrateBSDF_AreaRef(float3 V, float3 positionWS, |
|||
PreLightData preLightData, LightData lightData, BSDFData bsdfData, |
|||
out float3 diffuseLighting, out float3 specularLighting, |
|||
uint sampleCount = 512) |
|||
{ |
|||
// Add some jittering on Hammersley2d |
|||
float2 randNum = InitRandom(V.xy * 0.5 + 0.5); |
|||
|
|||
diffuseLighting = float3(0.0, 0.0, 0.0); |
|||
specularLighting = float3(0.0, 0.0, 0.0); |
|||
|
|||
for (uint i = 0; i < sampleCount; ++i) |
|||
{ |
|||
float3 P = float3(0.0, 0.0, 0.0); // Sample light point. Random point on the light shape in local space. |
|||
float3 Ns = float3(0.0, 0.0, 0.0); // Unit surface normal at P |
|||
float lightPdf = 0.0; // Pdf of the light sample |
|||
|
|||
float2 u = Hammersley2d(i, sampleCount); |
|||
u = frac(u + randNum); |
|||
|
|||
// Lights in Unity point backward. |
|||
float4x4 localToWorld = float4x4(float4(lightData.right, 0.0), float4(lightData.up, 0.0), float4(-lightData.forward, 0.0), float4(lightData.positionWS, 1.0)); |
|||
|
|||
switch (lightData.lightType) |
|||
{ |
|||
case GPULIGHTTYPE_SPHERE: |
|||
SampleSphere(u, localToWorld, lightData.size.x, lightPdf, P, Ns); |
|||
break; |
|||
case GPULIGHTTYPE_HEMISPHERE: |
|||
SampleHemisphere(u, localToWorld, lightData.size.x, lightPdf, P, Ns); |
|||
break; |
|||
case GPULIGHTTYPE_CYLINDER: |
|||
SampleCylinder(u, localToWorld, lightData.size.x, lightData.size.y, lightPdf, P, Ns); |
|||
break; |
|||
case GPULIGHTTYPE_RECTANGLE: |
|||
SampleRectangle(u, localToWorld, lightData.size.x, lightData.size.y, lightPdf, P, Ns); |
|||
break; |
|||
case GPULIGHTTYPE_DISK: |
|||
SampleDisk(u, localToWorld, lightData.size.x, lightPdf, P, Ns); |
|||
break; |
|||
// case GPULIGHTTYPE_LINE: handled by a separate function. |
|||
} |
|||
|
|||
// Get distance |
|||
float3 unL = P - positionWS; |
|||
float sqrDist = dot(unL, unL); |
|||
float3 L = normalize(unL); |
|||
|
|||
// Cosine of the angle between the light direction and the normal of the light's surface. |
|||
float cosLNs = saturate(dot(-L, Ns)); |
|||
|
|||
// We calculate area reference light with the area integral rather than the solid angle one. |
|||
float illuminance = cosLNs * saturate(dot(bsdfData.normalWS, L)) / (sqrDist * lightPdf); |
|||
|
|||
float3 localDiffuseLighting = float3(0.0, 0.0, 0.0); |
|||
float3 localSpecularLighting = float3(0.0, 0.0, 0.0); |
|||
|
|||
if (illuminance > 0.0) |
|||
{ |
|||
BSDF(V, L, positionWS, preLightData, bsdfData, localDiffuseLighting, localSpecularLighting); |
|||
localDiffuseLighting *= lightData.color * illuminance * lightData.diffuseScale; |
|||
localSpecularLighting *= lightData.color * illuminance * lightData.specularScale; |
|||
} |
|||
|
|||
diffuseLighting += localDiffuseLighting; |
|||
specularLighting += localSpecularLighting; |
|||
} |
|||
|
|||
diffuseLighting /= float(sampleCount); |
|||
specularLighting /= float(sampleCount); |
|||
} |
|||
|
|||
//----------------------------------------------------------------------------- |
|||
// EvaluateBSDF_Env - Reference |
|||
// ---------------------------------------------------------------------------- |
|||
|
|||
// Ref: Moving Frostbite to PBR (Appendix A) |
|||
float3 IntegrateLambertIBLRef(LightLoopContext lightLoopContext, |
|||
float3 V, EnvLightData lightData, BSDFData bsdfData, |
|||
uint sampleCount = 4096) |
|||
{ |
|||
float3x3 localToWorld = float3x3(bsdfData.tangentWS, bsdfData.bitangentWS, bsdfData.normalWS); |
|||
float3 acc = float3(0.0, 0.0, 0.0); |
|||
|
|||
// Add some jittering on Hammersley2d |
|||
float2 randNum = InitRandom(V.xy * 0.5 + 0.5); |
|||
|
|||
for (uint i = 0; i < sampleCount; ++i) |
|||
{ |
|||
float2 u = Hammersley2d(i, sampleCount); |
|||
u = frac(u + randNum); |
|||
|
|||
float3 L; |
|||
float NdotL; |
|||
float weightOverPdf; |
|||
ImportanceSampleLambert(u, localToWorld, L, NdotL, weightOverPdf); |
|||
|
|||
if (NdotL > 0.0) |
|||
{ |
|||
float4 val = SampleEnv(lightLoopContext, lightData.envIndex, L, 0); |
|||
|
|||
// diffuse Albedo is apply here as describe in ImportanceSampleLambert function |
|||
acc += bsdfData.diffuseColor * LambertNoPI() * weightOverPdf * val.rgb; |
|||
} |
|||
} |
|||
|
|||
return acc / sampleCount; |
|||
} |
|||
|
|||
float3 IntegrateDisneyDiffuseIBLRef(LightLoopContext lightLoopContext, |
|||
float3 V, PreLightData preLightData, EnvLightData lightData, BSDFData bsdfData, |
|||
uint sampleCount = 4096) |
|||
{ |
|||
float3x3 localToWorld = float3x3(bsdfData.tangentWS, bsdfData.bitangentWS, bsdfData.normalWS); |
|||
float NdotV = max(preLightData.NdotV, MIN_N_DOT_V); |
|||
float3 acc = float3(0.0, 0.0, 0.0); |
|||
|
|||
// Add some jittering on Hammersley2d |
|||
float2 randNum = InitRandom(V.xy * 0.5 + 0.5); |
|||
|
|||
for (uint i = 0; i < sampleCount; ++i) |
|||
{ |
|||
float2 u = Hammersley2d(i, sampleCount); |
|||
u = frac(u + randNum); |
|||
|
|||
float3 L; |
|||
float NdotL; |
|||
float weightOverPdf; |
|||
// for Disney we still use a Cosine importance sampling, true Disney importance sampling imply a look up table |
|||
ImportanceSampleLambert(u, localToWorld, L, NdotL, weightOverPdf); |
|||
|
|||
if (NdotL > 0.0) |
|||
{ |
|||
float3 H = normalize(L + V); |
|||
float LdotH = dot(L, H); |
|||
// Note: we call DisneyDiffuse that require to multiply by Albedo / PI. Divide by PI is already taken into account |
|||
// in weightOverPdf of ImportanceSampleLambert call. |
|||
float disneyDiffuse = DisneyDiffuse(NdotV, NdotL, LdotH, bsdfData.perceptualRoughness); |
|||
|
|||
// diffuse Albedo is apply here as describe in ImportanceSampleLambert function |
|||
float4 val = SampleEnv(lightLoopContext, lightData.envIndex, L, 0); |
|||
acc += bsdfData.diffuseColor * disneyDiffuse * weightOverPdf * val.rgb; |
|||
} |
|||
} |
|||
|
|||
return acc / sampleCount; |
|||
} |
|||
|
|||
// Ref: Moving Frostbite to PBR (Appendix A) |
|||
float3 IntegrateSpecularGGXIBLRef(LightLoopContext lightLoopContext, |
|||
float3 V, PreLightData preLightData, EnvLightData lightData, BSDFData bsdfData, |
|||
uint sampleCount = 4096) |
|||
{ |
|||
float3x3 localToWorld = float3x3(bsdfData.tangentWS, bsdfData.bitangentWS, bsdfData.normalWS); |
|||
float NdotV = max(preLightData.NdotV, MIN_N_DOT_V); |
|||
float3 acc = float3(0.0, 0.0, 0.0); |
|||
|
|||
// Add some jittering on Hammersley2d |
|||
float2 randNum = InitRandom(V.xy * 0.5 + 0.5); |
|||
|
|||
for (uint i = 0; i < sampleCount; ++i) |
|||
{ |
|||
float2 u = Hammersley2d(i, sampleCount); |
|||
u = frac(u + randNum); |
|||
|
|||
float VdotH; |
|||
float NdotL; |
|||
float3 L; |
|||
float weightOverPdf; |
|||
|
|||
// GGX BRDF |
|||
if (bsdfData.materialId == MATERIALID_LIT_ANISO) |
|||
{ |
|||
ImportanceSampleAnisoGGX(u, V, localToWorld, bsdfData.roughnessT, bsdfData.roughnessB, NdotV, L, VdotH, NdotL, weightOverPdf); |
|||
} |
|||
else |
|||
{ |
|||
ImportanceSampleGGX(u, V, localToWorld, bsdfData.roughness, NdotV, L, VdotH, NdotL, weightOverPdf); |
|||
} |
|||
|
|||
|
|||
if (NdotL > 0.0) |
|||
{ |
|||
// Fresnel component is apply here as describe in ImportanceSampleGGX function |
|||
float3 FweightOverPdf = F_Schlick(bsdfData.fresnel0, VdotH) * weightOverPdf; |
|||
|
|||
float4 val = SampleEnv(lightLoopContext, lightData.envIndex, L, 0); |
|||
|
|||
acc += FweightOverPdf * val.rgb; |
|||
} |
|||
} |
|||
|
|||
return acc / sampleCount; |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0406917314064054eb0ef42f727a8889 |
|||
timeCreated: 1500913760 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Hidden/HDRenderPipeline/CopyStencilBuffer" |
|||
{ |
|||
SubShader |
|||
{ |
|||
Pass |
|||
{ |
|||
Stencil |
|||
{ |
|||
Ref 1 // StencilLightingUsage.SplitLighting |
|||
Comp Equal |
|||
Pass Keep |
|||
} |
|||
|
|||
Cull Off |
|||
ZTest Always |
|||
ZWrite Off |
|||
Blend Off |
|||
|
|||
HLSLPROGRAM |
|||
#pragma target 4.5 |
|||
#pragma only_renderers d3d11 ps4 metal // TEMP: until we go further in dev |
|||
// #pragma enable_d3d11_debug_symbols |
|||
|
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
|
|||
#include "../../../../ShaderLibrary/Common.hlsl" |
|||
#include "../../../ShaderConfig.cs.hlsl" |
|||
#include "../../../ShaderVariables.hlsl" |
|||
#include "../../../Lighting/LightDefinition.cs.hlsl" |
|||
|
|||
struct Attributes |
|||
{ |
|||
uint vertexID : SV_VertexID; |
|||
}; |
|||
|
|||
struct Varyings |
|||
{ |
|||
float4 positionCS : SV_Position; |
|||
}; |
|||
|
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.positionCS = GetFullScreenTriangleVertexPosition(input.vertexID); |
|||
return output; |
|||
} |
|||
|
|||
// Should use HiS and therefore be faster than a GPU memcpy(). |
|||
float4 Frag(Varyings input) : SV_Target // use SV_StencilRef in D3D 11.3+ |
|||
{ |
|||
return float4(STENCILLIGHTINGUSAGE_SPLIT_LIGHTING, 0, 0, 0); |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7fd941b2d9d2a39429de64bde023932c |
|||
timeCreated: 1499946987 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 59a5ca19094a8c64099eded20685322f |
|||
folderAsset: yes |
|||
timeCreated: 1500627638 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2b0e7252e10375942943003cdd139be0 |
|||
folderAsset: yes |
|||
timeCreated: 1500627615 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: Lightweight-DefaultETC1 |
|||
m_Shader: {fileID: 4800000, guid: 8d2bb70cbf9db8d4da26e15b26e74248, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _Cube: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailAlbedoMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailMask: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _DetailNormalMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _EmissionMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MainTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _ParallaxMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _SpecGlossMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossinessSource: 0 |
|||
- _GlossyReflections: 1 |
|||
- _Mode: 0 |
|||
- _Parallax: 0.02 |
|||
- _ReflectionSource: 0 |
|||
- _Shininess: 1 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecSource: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SpecColor: {r: 1, g: 1, b: 1, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 77da5f76bec40af47be3a3b79da0e81c |
|||
timeCreated: 1499350842 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
部分文件因为文件数量过多而无法显示
撰写
预览
正在加载...
取消
保存
Reference in new issue