浏览代码

cleanup and consilidate shader passes and simply setup material varients on startup

/main
Filip Iliescu 8 年前
当前提交
f583f50f
共有 2 个文件被更改,包括 118 次插入368 次删除
  1. 89
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/ClassicDeferredPipeline.cs
  2. 397
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Internal-DeferredReflections.shader

89
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/ClassicDeferredPipeline.cs


private static int s_GBufferZ;
private static int s_CameraTarget;
private static int s_CameraDepthTexture;
private static int s_CameraReflectionsTexture;
//private static int s_CameraReflectionsTexture;
private static int m_ReflectionsPassNdx;
private static int m_ReflectionsFrontCullPassNdx;
private static int m_ReflectionsApplyPassNdx;
private static int m_ReflectionsFullScreenPassNdx;
private Material m_DeferredReflectionMaterial;
private Material m_ReflectionMaterial;
private Material m_ReflectionNearClipMaterial;
private Material m_ReflectionNearAndFarClipMaterial;
private Material m_BlitMaterial;
public Texture m_DefaultSpotCookie;

{
if (m_BlitMaterial) DestroyImmediate(m_BlitMaterial);
if (m_DeferredMaterial) DestroyImmediate(m_DeferredMaterial);
if (m_DeferredReflectionMaterial) DestroyImmediate (m_DeferredReflectionMaterial);
if (m_ReflectionMaterial) DestroyImmediate (m_ReflectionMaterial);
if (m_ReflectionNearClipMaterial) DestroyImmediate (m_ReflectionNearClipMaterial);
if (m_ReflectionNearAndFarClipMaterial) DestroyImmediate (m_ReflectionNearAndFarClipMaterial);
}
public void Build()

s_CameraTarget = Shader.PropertyToID ("_CameraTarget");
m_BlitMaterial = new Material (finalPassShader) { hideFlags = HideFlags.HideAndDontSave };
m_DeferredReflectionMaterial = new Material (deferredReflectionShader) { hideFlags = HideFlags.HideAndDontSave };
m_ReflectionsPassNdx = m_DeferredReflectionMaterial.FindPass ("DEFERRED_REFLECTIONS");
m_ReflectionsFrontCullPassNdx = m_DeferredReflectionMaterial.FindPass ("DEFERRED__CULLFRONT_REFLECTIONS");
m_ReflectionsFullScreenPassNdx = m_DeferredReflectionMaterial.FindPass ("DEFERRED_FULLSCREEN_REFLECTIONS");
m_ReflectionMaterial = new Material (deferredReflectionShader) { hideFlags = HideFlags.HideAndDontSave };
m_ReflectionMaterial.SetInt("_SrcBlend", (int)BlendMode.DstAlpha);
m_ReflectionMaterial.SetInt("_DstBlend", (int)BlendMode.One);
m_ReflectionMaterial.SetInt("_SrcABlend", (int)BlendMode.DstAlpha);
m_ReflectionMaterial.SetInt("_DstABlend", (int)BlendMode.Zero);
m_ReflectionMaterial.SetInt("_CullMode", (int)CullMode.Back);
m_ReflectionMaterial.SetInt("_CompareFunc", (int)CompareFunction.LessEqual);
m_ReflectionsApplyPassNdx = m_DeferredReflectionMaterial.FindPass ("DEFERRED_APPLY_REFLECTIONS");
m_ReflectionNearClipMaterial = new Material (deferredReflectionShader) { hideFlags = HideFlags.HideAndDontSave };
m_ReflectionNearClipMaterial.SetInt("_SrcBlend", (int)BlendMode.DstAlpha);
m_ReflectionNearClipMaterial.SetInt("_DstBlend", (int)BlendMode.One);
m_ReflectionNearClipMaterial.SetInt("_SrcABlend", (int)BlendMode.DstAlpha);
m_ReflectionNearClipMaterial.SetInt("_DstABlend", (int)BlendMode.Zero);
m_ReflectionNearClipMaterial.SetInt("_CullMode", (int)CullMode.Front);
m_ReflectionNearClipMaterial.SetInt("_CompareFunc", (int)CompareFunction.GreaterEqual);
m_ReflectionNearAndFarClipMaterial = new Material (deferredReflectionShader) { hideFlags = HideFlags.HideAndDontSave };
m_ReflectionNearAndFarClipMaterial.SetInt("_SrcBlend", (int)BlendMode.DstAlpha);
m_ReflectionNearAndFarClipMaterial.SetInt("_DstBlend", (int)BlendMode.One);
m_ReflectionNearAndFarClipMaterial.SetInt("_SrcABlend", (int)BlendMode.DstAlpha);
m_ReflectionNearAndFarClipMaterial.SetInt("_DstABlend", (int)BlendMode.Zero);
m_ReflectionNearAndFarClipMaterial.SetInt("_CullMode", (int)CullMode.Off);
m_ReflectionNearAndFarClipMaterial.SetInt("_CompareFunc", (int)CompareFunction.Always);
s_CameraReflectionsTexture = Shader.PropertyToID ("_CameraReflectionsTexture");
//s_CameraReflectionsTexture = Shader.PropertyToID ("_CameraReflectionsTexture");
//shadows
m_MatWorldToShadow = new Matrix4x4[k_MaxLights * k_MaxShadowmapPerLights];

// TODO: need this? --> Set the ambient probe into the SH constants otherwise
// SetSHConstants(builtins, m_LightprobeContext.ambientProbe);
// render all probes
//foreach (var rl in probes)
// render all probes in reverse order so they are blended into the existing emission buffer with the correct blend settings as follows:
// emisNew = emis + Lerp( Lerp( Lerp(base,probe0,1-t0), probe1, 1-t1 ), probe2, 1-t2)....
// DST_COL = DST_COL + DST_ALPHA * SRC_COLOR
// DST_ALPHA = DST_ALPHA * SRC_ALPHA
int numProbes = probes.Length;
for (int i = numProbes-1; i >= 0; i--)
{

var min = rl.bounds.min;
var max = rl.bounds.max;
// FIXME: why dont setting blend properties work here?
m_DeferredReflectionMaterial.SetInt("_SrcBlend", (int)BlendMode.SrcAlpha);
m_DeferredReflectionMaterial.SetInt("_DstBlend", (int)BlendMode.OneMinusSrcAlpha);
cmd.SetGlobalTexture("unity_SpecCube0", cubemap);
cmd.SetGlobalVector("unity_SpecCube0_HDR", rl.probe.textureHDRDecodeValues);
cmd.SetGlobalVector ("unity_SpecCube0_BoxMin", min);

if (renderAsQuad) {
cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_DeferredReflectionMaterial, 0, m_ReflectionsFullScreenPassNdx, props);
} else {
cmd.DrawMesh (m_BoxMesh, mat, m_DeferredReflectionMaterial, 0, (intersectsNear ? m_ReflectionsFrontCullPassNdx : m_ReflectionsPassNdx), props);
cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_ReflectionNearAndFarClipMaterial, 0, 0, props);
} else if (intersectsNear) {
cmd.DrawMesh (m_BoxMesh, mat, m_ReflectionNearClipMaterial, 0, 0, props);
} else{
cmd.DrawMesh (m_BoxMesh, mat, m_ReflectionMaterial, 0, 0, props);
}
}

props.SetFloat ("_LightAsQuad", 1.0f);
m_DeferredReflectionMaterial.SetInt("_SrcBlend", (int)BlendMode.One);
m_DeferredReflectionMaterial.SetInt("_DstBlend", (int)BlendMode.Zero);
// base reflection probe
var topCube = ReflectionProbe.defaultTexture;

cmd.SetGlobalVector ("unity_SpecCube0_ProbePosition", new Vector4 (0.0f, 0.0f, 0.0f, 0.0f));
cmd.SetGlobalVector ("unity_SpecCube1_ProbePosition", new Vector4 (0.0f, 0.0f, 0.0f, 1.0f));
cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_DeferredReflectionMaterial, 0, m_ReflectionsFullScreenPassNdx, props);
cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_ReflectionNearAndFarClipMaterial, 0, 0, props);
void RenderApplyReflections(Camera camera, CommandBuffer cmd, CullResults cullResults, ScriptableRenderContext loop)
{
// draw offscreen accumulation buffer onto emission buffer
var props = new MaterialPropertyBlock ();
// props.SetFloat ("_LightAsQuad", 1);
cmd.SetGlobalTexture ("_CameraReflectionsTexture", s_CameraReflectionsTexture);
cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_DeferredReflectionMaterial, 0, m_ReflectionsApplyPassNdx, props);
}
// void RenderApplyReflections(Camera camera, CommandBuffer cmd, CullResults cullResults, ScriptableRenderContext loop)
// {
// // draw offscreen accumulation buffer onto emission buffer
// var props = new MaterialPropertyBlock ();
//// props.SetFloat ("_LightAsQuad", 1);
// cmd.SetGlobalTexture ("_CameraReflectionsTexture", s_CameraReflectionsTexture);
// cmd.DrawMesh (m_QuadMesh, Matrix4x4.identity, m_DeferredReflectionMaterial, 0, m_ReflectionsApplyPassNdx, props);
// }
void RenderShadowMaps(CullResults cullResults, ScriptableRenderContext loop)
{

397
Assets/ScriptableRenderPipeline/MobileRenderPipeline/ClassicDeferred/Internal-DeferredReflections.shader


{
_SrcBlend ("", Float) = 1
_DstBlend ("", Float) = 1
_SrcABlend ("", Float) = 1
_DstABlend ("", Float) = 1
_CullMode ("", Float) = 0
_CompareFunc ("", Float) = 0
}
SubShader {

Name "DEFERRED_REFLECTIONS"
Blend DstAlpha One, DstAlpha Zero
CGPROGRAM
#pragma target 4.5
#pragma vertex filip_vert_deferred
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityDeferredLibrary.cginc"
#include "UnityStandardUtils.cginc"
#include "UnityGBuffer.cginc"
#include "UnityStandardBRDF.cginc"
#include "UnityPBSLighting.cginc"
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
sampler2D _CameraGBufferTexture0;
sampler2D _CameraGBufferTexture1;
sampler2D _CameraGBufferTexture2;
#endif
unity_v2f_deferred filip_vert_deferred (float4 vertex : POSITION, float3 normal : NORMAL)
{
bool lightAsQuad = _LightAsQuad!=0.0;
unity_v2f_deferred o;
// scaling quasd by two becuase built-in unity quad ranges from -0.5 to 0.5
o.pos = lightAsQuad ? float4(2.0*vertex.xy, 0.5, 1.0) : UnityObjectToClipPos(vertex);
o.uv = ComputeScreenPos(o.pos);
// normal contains a ray pointing from the camera to one of near plane's
// corners in camera space when we are drawing a full screen quad.
// Otherwise, when rendering 3D shapes, use the ray calculated here.
if (lightAsQuad){
float2 rayXY = mul(unity_CameraInvProjection, float4(o.pos.x, -o.pos.y, -1, 1)).xy;
o.ray = float3(rayXY, 1.0);
}
else
{
o.ray = UnityObjectToViewPos(vertex) * float3(-1,-1,1);
}
return o;
}
half3 distanceFromAABB(half3 p, half3 aabbMin, half3 aabbMax)
{
return max(max(p - aabbMax, aabbMin - p), half3(0.0, 0.0, 0.0));
}
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
void frag (unity_v2f_deferred i,
in half4 outGBuffer0 : SV_Target0,
in half4 outGBuffer1 : SV_Target1,
in half4 outGBuffer2 : SV_Target2,
out half4 outEmission : SV_Target3,
in float outLinearDepth : SV_Target4)
#else
half4 frag (unity_v2f_deferred i) : SV_TARGET
#endif
{
//return half4(1.0, 0.0, 0.0, 1.0);
// Stripped from UnityDeferredCalculateLightParams, refactor into function ?
i.ray = i.ray * (_ProjectionParams.z / i.ray.z);
float2 uv = i.uv.xy / i.uv.w;
Cull [_CullMode]
ZTest [_CompareFunc]
//Blend DstAlpha One, DstAlpha Zero
Blend [_SrcBlend] [_DstBlend], [_SrcABlend] [_DstABlend]
// read depth and reconstruct world position
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv);
#else
float depth = outLinearDepth;
#endif
// clipping near plane
// ZWrite Off
// Cull Front
// ZTest GEqual
// Blend DstAlpha One, DstAlpha Zero
depth = Linear01Depth (depth);
float4 viewPos = float4(i.ray * depth,1);
float3 worldPos = mul (unity_CameraToWorld, viewPos).xyz;
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
// unpack Gbuffer
half4 gbuffer0 = tex2D (_CameraGBufferTexture0, uv);
half4 gbuffer1 = tex2D (_CameraGBufferTexture1, uv);
half4 gbuffer2 = tex2D (_CameraGBufferTexture2, uv);
#endif
UnityStandardData data = UnityStandardDataFromGbuffer(gbuffer0, gbuffer1, gbuffer2);
float3 eyeVec = normalize(worldPos - _WorldSpaceCameraPos);
half oneMinusReflectivity = 1 - SpecularStrength(data.specularColor);
// ---
half3 worldNormalRefl = reflect(eyeVec, data.normalWorld);
// Unused member don't need to be initialized
UnityGIInput d;
d.worldPos = worldPos;
d.worldViewDir = -eyeVec;
d.probeHDR[0] = unity_SpecCube0_HDR;
float blendDistance = unity_SpecCube1_ProbePosition.w; // will be set to blend distance for this probe
#ifdef UNITY_SPECCUBE_BOX_PROJECTION
d.probePosition[0] = unity_SpecCube0_ProbePosition;
d.boxMin[0].xyz = unity_SpecCube0_BoxMin - float4(blendDistance,blendDistance,blendDistance,0);
d.boxMin[0].w = 1; // 1 in .w allow to disable blending in UnityGI_IndirectSpecular call
d.boxMax[0].xyz = unity_SpecCube0_BoxMax + float4(blendDistance,blendDistance,blendDistance,0);
#endif
Unity_GlossyEnvironmentData g = UnityGlossyEnvironmentSetup(data.smoothness, d.worldViewDir, data.normalWorld, data.specularColor);
half3 env0 = UnityGI_IndirectSpecular(d, data.occlusion, g);
UnityLight light;
light.color = half3(0, 0, 0);
light.dir = half3(0, 1, 0);
// ---
UnityIndirect ind;
ind.diffuse = 0;
ind.specular = env0;
half3 rgb = UNITY_BRDF_PBS (0, data.specularColor, oneMinusReflectivity, data.smoothness, data.normalWorld, -eyeVec, light, ind).rgb;
// ---
// Calculate falloff value, so reflections on the edges of the probe would gradually blend to previous reflection.
// Also this ensures that pixels not located in the reflection probe AABB won't
// accidentally pick up reflections from this probe.
half3 distance = distanceFromAABB(worldPos, unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz);
half falloff = saturate(1.0 - length(distance)/blendDistance);
// UNITY_BRDF_PBS1 writes out alpha 1 to our emission alpha. TODO: Should preclear emission alpha after gbuffer pass in case this ever changes
return half4(rgb*falloff, 1-falloff);
}
ENDCG
}
// Calculates reflection contribution from a single probe (rendered as cubes) or default reflection (rendered as full screen quad)
Pass {
Name "DEFERRED__CULLFRONT_REFLECTIONS"
ZWrite Off
Cull Front
ZTest GEqual
Blend DstAlpha One, DstAlpha Zero
// renderAsQuad
// ZWrite Off
// Cull Off
// ZTest Always
// Blend DstAlpha One, DstAlpha Zero
CGPROGRAM
#pragma target 4.5

ENDCG
}
// Calculates reflection contribution from a single probe (rendered as cubes) or default reflection (rendered as full screen quad)
Pass {
Name "DEFERRED_FULLSCREEN_REFLECTIONS"
ZWrite Off
Cull Off
ZTest Always
Blend DstAlpha One, DstAlpha Zero
CGPROGRAM
#pragma target 4.5
#pragma vertex filip_vert_deferred
#pragma fragment frag
#include "UnityCG.cginc"
#include "UnityDeferredLibrary.cginc"
#include "UnityStandardUtils.cginc"
#include "UnityGBuffer.cginc"
#include "UnityStandardBRDF.cginc"
#include "UnityPBSLighting.cginc"
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
sampler2D _CameraGBufferTexture0;
sampler2D _CameraGBufferTexture1;
sampler2D _CameraGBufferTexture2;
#endif
unity_v2f_deferred filip_vert_deferred (float4 vertex : POSITION, float3 normal : NORMAL)
{
bool lightAsQuad = _LightAsQuad!=0.0;
unity_v2f_deferred o;
// scaling quasd by two becuase built-in unity quad ranges from -0.5 to 0.5
o.pos = lightAsQuad ? float4(2.0*vertex.xy, 0.5, 1.0) : UnityObjectToClipPos(vertex);
o.uv = ComputeScreenPos(o.pos);
// normal contains a ray pointing from the camera to one of near plane's
// corners in camera space when we are drawing a full screen quad.
// Otherwise, when rendering 3D shapes, use the ray calculated here.
if (lightAsQuad){
float2 rayXY = mul(unity_CameraInvProjection, float4(o.pos.x, -o.pos.y, -1, 1)).xy;
o.ray = float3(rayXY, 1.0);
}
else
{
o.ray = UnityObjectToViewPos(vertex) * float3(-1,-1,1);
}
return o;
}
half3 distanceFromAABB(half3 p, half3 aabbMin, half3 aabbMax)
{
return max(max(p - aabbMax, aabbMin - p), half3(0.0, 0.0, 0.0));
}
#ifdef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
void frag (unity_v2f_deferred i,
in half4 outGBuffer0 : SV_Target0,
in half4 outGBuffer1 : SV_Target1,
in half4 outGBuffer2 : SV_Target2,
out half4 outEmission : SV_Target3,
in float outLinearDepth : SV_Target4)
#else
half4 frag (unity_v2f_deferred i) : SV_TARGET
#endif
{
// Stripped from UnityDeferredCalculateLightParams, refactor into function ?
i.ray = i.ray * (_ProjectionParams.z / i.ray.z);
float2 uv = i.uv.xy / i.uv.w;
// read depth and reconstruct world position
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, uv);
#else
float depth = outLinearDepth;
#endif
depth = Linear01Depth (depth);
float4 viewPos = float4(i.ray * depth,1);
float3 worldPos = mul (unity_CameraToWorld, viewPos).xyz;
#ifndef UNITY_FRAMEBUFFER_FETCH_AVAILABLE
// unpack Gbuffer
half4 gbuffer0 = tex2D (_CameraGBufferTexture0, uv);
half4 gbuffer1 = tex2D (_CameraGBufferTexture1, uv);
half4 gbuffer2 = tex2D (_CameraGBufferTexture2, uv);
#endif
UnityStandardData data = UnityStandardDataFromGbuffer(gbuffer0, gbuffer1, gbuffer2);
float3 eyeVec = normalize(worldPos - _WorldSpaceCameraPos);
half oneMinusReflectivity = 1 - SpecularStrength(data.specularColor);
// ---
half3 worldNormalRefl = reflect(eyeVec, data.normalWorld);
// Unused member don't need to be initialized
UnityGIInput d;
d.worldPos = worldPos;
d.worldViewDir = -eyeVec;
d.probeHDR[0] = unity_SpecCube0_HDR;
float blendDistance = unity_SpecCube1_ProbePosition.w; // will be set to blend distance for this probe
#ifdef UNITY_SPECCUBE_BOX_PROJECTION
d.probePosition[0] = unity_SpecCube0_ProbePosition;
d.boxMin[0].xyz = unity_SpecCube0_BoxMin - float4(blendDistance,blendDistance,blendDistance,0);
d.boxMin[0].w = 1; // 1 in .w allow to disable blending in UnityGI_IndirectSpecular call
d.boxMax[0].xyz = unity_SpecCube0_BoxMax + float4(blendDistance,blendDistance,blendDistance,0);
#endif
Unity_GlossyEnvironmentData g = UnityGlossyEnvironmentSetup(data.smoothness, d.worldViewDir, data.normalWorld, data.specularColor);
half3 env0 = UnityGI_IndirectSpecular(d, data.occlusion, g);
UnityLight light;
light.color = half3(0, 0, 0);
light.dir = half3(0, 1, 0);
// ---
UnityIndirect ind;
ind.diffuse = 0;
ind.specular = env0;
half3 rgb = UNITY_BRDF_PBS (0, data.specularColor, oneMinusReflectivity, data.smoothness, data.normalWorld, -eyeVec, light, ind).rgb;
// ---
// Calculate falloff value, so reflections on the edges of the probe would gradually blend to previous reflection.
// Also this ensures that pixels not located in the reflection probe AABB won't
// accidentally pick up reflections from this probe.
half3 distance = distanceFromAABB(worldPos, unity_SpecCube0_BoxMin.xyz, unity_SpecCube0_BoxMax.xyz);
half falloff = saturate(1.0 - length(distance)/blendDistance);
// UNITY_BRDF_PBS1 writes out alpha 1 to our emission alpha. TODO: Should preclear emission alpha after gbuffer pass in case this ever changes
//return half4(rgb, 1);
return half4(rgb*falloff, 1-falloff);
}
ENDCG
}
// Adds reflection buffer to the lighting buffer
Pass
{
Name "DEFERRED_APPLY_REFLECTIONS"
ZWrite Off
ZTest Always
Blend One One
Cull Off
CGPROGRAM
#pragma target 4.5
#pragma vertex refl_apply_vert_deferred
#pragma fragment frag
#pragma multi_compile ___ UNITY_HDR_ON
#include "UnityCG.cginc"
sampler2D _CameraReflectionsTexture;
struct v2f {
float2 uv : TEXCOORD0;
float4 pos : SV_POSITION;
};
v2f refl_apply_vert_deferred (float4 vertex : POSITION, float3 normal : NORMAL)
{
// scaling quasd by two becuase built-in unity quad ranges from -0.5 to 0.5
v2f o;
o.pos = float4(2.0*vertex.xy, 0.5, 1.0);
o.uv = ComputeScreenPos(o.pos);
return o;
}
half4 frag (v2f i) : SV_Target
{
half4 c = tex2D (_CameraReflectionsTexture, i.uv);
#ifdef UNITY_HDR_ON
return float4(c.rgb, 0.0f);
#else
return float4(exp2(-c.rgb), 0.0f);
#endif
}
ENDCG
}
//// Adds reflection buffer to the lighting buffer
//Pass
//{
// Name "DEFERRED_APPLY_REFLECTIONS"
//
// ZWrite Off
// ZTest Always
// Blend One One
// Cull Off
//
// CGPROGRAM
// #pragma target 4.5
// #pragma vertex refl_apply_vert_deferred
// #pragma fragment frag
// #pragma multi_compile ___ UNITY_HDR_ON
//
// #include "UnityCG.cginc"
//
// sampler2D _CameraReflectionsTexture;
//
// struct v2f {
// float2 uv : TEXCOORD0;
// float4 pos : SV_POSITION;
// };
//
// v2f refl_apply_vert_deferred (float4 vertex : POSITION, float3 normal : NORMAL)
// {
// // scaling quasd by two becuase built-in unity quad ranges from -0.5 to 0.5
// v2f o;
// o.pos = float4(2.0*vertex.xy, 0.5, 1.0);
// o.uv = ComputeScreenPos(o.pos);
//
// return o;
// }
//
// half4 frag (v2f i) : SV_Target
// {
// half4 c = tex2D (_CameraReflectionsTexture, i.uv);
// #ifdef UNITY_HDR_ON
// return float4(c.rgb, 0.0f);
// #else
// return float4(exp2(-c.rgb), 0.0f);
// #endif
//
// }
// ENDCG
//}
}
Fallback Off
正在加载...
取消
保存