浏览代码
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/ScriptableRenderPipeline into HDRP/fix-sun-baking
/main
Merge branch 'HDRP/staging' of https://github.com/Unity-Technologies/ScriptableRenderPipeline into HDRP/fix-sun-baking
/main
Julien Ignace
7 年前
当前提交
13c603cb
共有 63 个文件被更改,包括 613 次插入 和 372 次删除
-
18TestProjects/HDRP_Tests/Assets/GraphicTests/Common/RP_Assets/HDRP_Test_Def.asset
-
18TestProjects/HDRP_Tests/Assets/GraphicTests/Common/RP_Assets/HDRP_Test_Def_DepthPrepass.asset
-
18TestProjects/HDRP_Tests/Assets/GraphicTests/Common/RP_Assets/HDRP_Test_Def_DepthPrepass_AlphaOnly.asset
-
18TestProjects/HDRP_Tests/Assets/GraphicTests/Common/RP_Assets/HDRP_Test_Fwd.asset
-
17TestProjects/HDRP_Tests/Assets/GraphicTests/Common/RP_Assets/HDRenderPipelineAsset.asset
-
16TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9001_Decals/Decal_All.mat
-
16TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9001_Decals/Decal_Color.mat
-
15TestProjects/HDRP_Tests/Assets/GraphicTests/Scenes/9x_Other/9001_Decals/Decal_Mask.mat
-
6com.unity.render-pipelines.high-definition/CHANGELOG.md
-
2com.unity.render-pipelines.high-definition/HDRP/Camera/HDAdditionalCameraData.cs
-
22com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.cs
-
84com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Decal/DecalUI.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/RenderPipeline/Settings/GlobalDecalSettingsUI.cs
-
6com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/HDRPVersion.cs
-
35com.unity.render-pipelines.high-definition/HDRP/Editor/Upgraders/UpgradeMenuItem.cs
-
63com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/LightLoopDef.hlsl
-
5com.unity.render-pipelines.high-definition/HDRP/Material/Decal/Decal.hlsl
-
2com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.shader
-
2com.unity.render-pipelines.high-definition/HDRP/Material/Lit/LitTessellation.shader
-
2com.unity.render-pipelines.high-definition/HDRP/Material/Material.hlsl
-
2com.unity.render-pipelines.high-definition/HDRP/Material/StackLit/StackLit.shader
-
20com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/SubsurfaceScattering.hlsl
-
29com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
-
14com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipelineAsset.cs
-
81com.unity.render-pipelines.high-definition/HDRP/RenderPipelineResources/HDRenderPipelineResources.asset
-
80com.unity.render-pipelines.high-definition/HDRP/ShaderVariables.hlsl
-
10com.unity.render-pipelines.high-definition/HDRP/ShaderVariablesFunctions.hlsl
-
6com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader
-
2com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs.meta
-
8com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering.meta
-
68com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/ShaderVariablesLightLoop.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/LightLoop/ShaderVariablesLightLoop.hlsl.meta
-
8com.unity.render-pipelines.high-definition/HDRP/Lighting/ScreenSpaceLighting.meta
-
5com.unity.render-pipelines.high-definition/HDRP/Material/Decal/ShaderVariablesDecal.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Material/Decal/ShaderVariablesDecal.hlsl.meta
-
18com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/ShaderVariablesSubsurfaceScattering.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/ShaderVariablesSubsurfaceScattering.hlsl.meta
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs.hlsl.meta
-
82com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.hlsl.meta
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader.meta
-
33com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/ShaderVariablesAtmosphericScattering.hlsl
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/ShaderVariablesAtmosphericScattering.hlsl.meta
-
9com.unity.render-pipelines.high-definition/HDRP/Lighting/ScreenSpaceLighting/ShaderVariablesScreenSpaceLighting.hlsl.meta
-
29com.unity.render-pipelines.high-definition/HDRP/Lighting/ScreenSpaceLighting/ShaderVariablesScreenSpaceLighting.hlsl
-
1TestProjects/HDRP_Tests/ProjectSettings/ProjectVersion.txt
-
10com.unity.render-pipelines.high-definition/HDRP/Sky/AtmosphericScattering.meta
-
10com.unity.render-pipelines.high-definition/HDRP/Sky/OpaqueAtmosphericScattering.shader.meta
-
10com.unity.render-pipelines.high-definition/HDRP/Sky/SkyVariables.hlsl.meta
-
20com.unity.render-pipelines.high-definition/HDRP/Sky/SkyVariables.hlsl
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/OpaqueAtmosphericScattering.shader
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs.meta
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/ExponentialFog.cs.meta
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/LinearFog.cs.meta
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs.hlsl
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/VolumetricFog.cs.meta
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/AtmosphericScattering.cs
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/ExponentialFog.cs
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/LinearFog.cs
-
0/com.unity.render-pipelines.high-definition/HDRP/Lighting/AtmosphericScattering/VolumetricFog.cs
|
|||
fileFormatVersion: 2 |
|||
guid: 41811d2641d454a48819f6e50a816af9 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifdef SHADER_VARIABLES_INCLUDE_CB |
|||
|
|||
#define MAX_ENV2D_LIGHT 32 |
|||
|
|||
uint _DirectionalLightCount; |
|||
uint _PunctualLightCount; |
|||
uint _AreaLightCount; |
|||
uint _EnvLightCount; |
|||
uint _EnvProxyCount; |
|||
int _EnvLightSkyEnabled; // TODO: make it a bool |
|||
|
|||
uint _NumTileFtplX; |
|||
uint _NumTileFtplY; |
|||
|
|||
// these uniforms are only needed for when OPAQUES_ONLY is NOT defined |
|||
// but there's a problem with our front-end compilation of compute shaders with multiple kernels causing it to error |
|||
//#ifdef USE_CLUSTERED_LIGHTLIST |
|||
float4x4 g_mInvScrProjection; // TODO: remove, unused in HDRP |
|||
|
|||
float g_fClustScale; |
|||
float g_fClustBase; |
|||
float g_fNearPlane; |
|||
float g_fFarPlane; |
|||
int g_iLog2NumClusters; // We need to always define these to keep constant buffer layouts compatible |
|||
|
|||
uint g_isLogBaseBufferEnabled; |
|||
//#endif |
|||
|
|||
//#ifdef USE_CLUSTERED_LIGHTLIST |
|||
uint _NumTileClusteredX; |
|||
uint _NumTileClusteredY; |
|||
|
|||
float4x4 _Env2DCaptureVP[MAX_ENV2D_LIGHT]; |
|||
|
|||
#else |
|||
|
|||
#include "HDRP/Lighting/LightDefinition.cs.hlsl" |
|||
#include "CoreRP/Shadow/ShadowBase.cs.hlsl" |
|||
|
|||
StructuredBuffer<uint> g_vLightListGlobal; // don't support Buffer yet in unity |
|||
|
|||
StructuredBuffer<uint> g_vLayeredOffsetsBuffer; // don't support Buffer yet in unity |
|||
StructuredBuffer<float> g_logBaseBuffer; // don't support Buffer yet in unity |
|||
//#endif |
|||
|
|||
#ifdef USE_INDIRECT |
|||
StructuredBuffer<uint> g_TileFeatureFlags; |
|||
#endif |
|||
|
|||
StructuredBuffer<DirectionalLightData> _DirectionalLightDatas; |
|||
StructuredBuffer<LightData> _LightDatas; |
|||
StructuredBuffer<EnvLightData> _EnvLightDatas; |
|||
StructuredBuffer<ShadowData> _ShadowDatas; |
|||
|
|||
// Used by directional and spot lights |
|||
TEXTURE2D_ARRAY(_CookieTextures); |
|||
|
|||
// Used by point lights |
|||
TEXTURECUBE_ARRAY_ABSTRACT(_CookieCubeTextures); |
|||
|
|||
// Use texture array for reflection (or LatLong 2D array for mobile) |
|||
TEXTURECUBE_ARRAY_ABSTRACT(_EnvCubemapTextures); |
|||
TEXTURE2D_ARRAY(_Env2DTextures); |
|||
|
|||
// XRTODO: Need to stereo-ize access |
|||
TEXTURE2D(_DeferredShadowTexture); |
|||
|
|||
#endif |
|
|||
fileFormatVersion: 2 |
|||
guid: 63d561c067f228044bff7c3922047bf2 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 8201940de2426934dbd592ff5cf182c9 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifdef SHADER_VARIABLES_INCLUDE_CB |
|||
uint _EnableDBuffer; |
|||
float2 _DecalAtlasResolution; |
|||
#else |
|||
#endif |
|
|||
fileFormatVersion: 2 |
|||
guid: 9f6cea0783427804084f429e8502ad33 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifdef SHADER_VARIABLES_INCLUDE_CB |
|||
#include "HDRP/Material/DiffusionProfile/DiffusionProfileSettings.cs.hlsl" |
|||
|
|||
// Warning: Unity is not able to losslessly transfer integers larger than 2^24 to the shader system. |
|||
// Therefore, we bitcast uint to float in C#, and bitcast back to uint in the shader. |
|||
uint _EnableSubsurfaceScattering; // Globally toggles subsurface and transmission scattering on/off |
|||
float _TexturingModeFlags; // 1 bit/profile; 0 = PreAndPostScatter, 1 = PostScatter |
|||
float _TransmissionFlags; // 1 bit/profile; 0 = regular, 1 = thin |
|||
// Old SSS Model >>> |
|||
float4 _HalfRcpVariancesAndWeights[DIFFUSION_PROFILE_COUNT][2]; // 2x Gaussians in RGB, A is interpolation weights |
|||
// <<< Old SSS Model |
|||
// Use float4 to avoid any packing issue between compute and pixel shaders |
|||
float4 _ThicknessRemaps[DIFFUSION_PROFILE_COUNT]; // R: start, G = end - start, BA unused |
|||
float4 _ShapeParams[DIFFUSION_PROFILE_COUNT]; // RGB = S = 1 / D, A = filter radius |
|||
float4 _TransmissionTintsAndFresnel0[DIFFUSION_PROFILE_COUNT]; // RGB = 1/4 * color, A = fresnel0 |
|||
float4 _WorldScales[DIFFUSION_PROFILE_COUNT]; // X = meters per world unit; Y = world units per meter |
|||
#else |
|||
#endif |
|
|||
fileFormatVersion: 2 |
|||
guid: 63af6347132378d43b75aa5e4efeb029 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 22ede5ad2c67e3148bf5bd9fa48b2734 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifndef UNITY_ATMOSPHERIC_SCATTERING_INCLUDED |
|||
#define UNITY_ATMOSPHERIC_SCATTERING_INCLUDED |
|||
|
|||
#include "CoreRP/ShaderLibrary/VolumeRendering.hlsl" |
|||
#include "CoreRP/ShaderLibrary/Filtering.hlsl" |
|||
|
|||
#include "AtmosphericScattering.cs.hlsl" |
|||
#include "HDRP/ShaderVariables.hlsl" |
|||
#include "HDRP/Lighting/Volumetrics/VBuffer.hlsl" |
|||
|
|||
#ifdef DEBUG_DISPLAY |
|||
#include "HDRP/Debug/DebugDisplay.hlsl" |
|||
#endif |
|||
|
|||
float3 GetFogColor(PositionInputs posInput) |
|||
{ |
|||
if (_FogColorMode == FOGCOLORMODE_CONSTANT_COLOR) |
|||
{ |
|||
return _FogColor.rgb; |
|||
} |
|||
else if (_FogColorMode == FOGCOLORMODE_SKY_COLOR) |
|||
{ |
|||
// Based on Uncharted 4 "Mip Sky Fog" trick: http://advances.realtimerendering.com/other/2016/naughty_dog/NaughtyDog_TechArt_Final.pdf |
|||
float mipLevel = (1.0 - _MipFogMaxMip * saturate((posInput.linearDepth - _MipFogNear) / (_MipFogFar - _MipFogNear))) * _SkyTextureMipCount; |
|||
float3 dir = -GetWorldSpaceNormalizeViewDir(posInput.positionWS); |
|||
return SampleSkyTexture(dir, mipLevel).rgb; |
|||
} |
|||
else // Should not be possible. |
|||
return float3(0.0, 0.0, 0.0); |
|||
} |
|||
|
|||
// Returns fog color in rgb and fog factor in alpha. |
|||
float4 EvaluateAtmosphericScattering(PositionInputs posInput) |
|||
{ |
|||
float3 fogColor = 0; |
|||
float fogFactor = 0; |
|||
|
|||
#ifdef DEBUG_DISPLAY |
|||
// Don't sample atmospheric scattering when lighting debug more are enabled so fog is not visible |
|||
if (_DebugLightingMode == DEBUGLIGHTINGMODE_DIFFUSE_LIGHTING || _DebugLightingMode == DEBUGLIGHTINGMODE_SPECULAR_LIGHTING || _DebugLightingMode == DEBUGLIGHTINGMODE_LUX_METER) |
|||
return float4(0, 0, 0, 0); |
|||
#endif |
|||
|
|||
switch (_AtmosphericScatteringType) |
|||
{ |
|||
case FOGTYPE_LINEAR: |
|||
{ |
|||
fogColor = GetFogColor(posInput); |
|||
fogFactor = _FogDensity * saturate((posInput.linearDepth - _LinearFogStart) * _LinearFogOneOverRange) * saturate((_LinearFogHeightEnd - GetAbsolutePositionWS(posInput.positionWS).y) * _LinearFogHeightOneOverRange); |
|||
break; |
|||
} |
|||
case FOGTYPE_EXPONENTIAL: |
|||
{ |
|||
fogColor = GetFogColor(posInput); |
|||
float distance = length(GetWorldSpaceViewDir(posInput.positionWS)); |
|||
float fogHeight = max(0.0, GetAbsolutePositionWS(posInput.positionWS).y - _ExpFogBaseHeight); |
|||
fogFactor = _FogDensity * TransmittanceHomogeneousMedium(_ExpFogHeightAttenuation, fogHeight) * (1.0f - TransmittanceHomogeneousMedium(1.0f / _ExpFogDistance, distance)); |
|||
break; |
|||
} |
|||
case FOGTYPE_VOLUMETRIC: |
|||
{ |
|||
float4 volFog = SampleVolumetricLighting(TEXTURE3D_PARAM(_VBufferLighting, s_linear_clamp_sampler), |
|||
posInput.positionNDC, |
|||
posInput.linearDepth, |
|||
_VBufferResolution, |
|||
_VBufferSliceCount.xy, |
|||
_VBufferUvScaleAndLimit.xy, |
|||
_VBufferUvScaleAndLimit.zw, |
|||
_VBufferDepthEncodingParams, |
|||
_VBufferDepthDecodingParams, |
|||
true, true); |
|||
|
|||
fogFactor = 1 - volFog.a; // Opacity from transmittance |
|||
fogColor = volFog.rgb * min(rcp(fogFactor), FLT_MAX); // Un-premultiply, clamp to avoid (0 * INF = NaN) |
|||
break; |
|||
} |
|||
} |
|||
|
|||
return float4(fogColor, fogFactor); |
|||
} |
|||
|
|||
#endif |
|
|||
fileFormatVersion: 2 |
|||
guid: 14cc5dd8542c537438a7b0282cbc2a6f |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 32f724728cf19904291226f239ec16f0 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifdef SHADER_VARIABLES_INCLUDE_CB |
|||
int _AtmosphericScatteringType; |
|||
// Common |
|||
float _FogColorMode; |
|||
float4 _FogColorDensity; // color in rgb, density in alpha |
|||
float4 _MipFogParameters; |
|||
// Linear fog |
|||
float4 _LinearFogParameters; |
|||
// Exp fog |
|||
float4 _ExpFogParameters; |
|||
|
|||
float _SkyTextureMipCount; |
|||
#else |
|||
TEXTURE3D(_VBufferLighting); |
|||
TEXTURECUBE(_SkyTexture); |
|||
|
|||
#define _MipFogNear _MipFogParameters.x |
|||
#define _MipFogFar _MipFogParameters.y |
|||
#define _MipFogMaxMip _MipFogParameters.z |
|||
|
|||
#define _FogDensity _FogColorDensity.w |
|||
#define _FogColor _FogColorDensity |
|||
|
|||
#define _LinearFogStart _LinearFogParameters.x |
|||
#define _LinearFogOneOverRange _LinearFogParameters.y |
|||
#define _LinearFogHeightEnd _LinearFogParameters.z |
|||
#define _LinearFogHeightOneOverRange _LinearFogParameters.w |
|||
|
|||
#define _ExpFogDistance _ExpFogParameters.x |
|||
#define _ExpFogBaseHeight _ExpFogParameters.y |
|||
#define _ExpFogHeightAttenuation _ExpFogParameters.z |
|||
#endif |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 08e9d756e08b10445b237c82ec588e47 |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: c78e4b79bf403f44f87fc4f81662898e |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifdef SHADER_VARIABLES_INCLUDE_CB |
|||
// Buffer pyramid |
|||
float4 _ColorPyramidSize; // (x,y) = Actual Pixel Size, (z,w) = 1 / Actual Pixel Size |
|||
float4 _DepthPyramidSize; // (x,y) = Actual Pixel Size, (z,w) = 1 / Actual Pixel Size |
|||
float4 _CameraMotionVectorsSize; // (x,y) = Actual Pixel Size, (z,w) = 1 / Actual Pixel Size |
|||
float4 _ColorPyramidScale; // (x,y) = Screen Scale, z = lod count, w = unused |
|||
float4 _DepthPyramidScale; // (x,y) = Screen Scale, z = lod count, w = unused |
|||
float4 _CameraMotionVectorsScale; // (x,y) = Screen Scale, z = lod count, w = unused |
|||
|
|||
// Screen space lighting |
|||
float _SSRefractionInvScreenWeightDistance; // Distance for screen space smoothstep with fallback |
|||
float _SSReflectionInvScreenWeightDistance; // Distance for screen space smoothstep with fallback |
|||
int _SSReflectionEnabled; |
|||
int _SSReflectionProjectionModel; |
|||
int _SSReflectionHiZRayMarchBehindObject; |
|||
int _SSRefractionHiZRayMarchBehindObject; |
|||
|
|||
// Ambiant occlusion |
|||
float4 _AmbientOcclusionParam; // xyz occlusion color, w directLightStrenght |
|||
#else |
|||
// Rough refraction texture |
|||
// Color pyramid (width, height, lodcount, Unused) |
|||
TEXTURE2D(_ColorPyramidTexture); |
|||
// Depth pyramid (width, height, lodcount, Unused) |
|||
TEXTURE2D(_DepthPyramidTexture); |
|||
// Ambient occlusion texture |
|||
TEXTURE2D(_AmbientOcclusionTexture); |
|||
TEXTURE2D(_CameraMotionVectorsTexture); |
|||
#endif |
|
|||
m_EditorVersion: 2018.2.0f1 |
|
|||
fileFormatVersion: 2 |
|||
guid: d522828bc0314e14cb6faa4291bb64da |
|||
folderAsset: yes |
|||
timeCreated: 1507718579 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 326059e48e5735e46a98047eff4f0295 |
|||
timeCreated: 1507736585 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 7ed7d57e43fdd874ab5d047358e9fbe1 |
|||
timeCreated: 1508156067 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
externalObjects: {} |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
#ifndef UNITY_SKY_VARIABLES_INCLUDED |
|||
#define UNITY_SKY_VARIABLES_INCLUDED |
|||
|
|||
TEXTURECUBE(_SkyTexture); |
|||
|
|||
CBUFFER_START(SkyParameters) |
|||
float _SkyTextureMipCount; |
|||
CBUFFER_END |
|||
|
|||
float4 SampleSkyTexture(float3 texCoord) |
|||
{ |
|||
return SAMPLE_TEXTURECUBE(_SkyTexture, s_trilinear_clamp_sampler, texCoord); |
|||
} |
|||
|
|||
float4 SampleSkyTexture(float3 texCoord, float lod) |
|||
{ |
|||
return SAMPLE_TEXTURECUBE_LOD(_SkyTexture, s_trilinear_clamp_sampler, texCoord, lod); |
|||
} |
|||
|
|||
#endif |
撰写
预览
正在加载...
取消
保存
Reference in new issue