sebastienlagarde
8 年前
当前提交
acd11ee0
共有 40 个文件被更改,包括 1909 次插入 和 1902 次删除
-
2Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset
-
2Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset.meta
-
706Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
-
174Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoopInspector.cs
-
192Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/GBufferDebug.shader
-
2Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Lighting.hlsl
-
128Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightingDeferred.shader
-
46Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/LightingForward.hlsl
-
28Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/BuiltinData.hlsl
-
98Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Material.hlsl
-
12Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Unlit.hlsl
-
192Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit.hlsl
-
222Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/PostProcess/FinalPass.shader
-
180Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderVariables.hlsl
-
254Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Unlit.shader
-
208Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lit.cs
-
256Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/TemplateLit.hlsl
-
2Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11.hlsl
-
2Assets/ScriptableRenderLoop/ShaderLibrary/API/D3D11_1.hlsl
-
8Assets/ScriptableRenderLoop/ShaderLibrary/API/Validate.hlsl
-
79Assets/ScriptableRenderLoop/ShaderLibrary/BSDF.hlsl
-
138Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl
-
32Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl
-
28Assets/ScriptableRenderLoop/ShaderLibrary/CommonLighting.hlsl
-
12Assets/ScriptableRenderLoop/ShaderLibrary/Filtering.hlsl
-
134Assets/ScriptableRenderLoop/ShaderLibrary/Packing.hlsl
-
30Assets/ScriptableRenderLoop/ShaderLibrary/QuaternionMath.hlsl
-
12Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lit.cs.meta
-
284Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lit.shader
-
9Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lit.shader.meta
-
9Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit.hlsl.meta
-
9Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/TemplateLit.hlsl.meta
-
8Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/DisneyGGX.hlsl.meta
-
9Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/DisneyGGX.shader.meta
-
8Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/TemplateDisneyGGX.hlsl.meta
-
12Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/DisneyGGX.cs.meta
-
284Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/DisneyGGX.shader
-
0/Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit.hlsl
-
0/Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lit.cs
-
0/Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/TemplateLit.hlsl
|
|||
fileFormatVersion: 2 |
|||
guid: 2400b74f5ce370c4481e5dc417d03703 |
|||
timeCreated: 1474923798 |
|||
timeCreated: 1475845998 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|
|||
Shader "Hidden/Unity/GBufferDebug" |
|||
{ |
|||
SubShader |
|||
{ |
|||
SubShader |
|||
{ |
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
Blend One Zero |
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
Blend One Zero |
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
#pragma vertex VertDeferred |
|||
#pragma fragment FragDeferred |
|||
#pragma vertex VertDeferred |
|||
#pragma fragment FragDeferred |
|||
// CAUTION: In case deferred lighting need to support various lighting model statically, we will require to do multicompile with different define like UNITY_MATERIAL_DISNEYGXX |
|||
#define UNITY_MATERIAL_DISNEYGGX // Need to be define before including Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Lighting.hlsl" // This include Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderVariables.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/DebugCommon.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
// CAUTION: In case deferred lighting need to support various lighting model statically, we will require to do multicompile with different define like UNITY_MATERIAL_DISNEYGXX |
|||
#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Lighting/Lighting.hlsl" // This include Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderVariables.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/DebugCommon.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
DECLARE_GBUFFER_TEXTURE(_CameraGBufferTexture); |
|||
DECLARE_GBUFFER_BAKE_LIGHTING(_CameraGBufferTexture); |
|||
Texture2D _CameraDepthTexture; |
|||
float4 _ScreenSize; |
|||
float _DebugMode; |
|||
float4x4 _InvViewProjMatrix; |
|||
DECLARE_GBUFFER_TEXTURE(_CameraGBufferTexture); |
|||
DECLARE_GBUFFER_BAKE_LIGHTING(_CameraGBufferTexture); |
|||
Texture2D _CameraDepthTexture; |
|||
float4 _ScreenSize; |
|||
float _DebugMode; |
|||
float4x4 _InvViewProjMatrix; |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
}; |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS : SV_POSITION; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS : SV_POSITION; |
|||
}; |
|||
Varyings VertDeferred(Attributes input) |
|||
{ |
|||
// TODO: implement SV_vertexID full screen quad |
|||
// Lights are draw as one fullscreen quad |
|||
Varyings output; |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
Varyings VertDeferred(Attributes input) |
|||
{ |
|||
// TODO: implement SV_vertexID full screen quad |
|||
// Lights are draw as one fullscreen quad |
|||
Varyings output; |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
return output; |
|||
} |
|||
return output; |
|||
} |
|||
float4 FragDeferred(Varyings input) : SV_Target |
|||
{ |
|||
Coordinate coord = GetCoordinate(input.positionHS.xy, _ScreenSize.zw); |
|||
float4 FragDeferred(Varyings input) : SV_Target |
|||
{ |
|||
Coordinate coord = GetCoordinate(input.positionHS.xy, _ScreenSize.zw); |
|||
float depth = _CameraDepthTexture.Load(uint3(coord.unPositionSS, 0)).x; |
|||
float depth = _CameraDepthTexture.Load(uint3(coord.unPositionSS, 0)).x; |
|||
FETCH_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
BSDFData bsdfData = DECODE_FROM_GBUFFER(gbuffer); |
|||
FETCH_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
BSDFData bsdfData = DECODE_FROM_GBUFFER(gbuffer); |
|||
float3 result = float3(1.0, 1.0, 0.0); |
|||
bool outputIsLinear = false; |
|||
float3 result = float3(1.0, 1.0, 0.0); |
|||
bool outputIsLinear = false; |
|||
if (_DebugMode == GBufferDebugDiffuseColor) |
|||
{ |
|||
result = bsdfData.diffuseColor; |
|||
} |
|||
else if (_DebugMode == GBufferDebugNormal) |
|||
{ |
|||
result = bsdfData.normalWS * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugDepth) |
|||
{ |
|||
float linearDepth = frac(LinearEyeDepth(depth, _ZBufferParams) * 0.1); |
|||
result = linearDepth.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugBakedDiffuse) |
|||
{ |
|||
FETCH_BAKE_LIGHTING_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
result = DECODE_BAKE_LIGHTING_FROM_GBUFFER(gbuffer); |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSpecularColor) |
|||
{ |
|||
result = bsdfData.fresnel0; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSpecularOcclustion) |
|||
{ |
|||
result = bsdfData.specularOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSmoothness) |
|||
{ |
|||
result = (1.0 - bsdfData.perceptualRoughness).xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugMaterialId) |
|||
{ |
|||
result = bsdfData.materialId.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
if (outputIsLinear) |
|||
result = SRGBToLinear(max(0, result)); |
|||
if (_DebugMode == GBufferDebugDiffuseColor) |
|||
{ |
|||
result = bsdfData.diffuseColor; |
|||
} |
|||
else if (_DebugMode == GBufferDebugNormal) |
|||
{ |
|||
result = bsdfData.normalWS * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugDepth) |
|||
{ |
|||
float linearDepth = frac(LinearEyeDepth(depth, _ZBufferParams) * 0.1); |
|||
result = linearDepth.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugBakedDiffuse) |
|||
{ |
|||
FETCH_BAKE_LIGHTING_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
result = DECODE_BAKE_LIGHTING_FROM_GBUFFER(gbuffer); |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSpecularColor) |
|||
{ |
|||
result = bsdfData.fresnel0; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSpecularOcclustion) |
|||
{ |
|||
result = bsdfData.specularOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugSmoothness) |
|||
{ |
|||
result = (1.0 - bsdfData.perceptualRoughness).xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (_DebugMode == GBufferDebugMaterialId) |
|||
{ |
|||
result = bsdfData.materialId.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
if (outputIsLinear) |
|||
result = SRGBToLinear(max(0, result)); |
|||
return float4(result, 1.0); |
|||
} |
|||
return float4(result, 1.0); |
|||
} |
|||
ENDHLSL |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
Shader "Hidden/Unity/LightingDeferred" |
|||
{ |
|||
Properties |
|||
{ |
|||
_SrcBlend("", Float) = 1 |
|||
_DstBlend("", Float) = 1 |
|||
} |
|||
|
|||
SubShader |
|||
{ |
|||
Properties |
|||
{ |
|||
_SrcBlend("", Float) = 1 |
|||
_DstBlend("", Float) = 1 |
|||
} |
|||
|
|||
SubShader |
|||
{ |
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
Blend[_SrcBlend][_DstBlend] |
|||
Pass |
|||
{ |
|||
ZWrite Off |
|||
Blend[_SrcBlend][_DstBlend] |
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
#pragma vertex VertDeferred |
|||
#pragma fragment FragDeferred |
|||
#pragma vertex VertDeferred |
|||
#pragma fragment FragDeferred |
|||
// CAUTION: In case deferred lighting need to support various lighting model statically, we will require to do multicompile with different define like UNITY_MATERIAL_DISNEYGXX |
|||
#define UNITY_MATERIAL_DISNEYGGX // Need to be define before including Material.hlsl |
|||
#include "Lighting.hlsl" // This include Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderVariables.hlsl" |
|||
// CAUTION: In case deferred lighting need to support various lighting model statically, we will require to do multicompile with different define like UNITY_MATERIAL_DISNEYGXX |
|||
#define UNITY_MATERIAL_LIT // Need to be define before including Material.hlsl |
|||
#include "Lighting.hlsl" // This include Material.hlsl |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/ShaderVariables.hlsl" |
|||
DECLARE_GBUFFER_TEXTURE(_CameraGBufferTexture); |
|||
DECLARE_GBUFFER_BAKE_LIGHTING(_CameraGBufferTexture); |
|||
DECLARE_GBUFFER_TEXTURE(_CameraGBufferTexture); |
|||
DECLARE_GBUFFER_BAKE_LIGHTING(_CameraGBufferTexture); |
|||
Texture2D _CameraDepthTexture; |
|||
float4 _ScreenSize; |
|||
Texture2D _CameraDepthTexture; |
|||
float4 _ScreenSize; |
|||
float4x4 _InvViewProjMatrix; |
|||
float4x4 _InvViewProjMatrix; |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
}; |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS : SV_POSITION; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS : SV_POSITION; |
|||
}; |
|||
Varyings VertDeferred(Attributes input) |
|||
{ |
|||
// TODO: implement SV_vertexID full screen quad |
|||
// Lights are draw as one fullscreen quad |
|||
Varyings output; |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
Varyings VertDeferred(Attributes input) |
|||
{ |
|||
// TODO: implement SV_vertexID full screen quad |
|||
// Lights are draw as one fullscreen quad |
|||
Varyings output; |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
return output; |
|||
} |
|||
return output; |
|||
} |
|||
float4 FragDeferred(Varyings input) : SV_Target |
|||
{ |
|||
Coordinate coord = GetCoordinate(input.positionHS.xy, _ScreenSize.zw); |
|||
float4 FragDeferred(Varyings input) : SV_Target |
|||
{ |
|||
Coordinate coord = GetCoordinate(input.positionHS.xy, _ScreenSize.zw); |
|||
// No need to manage inverse depth, this is handled by the projection matrix |
|||
float depth = _CameraDepthTexture.Load(uint3(coord.unPositionSS, 0)).x; |
|||
float3 positionWS = UnprojectToWorld(depth, coord.positionSS, _InvViewProjMatrix); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(positionWS); |
|||
// No need to manage inverse depth, this is handled by the projection matrix |
|||
float depth = _CameraDepthTexture.Load(uint3(coord.unPositionSS, 0)).x; |
|||
float3 positionWS = UnprojectToWorld(depth, coord.positionSS, _InvViewProjMatrix); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(positionWS); |
|||
FETCH_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
BSDFData bsdfData = DECODE_FROM_GBUFFER(gbuffer); |
|||
FETCH_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
BSDFData bsdfData = DECODE_FROM_GBUFFER(gbuffer); |
|||
// NOTE: Currently calling the forward loop, same code... :) |
|||
float4 diffuseLighting; |
|||
float4 specularLighting; |
|||
ForwardLighting(V, positionWS, bsdfData, diffuseLighting, specularLighting); |
|||
// NOTE: Currently calling the forward loop, same code... :) |
|||
float4 diffuseLighting; |
|||
float4 specularLighting; |
|||
ForwardLighting(V, positionWS, bsdfData, diffuseLighting, specularLighting); |
|||
FETCH_BAKE_LIGHTING_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
diffuseLighting.rgb += DECODE_BAKE_LIGHTING_FROM_GBUFFER(gbuffer); |
|||
FETCH_BAKE_LIGHTING_GBUFFER(gbuffer, _CameraGBufferTexture, coord.unPositionSS); |
|||
diffuseLighting.rgb += DECODE_BAKE_LIGHTING_FROM_GBUFFER(gbuffer); |
|||
return float4(diffuseLighting.rgb + specularLighting.rgb, 1.0); |
|||
} |
|||
return float4(diffuseLighting.rgb + specularLighting.rgb, 1.0); |
|||
} |
|||
ENDHLSL |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
// Final compositing pass, just does gamma correction for now. |
|||
// Final compositing pass, just does gamma correction for now. |
|||
Properties |
|||
{ |
|||
_MainTex ("Texture", any) = "" {} |
|||
Properties |
|||
{ |
|||
_MainTex ("Texture", any) = "" {} |
|||
_ToneMapCoeffs1("Parameters for neutral tonemap", Vector) = (0.0, 0.0, 0.0, 0.0) |
|||
_ToneMapCoeffs2("Parameters for neutral tonemap", Vector) = (0.0, 0.0, 0.0, 0.0) |
|||
_Exposure("Exposure", Range(-32.0, 32.0)) = 0 |
|||
[ToggleOff] _EnableToneMap("Enable Tone Map", Float) = 0 |
|||
} |
|||
_ToneMapCoeffs1("Parameters for neutral tonemap", Vector) = (0.0, 0.0, 0.0, 0.0) |
|||
_ToneMapCoeffs2("Parameters for neutral tonemap", Vector) = (0.0, 0.0, 0.0, 0.0) |
|||
_Exposure("Exposure", Range(-32.0, 32.0)) = 0 |
|||
[ToggleOff] _EnableToneMap("Enable Tone Map", Float) = 0 |
|||
} |
|||
SubShader { |
|||
Pass { |
|||
ZTest Always Cull Off ZWrite Off |
|||
SubShader { |
|||
Pass { |
|||
ZTest Always Cull Off ZWrite Off |
|||
HLSLPROGRAM |
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
#pragma target 5.0 |
|||
HLSLPROGRAM |
|||
#pragma vertex Vert |
|||
#pragma fragment Frag |
|||
#pragma target 5.0 |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
#include "../ShaderVariables.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
#include "../ShaderVariables.hlsl" |
|||
sampler2D _MainTex; |
|||
float4 _ToneMapCoeffs1; |
|||
float4 _ToneMapCoeffs2; |
|||
sampler2D _MainTex; |
|||
float4 _ToneMapCoeffs1; |
|||
float4 _ToneMapCoeffs2; |
|||
#define InBlack _ToneMapCoeffs1.x |
|||
#define OutBlack _ToneMapCoeffs1.y |
|||
#define InWhite _ToneMapCoeffs1.z |
|||
#define OutWhite _ToneMapCoeffs1.w |
|||
#define WhiteLevel _ToneMapCoeffs2.z |
|||
#define WhiteClip _ToneMapCoeffs2.w |
|||
#define InBlack _ToneMapCoeffs1.x |
|||
#define OutBlack _ToneMapCoeffs1.y |
|||
#define InWhite _ToneMapCoeffs1.z |
|||
#define OutWhite _ToneMapCoeffs1.w |
|||
#define WhiteLevel _ToneMapCoeffs2.z |
|||
#define WhiteClip _ToneMapCoeffs2.w |
|||
float _Exposure; |
|||
float _EnableToneMap; |
|||
float _Exposure; |
|||
float _EnableToneMap; |
|||
struct Attributes { |
|||
float3 vertex : POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
struct Attributes { |
|||
float3 vertex : POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
struct Varyings { |
|||
float4 vertex : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
struct Varyings { |
|||
float4 vertex : SV_POSITION; |
|||
float2 texcoord : TEXCOORD0; |
|||
}; |
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.vertex = TransformWorldToHClip(input.vertex); |
|||
output.texcoord = input.texcoord.xy; |
|||
return output; |
|||
} |
|||
Varyings Vert(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
output.vertex = TransformWorldToHClip(input.vertex); |
|||
output.texcoord = input.texcoord.xy; |
|||
return output; |
|||
} |
|||
float3 evalCurve(float3 x, float A, float B, float C, float D, float E, float F) |
|||
{ |
|||
return ((x*(A*x + C*B) + D*E) / (x*(A*x + B) + D*F)) - E / F; |
|||
} |
|||
float3 evalCurve(float3 x, float A, float B, float C, float D, float E, float F) |
|||
{ |
|||
return ((x*(A*x + C*B) + D*E) / (x*(A*x + B) + D*F)) - E / F; |
|||
} |
|||
float3 applyTonemapFilmicAD(float3 linearColor) |
|||
{ |
|||
float blackRatio = InBlack / OutBlack; |
|||
float whiteRatio = InWhite / OutWhite; |
|||
float3 applyTonemapFilmicAD(float3 linearColor) |
|||
{ |
|||
float blackRatio = InBlack / OutBlack; |
|||
float whiteRatio = InWhite / OutWhite; |
|||
// blend tunable coefficients |
|||
float B = lerp(0.57, 0.37, blackRatio); |
|||
float C = lerp(0.01, 0.24, whiteRatio); |
|||
float D = lerp(0.02, 0.20, blackRatio); |
|||
// blend tunable coefficients |
|||
float B = lerp(0.57, 0.37, blackRatio); |
|||
float C = lerp(0.01, 0.24, whiteRatio); |
|||
float D = lerp(0.02, 0.20, blackRatio); |
|||
// constants |
|||
float A = 0.2; |
|||
float E = 0.02; |
|||
float F = 0.30; |
|||
// constants |
|||
float A = 0.2; |
|||
float E = 0.02; |
|||
float F = 0.30; |
|||
// eval and correct for white point |
|||
float3 whiteScale = 1.0f / evalCurve(WhiteLevel, A, B, C, D, E, F); |
|||
float3 curr = evalCurve(linearColor * whiteScale, A, B, C, D, E, F); |
|||
// eval and correct for white point |
|||
float3 whiteScale = 1.0f / evalCurve(WhiteLevel, A, B, C, D, E, F); |
|||
float3 curr = evalCurve(linearColor * whiteScale, A, B, C, D, E, F); |
|||
return curr * whiteScale; |
|||
} |
|||
return curr * whiteScale; |
|||
} |
|||
float3 remapWhite(float3 inPixel, float whitePt) |
|||
{ |
|||
// var breakout for readability |
|||
const float inBlack = 0; |
|||
const float outBlack = 0; |
|||
float inWhite = whitePt; |
|||
const float outWhite = 1; |
|||
float3 remapWhite(float3 inPixel, float whitePt) |
|||
{ |
|||
// var breakout for readability |
|||
const float inBlack = 0; |
|||
const float outBlack = 0; |
|||
float inWhite = whitePt; |
|||
const float outWhite = 1; |
|||
// remap input range to output range |
|||
float3 outPixel = ((inPixel.rgb) - inBlack.xxx) / (inWhite.xxx - inBlack.xxx) * (outWhite.xxx - outBlack.xxx) + outBlack.xxx; |
|||
return (outPixel.rgb); |
|||
} |
|||
// remap input range to output range |
|||
float3 outPixel = ((inPixel.rgb) - inBlack.xxx) / (inWhite.xxx - inBlack.xxx) * (outWhite.xxx - outBlack.xxx) + outBlack.xxx; |
|||
return (outPixel.rgb); |
|||
} |
|||
float3 NeutralTonemap(float3 x) |
|||
{ |
|||
float3 finalColor = applyTonemapFilmicAD(x); // curve (dynamic coeffs differ per level) |
|||
finalColor = remapWhite(finalColor, WhiteClip); // post-curve white point adjustment |
|||
finalColor = saturate(finalColor); |
|||
return finalColor; |
|||
} |
|||
float3 NeutralTonemap(float3 x) |
|||
{ |
|||
float3 finalColor = applyTonemapFilmicAD(x); // curve (dynamic coeffs differ per level) |
|||
finalColor = remapWhite(finalColor, WhiteClip); // post-curve white point adjustment |
|||
finalColor = saturate(finalColor); |
|||
return finalColor; |
|||
} |
|||
float3 ApplyToneMap(float3 color) |
|||
{ |
|||
if (_EnableToneMap > 0.0) |
|||
{ |
|||
return NeutralTonemap(color); |
|||
} |
|||
else |
|||
{ |
|||
return saturate(color); |
|||
} |
|||
} |
|||
float3 ApplyToneMap(float3 color) |
|||
{ |
|||
if (_EnableToneMap > 0.0) |
|||
{ |
|||
return NeutralTonemap(color); |
|||
} |
|||
else |
|||
{ |
|||
return saturate(color); |
|||
} |
|||
} |
|||
float4 Frag(Varyings input) : SV_Target |
|||
{ |
|||
float4 c = tex2D(_MainTex, input.texcoord); |
|||
// Gamma correction |
|||
float4 Frag(Varyings input) : SV_Target |
|||
{ |
|||
float4 c = tex2D(_MainTex, input.texcoord); |
|||
// Gamma correction |
|||
// TODO: Currenlt in the editor there a an additional pass were the result is copyed in a render target RGBA8_sRGB. |
|||
// So we must not correct the sRGB here else it will be done two time. |
|||
// To fix! |
|||
// TODO: Currenlt in the editor there a an additional pass were the result is copyed in a render target RGBA8_sRGB. |
|||
// So we must not correct the sRGB here else it will be done two time. |
|||
// To fix! |
|||
c.rgb = ApplyToneMap(c.rgb * exp2(_Exposure)); |
|||
c.rgb = ApplyToneMap(c.rgb * exp2(_Exposure)); |
|||
// return LinearToSRGB(c); |
|||
return c; |
|||
// return LinearToSRGB(c); |
|||
return c; |
|||
|
|||
} |
|||
ENDHLSL |
|||
|
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
Shader "Unity/Unlit" |
|||
{ |
|||
Properties |
|||
{ |
|||
_Color("Color", Color) = (1,1,1,1) |
|||
_ColorMap("ColorMap", 2D) = "white" {} |
|||
Properties |
|||
{ |
|||
_Color("Color", Color) = (1,1,1,1) |
|||
_ColorMap("ColorMap", 2D) = "white" {} |
|||
_EmissiveColor("EmissiveColor", Color) = (0, 0, 0) |
|||
_EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} |
|||
_EmissiveIntensity("EmissiveIntensity", Float) = 0 |
|||
_EmissiveColor("EmissiveColor", Color) = (0, 0, 0) |
|||
_EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} |
|||
_EmissiveIntensity("EmissiveIntensity", Float) = 0 |
|||
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _DistortionDepthTest("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _DistortionDepthTest("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 |
|||
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 |
|||
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 |
|||
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 |
|||
// Blending state |
|||
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 |
|||
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0 |
|||
[HideInInspector] _SrcBlend ("__src", Float) = 1.0 |
|||
[HideInInspector] _DstBlend ("__dst", Float) = 0.0 |
|||
[HideInInspector] _ZWrite ("__zw", Float) = 1.0 |
|||
[HideInInspector] _CullMode("__cullmode", Float) = 2.0 |
|||
// Blending state |
|||
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 |
|||
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0 |
|||
[HideInInspector] _SrcBlend ("__src", Float) = 1.0 |
|||
[HideInInspector] _DstBlend ("__dst", Float) = 0.0 |
|||
[HideInInspector] _ZWrite ("__zw", Float) = 1.0 |
|||
[HideInInspector] _CullMode("__cullmode", Float) = 2.0 |
|||
[Enum(None, 0, DoubleSided)] _DoubleSidedMode("Double sided mode", Float) = 0 |
|||
} |
|||
[Enum(None, 0, DoubleSided)] _DoubleSidedMode("Double sided mode", Float) = 0 |
|||
} |
|||
HLSLINCLUDE |
|||
HLSLINCLUDE |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma shader_feature _EMISSIVE_COLOR_MAP |
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma shader_feature _EMISSIVE_COLOR_MAP |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl" |
|||
#define UNITY_MATERIAL_UNLIT |
|||
#include "Material/Material.hlsl" |
|||
#include "ShaderVariables.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Common.hlsl" |
|||
#define UNITY_MATERIAL_UNLIT |
|||
#include "Material/Material.hlsl" |
|||
#include "ShaderVariables.hlsl" |
|||
float4 _Color; |
|||
sampler2D _ColorMap; |
|||
float4 _EmissiveColor; |
|||
sampler2D _EmissiveColorMap; |
|||
float _EmissiveIntensity; |
|||
float4 _Color; |
|||
sampler2D _ColorMap; |
|||
float4 _EmissiveColor; |
|||
sampler2D _EmissiveColorMap; |
|||
float _EmissiveIntensity; |
|||
ENDHLSL |
|||
ENDHLSL |
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" } |
|||
LOD 300 |
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" } |
|||
LOD 300 |
|||
// ------------------------------------------------------------------ |
|||
// forward pass |
|||
Pass |
|||
{ |
|||
Name "Forward" // Name is not used |
|||
Tags { "LightMode" = "ForwardUnlit" } // This will be only for transparent object based on the RenderQueue index |
|||
// ------------------------------------------------------------------ |
|||
// forward pass |
|||
Pass |
|||
{ |
|||
Name "Forward" // Name is not used |
|||
Tags { "LightMode" = "ForwardUnlit" } // This will be only for transparent object based on the RenderQueue index |
|||
Blend [_SrcBlend] [_DstBlend] |
|||
ZWrite [_ZWrite] |
|||
Cull [_CullMode] |
|||
Blend [_SrcBlend] [_DstBlend] |
|||
ZWrite [_ZWrite] |
|||
Cull [_CullMode] |
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragForward |
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragForward |
|||
// Forward |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
float2 uv0 : TEXCOORD0; |
|||
}; |
|||
// Forward |
|||
struct Attributes |
|||
{ |
|||
float3 positionOS : POSITION; |
|||
float2 uv0 : TEXCOORD0; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS; |
|||
float2 texCoord0; |
|||
}; |
|||
struct Varyings |
|||
{ |
|||
float4 positionHS; |
|||
float2 texCoord0; |
|||
}; |
|||
struct PackedVaryings |
|||
{ |
|||
float4 positionHS : SV_Position; |
|||
float4 interpolators[1] : TEXCOORD0; |
|||
}; |
|||
struct PackedVaryings |
|||
{ |
|||
float4 positionHS : SV_Position; |
|||
float4 interpolators[1] : TEXCOORD0; |
|||
}; |
|||
// Function to pack data to use as few interpolator as possible, the ShaderGraph should generate these functions |
|||
PackedVaryings PackVaryings(Varyings input) |
|||
{ |
|||
PackedVaryings output; |
|||
output.positionHS = input.positionHS; |
|||
output.interpolators[0].xy = input.texCoord0.xy; |
|||
output.interpolators[0].zw = float2(0.0, 0.0); |
|||
// Function to pack data to use as few interpolator as possible, the ShaderGraph should generate these functions |
|||
PackedVaryings PackVaryings(Varyings input) |
|||
{ |
|||
PackedVaryings output; |
|||
output.positionHS = input.positionHS; |
|||
output.interpolators[0].xy = input.texCoord0.xy; |
|||
output.interpolators[0].zw = float2(0.0, 0.0); |
|||
return output; |
|||
} |
|||
return output; |
|||
} |
|||
Varyings UnpackVaryings(PackedVaryings input) |
|||
{ |
|||
Varyings output; |
|||
output.positionHS = input.positionHS; |
|||
output.texCoord0.xy = input.interpolators[0].xy; |
|||
Varyings UnpackVaryings(PackedVaryings input) |
|||
{ |
|||
Varyings output; |
|||
output.positionHS = input.positionHS; |
|||
output.texCoord0.xy = input.interpolators[0].xy; |
|||
return output; |
|||
} |
|||
return output; |
|||
} |
|||
PackedVaryings VertDefault(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
PackedVaryings VertDefault(Attributes input) |
|||
{ |
|||
Varyings output; |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
// TODO deal with camera center rendering and instancing (This is the reason why we always perform tow steps transform to clip space + instancing matrix) |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
float3 positionWS = TransformObjectToWorld(input.positionOS); |
|||
// TODO deal with camera center rendering and instancing (This is the reason why we always perform tow steps transform to clip space + instancing matrix) |
|||
output.positionHS = TransformWorldToHClip(positionWS); |
|||
output.texCoord0 = input.uv0; |
|||
output.texCoord0 = input.uv0; |
|||
return PackVaryings(output); |
|||
} |
|||
return PackVaryings(output); |
|||
} |
|||
void GetSurfaceAndBuiltinData(Varyings input, out SurfaceData surfaceData, out BuiltinData builtinData) |
|||
{ |
|||
surfaceData.color = tex2D(_ColorMap, input.texCoord0).rgb * _Color.rgb; |
|||
float alpha = tex2D(_ColorMap, input.texCoord0).a * _Color.rgb; |
|||
void GetSurfaceAndBuiltinData(Varyings input, out SurfaceData surfaceData, out BuiltinData builtinData) |
|||
{ |
|||
surfaceData.color = tex2D(_ColorMap, input.texCoord0).rgb * _Color.rgb; |
|||
float alpha = tex2D(_ColorMap, input.texCoord0).a * _Color.rgb; |
|||
#ifdef _ALPHATEST_ON |
|||
clip(alpha - _AlphaCutoff); |
|||
#endif |
|||
#ifdef _ALPHATEST_ON |
|||
clip(alpha - _AlphaCutoff); |
|||
#endif |
|||
builtinData.opacity = alpha; |
|||
builtinData.opacity = alpha; |
|||
// Builtin Data |
|||
builtinData.bakeDiffuseLighting = float3(0.0, 0.0, 0.0); |
|||
// Builtin Data |
|||
builtinData.bakeDiffuseLighting = float3(0.0, 0.0, 0.0); |
|||
#ifdef _EMISSIVE_COLOR_MAP |
|||
builtinData.emissiveColor = tex2D(_EmissiveColorMap, input.texCoord0).rgb * _EmissiveColor; |
|||
#else |
|||
builtinData.emissiveColor = _EmissiveColor; |
|||
#endif |
|||
#ifdef _EMISSIVE_COLOR_MAP |
|||
builtinData.emissiveColor = tex2D(_EmissiveColorMap, input.texCoord0).rgb * _EmissiveColor; |
|||
#else |
|||
builtinData.emissiveColor = _EmissiveColor; |
|||
#endif |
|||
builtinData.emissiveIntensity = _EmissiveIntensity; |
|||
builtinData.emissiveIntensity = _EmissiveIntensity; |
|||
builtinData.velocity = float2(0.0, 0.0); |
|||
builtinData.velocity = float2(0.0, 0.0); |
|||
builtinData.distortion = float2(0.0, 0.0); |
|||
builtinData.distortionBlur = 0.0; |
|||
} |
|||
builtinData.distortion = float2(0.0, 0.0); |
|||
builtinData.distortionBlur = 0.0; |
|||
} |
|||
#if SHADER_STAGE_FRAGMENT |
|||
#if SHADER_STAGE_FRAGMENT |
|||
float4 FragForward(PackedVaryings packedInput) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
float4 FragForward(PackedVaryings packedInput) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData); |
|||
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData); |
|||
return float4(bsdfData.color, builtinData.opacity); |
|||
} |
|||
return float4(bsdfData.color, builtinData.opacity); |
|||
} |
|||
#endif |
|||
#endif |
|||
ENDHLSL |
|||
} |
|||
} |
|||
ENDHLSL |
|||
} |
|||
} |
|||
} |
|
|||
// This file assume SHADER_API_D3D11 is defined |
|||
|
|||
#define UNITY_UV_STARTS_AT_TOP 1 |
|||
#define UNITY_UV_STARTS_AT_TOP 1 |
|
|||
fileFormatVersion: 2 |
|||
guid: a32e137dfdbc0e2449264ec8c62798b9 |
|||
timeCreated: 1475845767 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unity/Lit" |
|||
{ |
|||
Properties |
|||
{ |
|||
// Following set of parameters represent the parameters node inside the MaterialGraph. |
|||
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist. |
|||
|
|||
// Reminder. Color here are in linear but the UI (color picker) do the conversion sRGB to linear |
|||
_BaseColor("BaseColor", Color) = (1,1,1,1) |
|||
_BaseColorMap("BaseColorMap", 2D) = "white" {} |
|||
|
|||
_Mettalic("Mettalic", Range(0.0, 1.0)) = 0 |
|||
_Smoothness("Smoothness", Range(0.0, 1.0)) = 0.5 |
|||
_MaskMap("MaskMap", 2D) = "white" {} |
|||
|
|||
_SpecularOcclusionMap("SpecularOcclusion", 2D) = "white" {} |
|||
|
|||
_NormalMap("NormalMap", 2D) = "bump" {} |
|||
[Enum(TangentSpace, 0, ObjectSpace, 1)] _NormalMapSpace("NormalMap space", Float) = 0 |
|||
|
|||
_HeightMap("HeightMap", 2D) = "black" {} |
|||
_HeightScale("Height Scale", Float) = 1 |
|||
_HeightBias("Height Bias", Float) = 0 |
|||
[Enum(Parallax, 0, Displacement, 1)] _HeightMapMode("Heightmap usage", Float) = 0 |
|||
|
|||
_SubSurfaceRadius("SubSurfaceRadius", Range(0.0, 1.0)) = 0 |
|||
_SubSurfaceRadiusMap("SubSurfaceRadiusMap", 2D) = "white" {} |
|||
//_Thickness("Thickness", Range(0.0, 1.0)) = 0 |
|||
//_ThicknessMap("ThicknessMap", 2D) = "white" {} |
|||
//_SubSurfaceProfile("SubSurfaceProfile", Float) = 0 |
|||
|
|||
//_CoatCoverage("CoatCoverage", Range(0.0, 1.0)) = 0 |
|||
//_CoatCoverageMap("CoatCoverageMapMap", 2D) = "white" {} |
|||
|
|||
//_CoatRoughness("CoatRoughness", Range(0.0, 1.0)) = 0 |
|||
//_CoatRoughnessMap("CoatRoughnessMap", 2D) = "white" {} |
|||
|
|||
// _DistortionVectorMap("DistortionVectorMap", 2D) = "white" {} |
|||
// _DistortionBlur("DistortionBlur", Range(0.0, 1.0)) = 0 |
|||
|
|||
// Following options are for the GUI inspector and different from the input parameters above |
|||
// These option below will cause different compilation flag. |
|||
|
|||
_DiffuseLightingMap("DiffuseLightingMap", 2D) = "black" {} |
|||
_EmissiveColor("EmissiveColor", Color) = (0, 0, 0) |
|||
_EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} |
|||
_EmissiveIntensity("EmissiveIntensity", Float) = 0 |
|||
|
|||
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _DistortionDepthTest("Distortion Only", Float) = 0.0 |
|||
|
|||
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 |
|||
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 |
|||
|
|||
// Blending state |
|||
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 |
|||
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0 |
|||
[HideInInspector] _SrcBlend ("__src", Float) = 1.0 |
|||
[HideInInspector] _DstBlend ("__dst", Float) = 0.0 |
|||
[HideInInspector] _ZWrite ("__zw", Float) = 1.0 |
|||
[HideInInspector] _CullMode("__cullmode", Float) = 2.0 |
|||
// Material Id |
|||
[HideInInspector] _MaterialId("_MaterialId", FLoat) = 0 |
|||
|
|||
[Enum(Mask Alpha, 0, BaseColor Alpha, 1)] _SmoothnessTextureChannel("Smoothness texture channel", Float) = 1 |
|||
[Enum(Use Emissive Color, 0, Use Emissive Mask, 1)] _EmissiveColorMode("Emissive color mode", Float) = 1 |
|||
[Enum(None, 0, DoubleSided, 1, DoubleSidedLigthingFlip, 2, DoubleSidedLigthingMirror, 3)] _DoubleSidedMode("Double sided mode", Float) = 0 |
|||
} |
|||
|
|||
HLSLINCLUDE |
|||
|
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
|
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma shader_feature _ _DOUBLESIDED_LIGHTING_FLIP _DOUBLESIDED_LIGHTING_MIRROR |
|||
#pragma shader_feature _NORMALMAP |
|||
#pragma shader_feature _NORMALMAP_TANGENT_SPACE |
|||
#pragma shader_feature _MASKMAP |
|||
#pragma shader_feature _SPECULAROCCLUSIONMAP |
|||
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|||
#pragma shader_feature _EMISSIVE_COLOR |
|||
#pragma shader_feature _EMISSIVE_COLOR_MAP |
|||
#pragma shader_feature _HEIGHTMAP |
|||
#pragma shader_feature _HEIGHTMAP_AS_DISPLACEMENT |
|||
|
|||
#include "TemplateLit.hlsl" |
|||
|
|||
ENDHLSL |
|||
|
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" } |
|||
LOD 300 |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Deferred pass |
|||
Pass |
|||
{ |
|||
Name "GBuffer" // Name is not used |
|||
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index |
|||
|
|||
Cull [_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragDeferred |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
void FragDeferred( PackedVaryings packedInput, |
|||
OUTPUT_GBUFFER(outGBuffer) |
|||
#ifdef VELOCITY_IN_GBUFFER |
|||
, OUTPUT_GBUFFER_VELOCITY(outGBuffer) |
|||
#endif |
|||
, OUTPUT_GBUFFER_BAKE_LIGHTING(outGBuffer) |
|||
) |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
ENCODE_INTO_GBUFFER(surfaceData, outGBuffer); |
|||
#ifdef VELOCITY_IN_GBUFFER |
|||
ENCODE_VELOCITY_INTO_GBUFFER(builtinData.velocity, outGBuffer); |
|||
#endif |
|||
ENCODE_BAKE_LIGHTING_INTO_GBUFFER(GetBakedDiffuseLigthing(surfaceData, builtinData), outGBuffer); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Debug pass |
|||
Pass |
|||
{ |
|||
Name "Debug" |
|||
Tags { "LightMode" = "Debug" } |
|||
|
|||
Cull[_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragDebug |
|||
|
|||
int g_MaterialDebugMode; |
|||
|
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/DebugCommon.hlsl" |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
float4 FragDebug( PackedVaryings packedInput ) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
float3 result = float3(1.0, 1.0, 0.0); |
|||
bool outputIsLinear = false; |
|||
|
|||
if(g_MaterialDebugMode == MaterialDebugDiffuseColor) |
|||
{ |
|||
result = surfaceData.diffuseColor; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugNormal) |
|||
{ |
|||
result = surfaceData.normalWS * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugDepth) |
|||
{ |
|||
float linearDepth = frac(LinearEyeDepth(input.positionHS.z, _ZBufferParams) * 0.1); |
|||
result = linearDepth.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugAO) |
|||
{ |
|||
result = surfaceData.ambientOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSpecularColor) |
|||
{ |
|||
result = surfaceData.specularColor; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSpecularOcclusion) |
|||
{ |
|||
result = surfaceData.specularOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSmoothness) |
|||
{ |
|||
result = surfaceData.perceptualSmoothness.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugMaterialId) |
|||
{ |
|||
result = surfaceData.materialId.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugUV0) |
|||
{ |
|||
result = float3(input.texCoord0, 0.0); |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugTangent) |
|||
{ |
|||
result = input.tangentToWorld[0].xyz * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugBitangent) |
|||
{ |
|||
result = input.tangentToWorld[1].xyz * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
|
|||
// For now, the final blit in the backbuffer performs an sRGB write |
|||
// So in the meantime we apply the inverse transform to linear data to compensate. |
|||
if(outputIsLinear) |
|||
result = SRGBToLinear(max(0, result)); |
|||
|
|||
return float4(result, 0.0); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// forward pass |
|||
Pass |
|||
{ |
|||
Name "Forward" // Name is not used |
|||
Tags { "LightMode" = "Forward" } // This will be only for transparent object based on the RenderQueue index |
|||
|
|||
Blend [_SrcBlend] [_DstBlend] |
|||
ZWrite [_ZWrite] |
|||
Cull [_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragForward |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
float4 FragForward(PackedVaryings packedInput) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS); |
|||
float3 positionWS = input.positionWS; |
|||
|
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData); |
|||
|
|||
float4 diffuseLighting; |
|||
float4 specularLighting; |
|||
ForwardLighting(V, positionWS, bsdfData, diffuseLighting, specularLighting); |
|||
|
|||
diffuseLighting.rgb += GetBakedDiffuseLigthing(surfaceData, builtinData); |
|||
|
|||
return float4(diffuseLighting.rgb + specularLighting.rgb, builtinData.opacity); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
|
|||
CustomEditor "LitGUI" |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: e7e3743f30ad81a4ba2d0528f52d026b |
|||
timeCreated: 1475845772 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 103bcc6c90ed7124f8474d354c0171ba |
|||
timeCreated: 1475845771 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: f69e98902bfd77a48ab69e05b54c09a5 |
|||
timeCreated: 1475845771 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 3d0985c9290aa0847969ac858555e87a |
|||
timeCreated: 1474465931 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: e1a84346ee54f9f4993c2f05c59805a0 |
|||
timeCreated: 1474456127 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: bc4a80ef70e37814e94ea45fc03abdaa |
|||
timeCreated: 1474456127 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 5a4257d1b13e9cf4d877271cc4ef55ec |
|||
timeCreated: 1475450550 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Unity/DisneyGGX" |
|||
{ |
|||
Properties |
|||
{ |
|||
// Following set of parameters represent the parameters node inside the MaterialGraph. |
|||
// They are use to fill a SurfaceData. With a MaterialGraph this should not exist. |
|||
|
|||
// Reminder. Color here are in linear but the UI (color picker) do the conversion sRGB to linear |
|||
_BaseColor("BaseColor", Color) = (1,1,1,1) |
|||
_BaseColorMap("BaseColorMap", 2D) = "white" {} |
|||
|
|||
_Mettalic("Mettalic", Range(0.0, 1.0)) = 0 |
|||
_Smoothness("Smoothness", Range(0.0, 1.0)) = 0.5 |
|||
_MaskMap("MaskMap", 2D) = "white" {} |
|||
|
|||
_SpecularOcclusionMap("SpecularOcclusion", 2D) = "white" {} |
|||
|
|||
_NormalMap("NormalMap", 2D) = "bump" {} |
|||
[Enum(TangentSpace, 0, ObjectSpace, 1)] _NormalMapSpace("NormalMap space", Float) = 0 |
|||
|
|||
_HeightMap("HeightMap", 2D) = "black" {} |
|||
_HeightScale("Height Scale", Float) = 1 |
|||
_HeightBias("Height Bias", Float) = 0 |
|||
[Enum(Parallax, 0, Displacement, 1)] _HeightMapMode("Heightmap usage", Float) = 0 |
|||
|
|||
_SubSurfaceRadius("SubSurfaceRadius", Range(0.0, 1.0)) = 0 |
|||
_SubSurfaceRadiusMap("SubSurfaceRadiusMap", 2D) = "white" {} |
|||
//_Thickness("Thickness", Range(0.0, 1.0)) = 0 |
|||
//_ThicknessMap("ThicknessMap", 2D) = "white" {} |
|||
//_SubSurfaceProfile("SubSurfaceProfile", Float) = 0 |
|||
|
|||
//_CoatCoverage("CoatCoverage", Range(0.0, 1.0)) = 0 |
|||
//_CoatCoverageMap("CoatCoverageMapMap", 2D) = "white" {} |
|||
|
|||
//_CoatRoughness("CoatRoughness", Range(0.0, 1.0)) = 0 |
|||
//_CoatRoughnessMap("CoatRoughnessMap", 2D) = "white" {} |
|||
|
|||
// _DistortionVectorMap("DistortionVectorMap", 2D) = "white" {} |
|||
// _DistortionBlur("DistortionBlur", Range(0.0, 1.0)) = 0 |
|||
|
|||
// Following options are for the GUI inspector and different from the input parameters above |
|||
// These option below will cause different compilation flag. |
|||
|
|||
_DiffuseLightingMap("DiffuseLightingMap", 2D) = "black" {} |
|||
_EmissiveColor("EmissiveColor", Color) = (0, 0, 0) |
|||
_EmissiveColorMap("EmissiveColorMap", 2D) = "white" {} |
|||
_EmissiveIntensity("EmissiveIntensity", Float) = 0 |
|||
|
|||
[ToggleOff] _DistortionOnly("Distortion Only", Float) = 0.0 |
|||
[ToggleOff] _DistortionDepthTest("Distortion Only", Float) = 0.0 |
|||
|
|||
[ToggleOff] _AlphaCutoffEnable("Alpha Cutoff Enable", Float) = 0.0 |
|||
_AlphaCutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5 |
|||
|
|||
// Blending state |
|||
[HideInInspector] _SurfaceType("__surfacetype", Float) = 0.0 |
|||
[HideInInspector] _BlendMode ("__blendmode", Float) = 0.0 |
|||
[HideInInspector] _SrcBlend ("__src", Float) = 1.0 |
|||
[HideInInspector] _DstBlend ("__dst", Float) = 0.0 |
|||
[HideInInspector] _ZWrite ("__zw", Float) = 1.0 |
|||
[HideInInspector] _CullMode("__cullmode", Float) = 2.0 |
|||
// Material Id |
|||
[HideInInspector] _MaterialId("_MaterialId", FLoat) = 0 |
|||
|
|||
[Enum(Mask Alpha, 0, BaseColor Alpha, 1)] _SmoothnessTextureChannel("Smoothness texture channel", Float) = 1 |
|||
[Enum(Use Emissive Color, 0, Use Emissive Mask, 1)] _EmissiveColorMode("Emissive color mode", Float) = 1 |
|||
[Enum(None, 0, DoubleSided, 1, DoubleSidedLigthingFlip, 2, DoubleSidedLigthingMirror, 3)] _DoubleSidedMode("Double sided mode", Float) = 0 |
|||
} |
|||
|
|||
HLSLINCLUDE |
|||
|
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
|
|||
#pragma shader_feature _ALPHATEST_ON |
|||
#pragma shader_feature _ _DOUBLESIDED_LIGHTING_FLIP _DOUBLESIDED_LIGHTING_MIRROR |
|||
#pragma shader_feature _NORMALMAP |
|||
#pragma shader_feature _NORMALMAP_TANGENT_SPACE |
|||
#pragma shader_feature _MASKMAP |
|||
#pragma shader_feature _SPECULAROCCLUSIONMAP |
|||
#pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A |
|||
#pragma shader_feature _EMISSIVE_COLOR |
|||
#pragma shader_feature _EMISSIVE_COLOR_MAP |
|||
#pragma shader_feature _HEIGHTMAP |
|||
#pragma shader_feature _HEIGHTMAP_AS_DISPLACEMENT |
|||
|
|||
#include "TemplateDisneyGGX.hlsl" |
|||
|
|||
ENDHLSL |
|||
|
|||
SubShader |
|||
{ |
|||
Tags { "RenderType"="Opaque" "PerformanceChecks"="False" } |
|||
LOD 300 |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// forward pass |
|||
Pass |
|||
{ |
|||
Name "Forward" // Name is not used |
|||
Tags { "LightMode" = "Forward" } // This will be only for transparent object based on the RenderQueue index |
|||
|
|||
Blend [_SrcBlend] [_DstBlend] |
|||
ZWrite [_ZWrite] |
|||
Cull [_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragForward |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
float4 FragForward(PackedVaryings packedInput) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
float3 V = GetWorldSpaceNormalizeViewDir(input.positionWS); |
|||
float3 positionWS = input.positionWS; |
|||
|
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
BSDFData bsdfData = ConvertSurfaceDataToBSDFData(surfaceData); |
|||
|
|||
float4 diffuseLighting; |
|||
float4 specularLighting; |
|||
ForwardLighting(V, positionWS, bsdfData, diffuseLighting, specularLighting); |
|||
|
|||
diffuseLighting.rgb += GetBakedDiffuseLigthing(surfaceData, builtinData); |
|||
|
|||
return float4(diffuseLighting.rgb + specularLighting.rgb, builtinData.opacity); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Deferred pass |
|||
Pass |
|||
{ |
|||
Name "GBuffer" // Name is not used |
|||
Tags { "LightMode" = "GBuffer" } // This will be only for opaque object based on the RenderQueue index |
|||
|
|||
Cull [_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragDeferred |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
void FragDeferred( PackedVaryings packedInput, |
|||
OUTPUT_GBUFFER(outGBuffer) |
|||
#ifdef VELOCITY_IN_GBUFFER |
|||
, OUTPUT_GBUFFER_VELOCITY(outGBuffer) |
|||
#endif |
|||
, OUTPUT_GBUFFER_BAKE_LIGHTING(outGBuffer) |
|||
) |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
ENCODE_INTO_GBUFFER(surfaceData, outGBuffer); |
|||
#ifdef VELOCITY_IN_GBUFFER |
|||
ENCODE_VELOCITY_INTO_GBUFFER(builtinData.velocity, outGBuffer); |
|||
#endif |
|||
ENCODE_BAKE_LIGHTING_INTO_GBUFFER(GetBakedDiffuseLigthing(surfaceData, builtinData), outGBuffer); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Debug pass |
|||
Pass |
|||
{ |
|||
Name "Debug" |
|||
Tags { "LightMode" = "Debug" } |
|||
|
|||
Cull[_CullMode] |
|||
|
|||
HLSLPROGRAM |
|||
#pragma target 5.0 |
|||
#pragma only_renderers d3d11 // TEMP: unitl we go futher in dev |
|||
|
|||
#pragma vertex VertDefault |
|||
#pragma fragment FragDebug |
|||
|
|||
int g_MaterialDebugMode; |
|||
|
|||
#include "Assets/ScriptableRenderLoop/ShaderLibrary/Color.hlsl" |
|||
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Debug/DebugCommon.hlsl" |
|||
|
|||
#if SHADER_STAGE_FRAGMENT |
|||
|
|||
float4 FragDebug( PackedVaryings packedInput ) : SV_Target |
|||
{ |
|||
Varyings input = UnpackVaryings(packedInput); |
|||
SurfaceData surfaceData; |
|||
BuiltinData builtinData; |
|||
GetSurfaceAndBuiltinData(input, surfaceData, builtinData); |
|||
|
|||
float3 result = float3(1.0, 1.0, 0.0); |
|||
bool outputIsLinear = false; |
|||
|
|||
if(g_MaterialDebugMode == MaterialDebugDiffuseColor) |
|||
{ |
|||
result = surfaceData.diffuseColor; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugNormal) |
|||
{ |
|||
result = surfaceData.normalWS * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugDepth) |
|||
{ |
|||
float linearDepth = frac(LinearEyeDepth(input.positionHS.z, _ZBufferParams) * 0.1); |
|||
result = linearDepth.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugAO) |
|||
{ |
|||
result = surfaceData.ambientOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSpecularColor) |
|||
{ |
|||
result = surfaceData.specularColor; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSpecularOcclusion) |
|||
{ |
|||
result = surfaceData.specularOcclusion.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugSmoothness) |
|||
{ |
|||
result = surfaceData.perceptualSmoothness.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugMaterialId) |
|||
{ |
|||
result = surfaceData.materialId.xxx; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugUV0) |
|||
{ |
|||
result = float3(input.texCoord0, 0.0); |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugTangent) |
|||
{ |
|||
result = input.tangentToWorld[0].xyz * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
else if (g_MaterialDebugMode == MaterialDebugBitangent) |
|||
{ |
|||
result = input.tangentToWorld[1].xyz * 0.5 + 0.5; |
|||
outputIsLinear = true; |
|||
} |
|||
|
|||
// For now, the final blit in the backbuffer performs an sRGB write |
|||
// So in the meantime we apply the inverse transform to linear data to compensate. |
|||
if(outputIsLinear) |
|||
result = SRGBToLinear(max(0, result)); |
|||
|
|||
return float4(result, 0.0); |
|||
} |
|||
|
|||
#endif |
|||
|
|||
ENDHLSL |
|||
} |
|||
} |
|||
|
|||
CustomEditor "DisneyGGXGUI" |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue