This commit is contained in:
左右看
2023-06-28 00:35:46 +08:00
parent cb5bab5ce9
commit 0d848e4d07
524 changed files with 78452 additions and 12 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 036670886f7d6664b84a5053642f0ad0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 8bc739b14fe811644abb82057b363ba8
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 478ce3626be7a5f4ea58d6b13f05a2e4, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 0
forceDoublesided: 1
hideShader: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 54352a53405971b41a6587615f947085
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 478ce3626be7a5f4ea58d6b13f05a2e4, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 1
forceDoublesided: 1
hideShader: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 0a931320a74ca574b91d2d7d4557dcf1
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 478ce3626be7a5f4ea58d6b13f05a2e4, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 1
forceDoublesided: 0
hideShader: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 33ee70a7f505ddb4e80d235c3d70766d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 59541e6caf586ca4f96ccf48a4813a51, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 0
forceDoublesided: 1
hideShader: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 8a8841b4fb2f63644896f4e2b36bc06d
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 59541e6caf586ca4f96ccf48a4813a51, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 1
forceDoublesided: 1
hideShader: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 83f2caca07949794fb997734c4b0520f
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: fe431e399c52971408121c6c40cde979, type: 3}
sourceShader: {fileID: -6465566751694194690, guid: 59541e6caf586ca4f96ccf48a4813a51, type: 3}
upgradeShader: {fileID: 4800000, guid: 86f94ec63222e22449b77b92fcf1edc8, type: 3}
forceTransparent: 1
forceDoublesided: 0
hideShader: 1
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 478ce3626be7a5f4ea58d6b13f05a2e4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
@@ -0,0 +1,119 @@
#ifndef UNITY_DECLARE_OPAQUE_TEXTURE_INCLUDED_2
#define UNITY_DECLARE_OPAQUE_TEXTURE_INCLUDED_2
#ifdef SHADERGRAPH_PREVIEW
void SampleSceneColor2_float(float2 uv, float lod, out float3 color)
{
color = float3(1,1,1);
}
void SampleSceneColor2_half(half2 uv, half lod, out half3 color)
{
color = half3(1,1,1);
}
#else
// Needed to comment this out due to IN-4055 - can't build with this include being present here
// For code changes, comment this out so autocomplete etc. work, but remember to comment it again
// #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
// TODO figure out how we can differentiate between BiRP/URP/HDRP here
#define USE_CAMERA_OPAQUE
#if defined(USE_CAMERA_OPAQUE)
float4 _CameraOpaqueTexture_TexelSize;
TEXTURE2D_X(_CameraOpaqueTexture);
SAMPLER(sampler_CameraOpaqueTexture);
#endif
// for future use
// float applyIorToRoughness( const in float roughness, const in float ior ) {
// // Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and
// // an IOR of 1.5 results in the default amount of microfacet refraction.
// return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
// }
void SampleSceneColor_float(float2 uv, float lod, out float3 color)
{
#define REQUIRE_OPAQUE_TEXTURE // seems we need to define this ourselves? HDSceneColorNode does that as well
#if defined(USE_CAMERA_OPAQUE)
color = SAMPLE_TEXTURE2D_X_LOD(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, UnityStereoTransformScreenSpaceTex(uv), lod).rgb;
#else
// For HDRP, from HDSceneColorNode
#if defined(REQUIRE_OPAQUE_TEXTURE) && defined(_SURFACE_TYPE_TRANSPARENT) && defined(SHADERPASS) && (SHADERPASS != SHADERPASS_LIGHT_TRANSPORT) && (SHADERPASS != SHADERPASS_PATH_TRACING) && (SHADERPASS != SHADERPASS_RAYTRACING_VISIBILITY) && (SHADERPASS != SHADERPASS_RAYTRACING_FORWARD)
color = SampleCameraColor(uv, lod) * 1.0; // GetInverseCurrentExposureMultiplier()
#else
color = float3(0.0, 0.0, 0.0);
#endif
#endif
}
void SampleSceneColor_half(float2 uv, float lod, out float3 color)
{
SampleSceneColor_float(uv, lod, color);
}
#endif
void Refract_float(float3 v, float3 n, float ior, out float3 refractionVector)
{
refractionVector = refract( - v, normalize( n ), 1 / ior );
}
void Refract_half(half3 v, half3 n, half ior, out half3 refractionVector)
{
refractionVector = refract( - v, normalize( n ), 1 / ior );
}
inline half3 bump3y (half3 x, half3 yoffset)
{
float3 y = 1 - x * x;
y = saturate(y-yoffset);
return y;
}
void Spectral_float(float wavelength, out half3 color)
{
// Based on GPU Gems
// Optimised by Alan Zucconi
// w: [400, 700]
// x: [0, 1]
half x = ((wavelength - 400.0)/ 300.0) % 1.0;
const float3 c1 = float3(3.54585104, 2.93225262, 2.41593945);
const float3 x1 = float3(0.69549072, 0.49228336, 0.27699880);
const float3 y1 = float3(0.02312639, 0.15225084, 0.52607955);
const float3 c2 = float3(3.90307140, 3.21182957, 3.96587128);
const float3 x2 = float3(0.11748627, 0.86755042, 0.66077860);
const float3 y2 = float3(0.84897130, 0.88445281, 0.73949448);
color =
bump3y(c1 * (x - x1), y1) +
bump3y(c2 * (x - x2), y2) ;
}
#endif
void WorkaroundTilingOffset_float(UnityTexture2D Tex, float4 LegacyST, out float4 TilingOffset, out float4 TilingOffsetOther)
{
#if UNITY_VERSION >= 202120
TilingOffset = float4(1,1,0,0);
TilingOffsetOther = Tex.scaleTranslate.xyzw;
#else
TilingOffset = LegacyST;
TilingOffsetOther = LegacyST;
#endif
}
void WorkaroundTilingOffset_half(UnityTexture2D Tex, half4 LegacyST, out half4 TilingOffset, out half4 TilingOffsetOther)
{
#if UNITY_VERSION >= 202120
TilingOffset = half4(1,1,0,0);
TilingOffsetOther = Tex.scaleTranslate.xyzw;
#else
TilingOffset = LegacyST;
TilingOffsetOther = LegacyST;
#endif
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 885a3662fbaba7c47979790356264411
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8ecb70019a63796448768b1124086ef5
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 59541e6caf586ca4f96ccf48a4813a51
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}