Sebastien Lagarde
7 年前
当前提交
1240cc88
共有 68 个文件被更改,包括 1091 次插入 和 689 次删除
-
110LICENSE
-
6SampleScenes/Common/Shaders/CubemapColorMap.shader
-
2ScriptableRenderPipeline/Core/Resources/BlitCubeTextureFace.shader
-
8ScriptableRenderPipeline/Core/Resources/EncodeBC6H.compute
-
4ScriptableRenderPipeline/Core/Resources/GPUCopy.compute
-
4ScriptableRenderPipeline/Core/Resources/GPUCopy.compute.meta
-
4ScriptableRenderPipeline/Core/Resources/GPUCopyAsset.cs
-
125ScriptableRenderPipeline/Core/ShaderLibrary/API/D3D11.hlsl
-
125ScriptableRenderPipeline/Core/ShaderLibrary/API/Metal.hlsl
-
125ScriptableRenderPipeline/Core/ShaderLibrary/API/PSSL.hlsl
-
125ScriptableRenderPipeline/Core/ShaderLibrary/API/Vulkan.hlsl
-
125ScriptableRenderPipeline/Core/ShaderLibrary/API/XBoxOne.hlsl
-
2ScriptableRenderPipeline/Core/ShaderLibrary/ImageBasedLighting.hlsl
-
3ScriptableRenderPipeline/Core/ShaderLibrary/Macros.hlsl
-
4ScriptableRenderPipeline/Core/ShaderLibrary/Wind.hlsl
-
2ScriptableRenderPipeline/Core/Volume/VolumeParameter.cs
-
2ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayLatlong.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugFullScreen.shader
-
6ScriptableRenderPipeline/HDRenderPipeline/Editor/Material/Lit/BaseLitUI.cs
-
5ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs
-
30ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightEvaluation.hlsl
-
96ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoop.hlsl
-
113ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/LightLoopDef.hlsl
-
8ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/ShadowContext.hlsl
-
1ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/builddispatchindirect.compute
-
1ScriptableRenderPipeline/HDRenderPipeline/Lighting/LightLoop/materialflags.compute
-
15ScriptableRenderPipeline/HDRenderPipeline/Lighting/Lighting.hlsl
-
4ScriptableRenderPipeline/HDRenderPipeline/Material/Decal/DecalProperties.hlsl
-
6ScriptableRenderPipeline/HDRenderPipeline/Material/GGXConvolution/BuildProbabilityTables.compute
-
8ScriptableRenderPipeline/HDRenderPipeline/Material/GGXConvolution/GGXConvolve.shader
-
8ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/Lit.hlsl
-
2ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitData.hlsl
-
4ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitDataMeshModification.hlsl
-
46ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/LitProperties.hlsl
-
4ScriptableRenderPipeline/HDRenderPipeline/Material/Lit/ShaderPass/LitVelocityPass.hlsl
-
2ScriptableRenderPipeline/HDRenderPipeline/Material/SubsurfaceScattering/SubsurfaceScattering.compute
-
6ScriptableRenderPipeline/HDRenderPipeline/Material/Unlit/UnlitProperties.hlsl
-
55ScriptableRenderPipeline/HDRenderPipeline/RenderPipelineResources/DepthDownsample.compute
-
52ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/ShaderPassVelocity.hlsl
-
11ScriptableRenderPipeline/HDRenderPipeline/ShaderPass/VertMesh.hlsl
-
24ScriptableRenderPipeline/HDRenderPipeline/ShaderVariables.hlsl
-
2ScriptableRenderPipeline/HDRenderPipeline/Sky/BlitCubemap.shader
-
2ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/Resources/SkyHDRI.shader
-
5ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyVariables.hlsl
-
74Tests/GraphicsTests/Framework/Editor/TestFramework.cs
-
2ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMapping.hlsl
-
97ScriptableRenderPipeline/Core/LICENSE
-
7ScriptableRenderPipeline/Core/LICENSE.meta
-
8ScriptableRenderPipeline/Core/ShaderLibrary/Sampling.meta
-
97ScriptableRenderPipeline/HDRenderPipeline/LICENSE
-
7ScriptableRenderPipeline/HDRenderPipeline/LICENSE.meta
-
97ScriptableRenderPipeline/LightweightPipeline/LICENSE
-
7ScriptableRenderPipeline/LightweightPipeline/LICENSE.meta
-
82ScriptableRenderPipeline/Core/ShaderLibrary/Filtering.hlsl
-
8ScriptableRenderPipeline/Core/ShaderLibrary/Filtering.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Sampling.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Fibonacci.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Hammersley.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Fibonacci.hlsl
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Hammersley.hlsl
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMappingNormalInternal.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMappingInternal.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMapping.hlsl.meta
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMapping.hlsl
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMappingInternal.hlsl
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/SampleUVMappingNormalInternal.hlsl
-
0/ScriptableRenderPipeline/Core/ShaderLibrary/Sampling/Sampling.hlsl
|
|||
MIT License |
|||
Unity Companion License (“License”) |
|||
Software Copyright © 2017 Unity Technologies ApS |
|||
Copyright (c) 2016 Unity Technologies |
|||
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive, |
|||
no-charge, and royalty-free copyright license to reproduce, prepare derivative |
|||
works of, publicly display, publicly perform, sublicense, and distribute the |
|||
software that is made available under this License (“Software”), subject to the |
|||
following terms and conditions: |
|||
Permission is hereby granted, free of charge, to any person obtaining a copy |
|||
of this software and associated documentation files (the "Software"), to deal |
|||
in the Software without restriction, including without limitation the rights |
|||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|||
copies of the Software, and to permit persons to whom the Software is |
|||
furnished to do so, subject to the following conditions: |
|||
1. Unity Companion Use Only. Exercise of the license granted herein is limited |
|||
to exercise for the creation, use, and/or distribution of applications, |
|||
software, or other content pursuant to a valid Unity content authoring and |
|||
rendering engine software license (“Engine License”). That means while use of |
|||
the Software is not limited to use in the software licensed under the Engine |
|||
License, the Software may not be used for any purpose other than the creation, |
|||
use, and/or distribution of Engine License-dependent applications, software, or |
|||
other content. No other exercise of the license granted herein is permitted, |
|||
and in no event may the Software be used for competitive analysis or to develop |
|||
a competing product or service. |
|||
|
|||
2. No Modification of Engine License. Neither this License nor any exercise of |
|||
the license granted herein modifies the Engine License in any way. |
|||
|
|||
3. Ownership & Grant Back to You. |
|||
|
|||
3.1 You own your content. In this License, “derivative works” means derivatives |
|||
of the Software itself--works derived only from the Software by you under this |
|||
License (for example, modifying the code of the Software itself to improve its |
|||
efficacy); “derivative works” of the Software do not include, for example, |
|||
games, apps, or content that you create using the Software. You keep all right, |
|||
title, and interest to your own content. |
|||
The above copyright notice and this permission notice shall be included in all |
|||
copies or substantial portions of the Software. |
|||
3.2 Unity owns its content. While you keep all right, title, and interest to |
|||
your own content per the above, as between Unity and you, Unity will own all |
|||
right, title, and interest to all intellectual property rights (including |
|||
patent, trademark, and copyright) in the Software and derivative works of the |
|||
Software, and you hereby assign and agree to assign all such rights in those |
|||
derivative works to Unity. |
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|||
SOFTWARE. |
|||
3.3 You have a license to those derivative works. Subject to this License, |
|||
Unity grants to you the same worldwide, non-exclusive, no-charge, and |
|||
royalty-free copyright license to derivative works of the Software you create |
|||
as is granted to you for the Software under this License. |
|||
|
|||
4. Trademarks. You are not granted any right or license under this License to |
|||
use any trademarks, service marks, trade names, products names, or branding of |
|||
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are |
|||
permitted; see, for example, Unity’s Branding Usage Guidelines at |
|||
https://unity3d.com/public-relations/brand. |
|||
|
|||
5. Notices & Third-Party Rights. This License, including the copyright notice |
|||
associated with the Software, must be provided in all substantial portions of |
|||
the Software and derivative works thereof (or, if that is impracticable, in any |
|||
other location where such notices are customarily placed). Further, if the |
|||
Software is accompanied by a Unity “third-party notices” or similar file, you |
|||
acknowledge and agree that software identified in that file is governed by |
|||
those separate license terms. |
|||
|
|||
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS |
|||
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF |
|||
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN |
|||
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES |
|||
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, |
|||
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR |
|||
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN |
|||
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN |
|||
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR |
|||
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
|
|||
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software |
|||
constitutes your acceptance of this License and its terms and conditions. |
|||
Software released by Unity under this License may be modified or updated and |
|||
the License with it; upon any such modification or update, you will comply with |
|||
the terms of the updated License for any use of any of the Software under the |
|||
updated License. |
|||
|
|||
8. Use in Compliance with Law and Termination. Your exercise of the license |
|||
granted herein will at all times be in compliance with applicable law and will |
|||
not infringe any proprietary rights (including intellectual property rights); |
|||
this License will terminate immediately on any breach by you of this License. |
|||
|
|||
9. Severability. If any provision of this License is held to be unenforceable |
|||
or invalid, that provision will be enforced to the maximum extent possible and |
|||
the other provisions will remain in full force and effect. |
|||
|
|||
10. Governing Law and Venue. This License is governed by and construed in |
|||
accordance with the laws of Denmark, except for its conflict of laws rules; the |
|||
United Nations Convention on Contracts for the International Sale of Goods will |
|||
not apply. If you reside (or your principal place of business is) within the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the state and federal courts located in San |
|||
Francisco County, California concerning any dispute arising out of this License |
|||
(“Dispute”). If you reside (or your principal place of business is) outside the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the courts located in Copenhagen, Denmark |
|||
concerning any Dispute. |
|
|||
#include "ShaderLibrary/Common.hlsl" |
|||
|
|||
Texture2D<float> _Source; |
|||
RWTexture2D<float> _Result; |
|||
|
|||
SamplerState sampler_LinearClamp; |
|||
|
|||
CBUFFER_START(cb) |
|||
float4 _Size; |
|||
CBUFFER_END |
|||
|
|||
#pragma kernel KMain |
|||
[numthreads(8, 8, 1)] |
|||
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID) |
|||
{ |
|||
// Upper-left pixel coordinate of quad that this thread will read |
|||
int2 threadUL = dispatchThreadId; |
|||
|
|||
// Downsample the block |
|||
float2 offset = float2(threadUL); |
|||
float p00 = _Source.SampleLevel(sampler_LinearClamp, (offset ) * _Size.zw, 0.0).x; |
|||
float p10 = _Source.SampleLevel(sampler_LinearClamp, (offset + float2(1.0, 0.0)) * _Size.zw, 0.0).x; |
|||
float p01 = _Source.SampleLevel(sampler_LinearClamp, (offset + float2(0.0, 1.0)) * _Size.zw, 0.0).x; |
|||
float p11 = _Source.SampleLevel(sampler_LinearClamp, (offset + float2(1.0, 1.0)) * _Size.zw, 0.0).x; |
|||
|
|||
float depth = min(min(min(p00, p01), p10), p11); |
|||
|
|||
// Write to the final target |
|||
_Result[dispatchThreadId] = depth; |
|||
#include "ShaderLibrary/Common.hlsl" |
|||
|
|||
Texture2D<float> _Source; |
|||
RWTexture2D<float> _Result; |
|||
|
|||
SamplerState sampler_PointClamp; //TODO: could we use min-sampler instead of using ALU? |
|||
|
|||
CBUFFER_START(cb) |
|||
float4 _SrcSize; |
|||
CBUFFER_END |
|||
|
|||
#pragma kernel KMain |
|||
[numthreads(8, 8, 1)] |
|||
void KMain(uint2 groupId : SV_GroupID, uint2 groupThreadId : SV_GroupThreadID, uint2 dispatchThreadId : SV_DispatchThreadID) |
|||
{ |
|||
// Upper-left pixel coordinate of quad that this thread will read |
|||
int2 threadUL = dispatchThreadId; |
|||
|
|||
// Downsample the block |
|||
float2 offset = float2(threadUL) * 2.0f + 1.0f; |
|||
float4 depths = _Source.GatherRed(sampler_PointClamp, offset * _SrcSize.zw, 0.0); |
|||
|
|||
float minDepth = min(min(depths.x, depths.y), min(depths.z, depths.w)); |
|||
|
|||
// Write to the final target |
|||
_Result[dispatchThreadId] = minDepth; |
|||
} |
|
|||
Unity Companion License (“License”) |
|||
Software Copyright © 2017 Unity Technologies ApS |
|||
|
|||
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive, |
|||
no-charge, and royalty-free copyright license to reproduce, prepare derivative |
|||
works of, publicly display, publicly perform, sublicense, and distribute the |
|||
software that is made available under this License (“Software”), subject to the |
|||
following terms and conditions: |
|||
|
|||
1. Unity Companion Use Only. Exercise of the license granted herein is limited |
|||
to exercise for the creation, use, and/or distribution of applications, |
|||
software, or other content pursuant to a valid Unity content authoring and |
|||
rendering engine software license (“Engine License”). That means while use of |
|||
the Software is not limited to use in the software licensed under the Engine |
|||
License, the Software may not be used for any purpose other than the creation, |
|||
use, and/or distribution of Engine License-dependent applications, software, or |
|||
other content. No other exercise of the license granted herein is permitted, |
|||
and in no event may the Software be used for competitive analysis or to develop |
|||
a competing product or service. |
|||
|
|||
2. No Modification of Engine License. Neither this License nor any exercise of |
|||
the license granted herein modifies the Engine License in any way. |
|||
|
|||
3. Ownership & Grant Back to You. |
|||
|
|||
3.1 You own your content. In this License, “derivative works” means derivatives |
|||
of the Software itself--works derived only from the Software by you under this |
|||
License (for example, modifying the code of the Software itself to improve its |
|||
efficacy); “derivative works” of the Software do not include, for example, |
|||
games, apps, or content that you create using the Software. You keep all right, |
|||
title, and interest to your own content. |
|||
|
|||
3.2 Unity owns its content. While you keep all right, title, and interest to |
|||
your own content per the above, as between Unity and you, Unity will own all |
|||
right, title, and interest to all intellectual property rights (including |
|||
patent, trademark, and copyright) in the Software and derivative works of the |
|||
Software, and you hereby assign and agree to assign all such rights in those |
|||
derivative works to Unity. |
|||
|
|||
3.3 You have a license to those derivative works. Subject to this License, |
|||
Unity grants to you the same worldwide, non-exclusive, no-charge, and |
|||
royalty-free copyright license to derivative works of the Software you create |
|||
as is granted to you for the Software under this License. |
|||
|
|||
4. Trademarks. You are not granted any right or license under this License to |
|||
use any trademarks, service marks, trade names, products names, or branding of |
|||
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are |
|||
permitted; see, for example, Unity’s Branding Usage Guidelines at |
|||
https://unity3d.com/public-relations/brand. |
|||
|
|||
5. Notices & Third-Party Rights. This License, including the copyright notice |
|||
associated with the Software, must be provided in all substantial portions of |
|||
the Software and derivative works thereof (or, if that is impracticable, in any |
|||
other location where such notices are customarily placed). Further, if the |
|||
Software is accompanied by a Unity “third-party notices” or similar file, you |
|||
acknowledge and agree that software identified in that file is governed by |
|||
those separate license terms. |
|||
|
|||
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS |
|||
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF |
|||
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN |
|||
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES |
|||
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, |
|||
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR |
|||
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN |
|||
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN |
|||
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR |
|||
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
|
|||
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software |
|||
constitutes your acceptance of this License and its terms and conditions. |
|||
Software released by Unity under this License may be modified or updated and |
|||
the License with it; upon any such modification or update, you will comply with |
|||
the terms of the updated License for any use of any of the Software under the |
|||
updated License. |
|||
|
|||
8. Use in Compliance with Law and Termination. Your exercise of the license |
|||
granted herein will at all times be in compliance with applicable law and will |
|||
not infringe any proprietary rights (including intellectual property rights); |
|||
this License will terminate immediately on any breach by you of this License. |
|||
|
|||
9. Severability. If any provision of this License is held to be unenforceable |
|||
or invalid, that provision will be enforced to the maximum extent possible and |
|||
the other provisions will remain in full force and effect. |
|||
|
|||
10. Governing Law and Venue. This License is governed by and construed in |
|||
accordance with the laws of Denmark, except for its conflict of laws rules; the |
|||
United Nations Convention on Contracts for the International Sale of Goods will |
|||
not apply. If you reside (or your principal place of business is) within the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the state and federal courts located in San |
|||
Francisco County, California concerning any dispute arising out of this License |
|||
(“Dispute”). If you reside (or your principal place of business is) outside the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the courts located in Copenhagen, Denmark |
|||
concerning any Dispute. |
|
|||
fileFormatVersion: 2 |
|||
guid: ef45a081b89729f48887261245188e37 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 14115a7568c4882499f59039a0585e3b |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Unity Companion License (“License”) |
|||
Software Copyright © 2017 Unity Technologies ApS |
|||
|
|||
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive, |
|||
no-charge, and royalty-free copyright license to reproduce, prepare derivative |
|||
works of, publicly display, publicly perform, sublicense, and distribute the |
|||
software that is made available under this License (“Software”), subject to the |
|||
following terms and conditions: |
|||
|
|||
1. Unity Companion Use Only. Exercise of the license granted herein is limited |
|||
to exercise for the creation, use, and/or distribution of applications, |
|||
software, or other content pursuant to a valid Unity content authoring and |
|||
rendering engine software license (“Engine License”). That means while use of |
|||
the Software is not limited to use in the software licensed under the Engine |
|||
License, the Software may not be used for any purpose other than the creation, |
|||
use, and/or distribution of Engine License-dependent applications, software, or |
|||
other content. No other exercise of the license granted herein is permitted, |
|||
and in no event may the Software be used for competitive analysis or to develop |
|||
a competing product or service. |
|||
|
|||
2. No Modification of Engine License. Neither this License nor any exercise of |
|||
the license granted herein modifies the Engine License in any way. |
|||
|
|||
3. Ownership & Grant Back to You. |
|||
|
|||
3.1 You own your content. In this License, “derivative works” means derivatives |
|||
of the Software itself--works derived only from the Software by you under this |
|||
License (for example, modifying the code of the Software itself to improve its |
|||
efficacy); “derivative works” of the Software do not include, for example, |
|||
games, apps, or content that you create using the Software. You keep all right, |
|||
title, and interest to your own content. |
|||
|
|||
3.2 Unity owns its content. While you keep all right, title, and interest to |
|||
your own content per the above, as between Unity and you, Unity will own all |
|||
right, title, and interest to all intellectual property rights (including |
|||
patent, trademark, and copyright) in the Software and derivative works of the |
|||
Software, and you hereby assign and agree to assign all such rights in those |
|||
derivative works to Unity. |
|||
|
|||
3.3 You have a license to those derivative works. Subject to this License, |
|||
Unity grants to you the same worldwide, non-exclusive, no-charge, and |
|||
royalty-free copyright license to derivative works of the Software you create |
|||
as is granted to you for the Software under this License. |
|||
|
|||
4. Trademarks. You are not granted any right or license under this License to |
|||
use any trademarks, service marks, trade names, products names, or branding of |
|||
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are |
|||
permitted; see, for example, Unity’s Branding Usage Guidelines at |
|||
https://unity3d.com/public-relations/brand. |
|||
|
|||
5. Notices & Third-Party Rights. This License, including the copyright notice |
|||
associated with the Software, must be provided in all substantial portions of |
|||
the Software and derivative works thereof (or, if that is impracticable, in any |
|||
other location where such notices are customarily placed). Further, if the |
|||
Software is accompanied by a Unity “third-party notices” or similar file, you |
|||
acknowledge and agree that software identified in that file is governed by |
|||
those separate license terms. |
|||
|
|||
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS |
|||
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF |
|||
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN |
|||
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES |
|||
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, |
|||
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR |
|||
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN |
|||
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN |
|||
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR |
|||
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
|
|||
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software |
|||
constitutes your acceptance of this License and its terms and conditions. |
|||
Software released by Unity under this License may be modified or updated and |
|||
the License with it; upon any such modification or update, you will comply with |
|||
the terms of the updated License for any use of any of the Software under the |
|||
updated License. |
|||
|
|||
8. Use in Compliance with Law and Termination. Your exercise of the license |
|||
granted herein will at all times be in compliance with applicable law and will |
|||
not infringe any proprietary rights (including intellectual property rights); |
|||
this License will terminate immediately on any breach by you of this License. |
|||
|
|||
9. Severability. If any provision of this License is held to be unenforceable |
|||
or invalid, that provision will be enforced to the maximum extent possible and |
|||
the other provisions will remain in full force and effect. |
|||
|
|||
10. Governing Law and Venue. This License is governed by and construed in |
|||
accordance with the laws of Denmark, except for its conflict of laws rules; the |
|||
United Nations Convention on Contracts for the International Sale of Goods will |
|||
not apply. If you reside (or your principal place of business is) within the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the state and federal courts located in San |
|||
Francisco County, California concerning any dispute arising out of this License |
|||
(“Dispute”). If you reside (or your principal place of business is) outside the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the courts located in Copenhagen, Denmark |
|||
concerning any Dispute. |
|
|||
fileFormatVersion: 2 |
|||
guid: 31351b1043fde6342afe25329f2e52f7 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Unity Companion License (“License”) |
|||
Software Copyright © 2017 Unity Technologies ApS |
|||
|
|||
Unity Technologies ApS (“Unity”) grants to you a worldwide, non-exclusive, |
|||
no-charge, and royalty-free copyright license to reproduce, prepare derivative |
|||
works of, publicly display, publicly perform, sublicense, and distribute the |
|||
software that is made available under this License (“Software”), subject to the |
|||
following terms and conditions: |
|||
|
|||
1. Unity Companion Use Only. Exercise of the license granted herein is limited |
|||
to exercise for the creation, use, and/or distribution of applications, |
|||
software, or other content pursuant to a valid Unity content authoring and |
|||
rendering engine software license (“Engine License”). That means while use of |
|||
the Software is not limited to use in the software licensed under the Engine |
|||
License, the Software may not be used for any purpose other than the creation, |
|||
use, and/or distribution of Engine License-dependent applications, software, or |
|||
other content. No other exercise of the license granted herein is permitted, |
|||
and in no event may the Software be used for competitive analysis or to develop |
|||
a competing product or service. |
|||
|
|||
2. No Modification of Engine License. Neither this License nor any exercise of |
|||
the license granted herein modifies the Engine License in any way. |
|||
|
|||
3. Ownership & Grant Back to You. |
|||
|
|||
3.1 You own your content. In this License, “derivative works” means derivatives |
|||
of the Software itself--works derived only from the Software by you under this |
|||
License (for example, modifying the code of the Software itself to improve its |
|||
efficacy); “derivative works” of the Software do not include, for example, |
|||
games, apps, or content that you create using the Software. You keep all right, |
|||
title, and interest to your own content. |
|||
|
|||
3.2 Unity owns its content. While you keep all right, title, and interest to |
|||
your own content per the above, as between Unity and you, Unity will own all |
|||
right, title, and interest to all intellectual property rights (including |
|||
patent, trademark, and copyright) in the Software and derivative works of the |
|||
Software, and you hereby assign and agree to assign all such rights in those |
|||
derivative works to Unity. |
|||
|
|||
3.3 You have a license to those derivative works. Subject to this License, |
|||
Unity grants to you the same worldwide, non-exclusive, no-charge, and |
|||
royalty-free copyright license to derivative works of the Software you create |
|||
as is granted to you for the Software under this License. |
|||
|
|||
4. Trademarks. You are not granted any right or license under this License to |
|||
use any trademarks, service marks, trade names, products names, or branding of |
|||
Unity or its affiliates (“Trademarks”). Descriptive uses of Trademarks are |
|||
permitted; see, for example, Unity’s Branding Usage Guidelines at |
|||
https://unity3d.com/public-relations/brand. |
|||
|
|||
5. Notices & Third-Party Rights. This License, including the copyright notice |
|||
associated with the Software, must be provided in all substantial portions of |
|||
the Software and derivative works thereof (or, if that is impracticable, in any |
|||
other location where such notices are customarily placed). Further, if the |
|||
Software is accompanied by a Unity “third-party notices” or similar file, you |
|||
acknowledge and agree that software identified in that file is governed by |
|||
those separate license terms. |
|||
|
|||
6. DISCLAIMER, LIMITATION OF LIABILITY. THE SOFTWARE AND ANY DERIVATIVE WORKS |
|||
THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF |
|||
ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN |
|||
NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES |
|||
(WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, |
|||
INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR |
|||
PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN |
|||
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN |
|||
CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR |
|||
OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|||
|
|||
7. USE IS ACCEPTANCE and License Versions. Your receipt and use of the Software |
|||
constitutes your acceptance of this License and its terms and conditions. |
|||
Software released by Unity under this License may be modified or updated and |
|||
the License with it; upon any such modification or update, you will comply with |
|||
the terms of the updated License for any use of any of the Software under the |
|||
updated License. |
|||
|
|||
8. Use in Compliance with Law and Termination. Your exercise of the license |
|||
granted herein will at all times be in compliance with applicable law and will |
|||
not infringe any proprietary rights (including intellectual property rights); |
|||
this License will terminate immediately on any breach by you of this License. |
|||
|
|||
9. Severability. If any provision of this License is held to be unenforceable |
|||
or invalid, that provision will be enforced to the maximum extent possible and |
|||
the other provisions will remain in full force and effect. |
|||
|
|||
10. Governing Law and Venue. This License is governed by and construed in |
|||
accordance with the laws of Denmark, except for its conflict of laws rules; the |
|||
United Nations Convention on Contracts for the International Sale of Goods will |
|||
not apply. If you reside (or your principal place of business is) within the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the state and federal courts located in San |
|||
Francisco County, California concerning any dispute arising out of this License |
|||
(“Dispute”). If you reside (or your principal place of business is) outside the |
|||
United States, you and Unity agree to submit to the personal and exclusive |
|||
jurisdiction of and venue in the courts located in Copenhagen, Denmark |
|||
concerning any Dispute. |
|
|||
fileFormatVersion: 2 |
|||
guid: 0f4f03997ce061d4c9c0df390c8b92e5 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
// Ref: https://gist.github.com/TheRealMJP/c83b8c0f46b63f3a88a5986f4fa982b1 from MJP |
|||
// Samples a texture with Catmull-Rom filtering, using 9 texture fetches instead of 16. |
|||
// See http://vec3.ca/bicubic-filtering-in-fewer-taps/ for more details |
|||
float4 SampleTextureCatmullRom(TEXTURE2D_ARGS(tex, linearSampler), float2 uv, float2 texSize) |
|||
{ |
|||
// We're going to sample a a 4x4 grid of texels surrounding the target UV coordinate. We'll do this by rounding |
|||
// down the sample location to get the exact center of our "starting" texel. The starting texel will be at |
|||
// location [1, 1] in the grid, where [0, 0] is the top left corner. |
|||
float2 samplePos = uv * texSize; |
|||
float2 texPos1 = floor(samplePos - 0.5f) + 0.5f; |
|||
|
|||
// Compute the fractional offset from our starting texel to our original sample location, which we'll |
|||
// feed into the Catmull-Rom spline function to get our filter weights. |
|||
float2 f = samplePos - texPos1; |
|||
float2 f2 = f * f; |
|||
float2 f3 = f2 * f; |
|||
|
|||
// Compute the Catmull-Rom weights using the fractional offset that we calculated earlier. |
|||
// These equations are pre-expanded based on our knowledge of where the texels will be located, |
|||
// which lets us avoid having to evaluate a piece-wise function. |
|||
float2 w0 = (1.0f / 6.0) * (-3.0 * f3 + 6.0 * f2 - 3.0 * f); |
|||
float2 w1 = (1.0f / 6.0) * (9.0 * f3 - 15.0 * f2 + 6.0); |
|||
float2 w2 = (1.0f / 6.0) * (-9.0 * f3 + 12.0 * f2 + 3.0 * f); |
|||
float2 w3 = (1.0f / 6.0) * (3.0 * f3 - 3.0 * f2); |
|||
|
|||
// Otim by Vlad, to test |
|||
// float2 w0 = (1.0 / 2.0) * f * (-1.0 + f * (2.0 - f)); |
|||
// float2 w1 = (1.0 / 6.0) * f2 * (-15.0 + 9.0 * f)) + 1.0; |
|||
// float2 w2 = (1.0 / 6.0) * f * (3.0 + f * (12.0 - f * 9.0)); |
|||
// float2 w3 = (1.0 / 2.0) * f2 * (f - 1.0); |
|||
|
|||
// Work out weighting factors and sampling offsets that will let us use bilinear filtering to |
|||
// simultaneously evaluate the middle 2 samples from the 4x4 grid. |
|||
float2 w12 = w1 + w2; |
|||
float2 offset12 = w2 / (w1 + w2); |
|||
|
|||
// Compute the final UV coordinates we'll use for sampling the texture |
|||
float2 texPos0 = texPos1 - 1; |
|||
float2 texPos3 = texPos1 + 2; |
|||
float2 texPos12 = texPos1 + offset12; |
|||
|
|||
texPos0 /= texSize; |
|||
texPos3 /= texSize; |
|||
texPos12 /= texSize; |
|||
|
|||
float4 result = 0.0; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos0.x, texPos0.y), 0.0) * w0.x * w0.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos12.x, texPos0.y), 0.0) * w12.x * w0.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos3.x, texPos0.y), 0.0) * w3.x * w0.y; |
|||
|
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos0.x, texPos12.y), 0.0) * w0.x * w12.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos12.x, texPos12.y), 0.0) * w12.x * w12.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos3.x, texPos12.y), 0.0) * w3.x * w12.y; |
|||
|
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos0.x, texPos3.y), 0.0) * w0.x * w3.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos12.x, texPos3.y), 0.0) * w12.x * w3.y; |
|||
result += TEXTURE2D_SAMPLE_LOD(tex, linearSampler, float2(texPos3.x, texPos3.y), 0.0) * w3.x * w3.y; |
|||
|
|||
return result; |
|||
} |
|||
|
|||
/* |
|||
|
|||
// manual tri-linearly interpolated texture fetch |
|||
// not really needed: used hard-wired texture interpolation |
|||
vec4 manualTexture3D( sampler3D samp, vec3 p ){ |
|||
vec3 qa = p*uvMapSize + vec3(0.5); |
|||
vec3 qi = floor(qa); |
|||
qa -= qi; |
|||
qi -= vec3(0.5); |
|||
return |
|||
mix( mix( mix( texture3D( samp, (qi+vec3(0.0,0.0,0.0))*oneOverUvMapSize ), |
|||
texture3D( samp, (qi+vec3(1.0,0.0,0.0))*oneOverUvMapSize ), qa.x ), |
|||
mix( texture3D( samp, (qi+vec3(0.0,1.0,0.0))*oneOverUvMapSize ), |
|||
texture3D( samp, (qi+vec3(1.0,1.0,0.0))*oneOverUvMapSize ), qa.x ), qa.y ), |
|||
mix( mix( texture3D( samp, (qi+vec3(0.0,0.0,1.0))*oneOverUvMapSize ), |
|||
texture3D( samp, (qi+vec3(1.0,0.0,1.0))*oneOverUvMapSize ), qa.x ), |
|||
mix( texture3D( samp, (qi+vec3(0.0,1.0,1.0))*oneOverUvMapSize ), |
|||
texture3D( samp, (qi+vec3(1.0,1.0,1.0))*oneOverUvMapSize ), qa.x ), qa.y ), qa.z ); |
|||
|
|||
} |
|||
*/ |
|
|||
fileFormatVersion: 2 |
|||
guid: dac42c6a533d53b41b931e02431564fa |
|||
timeCreated: 1474355143 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue