Skip to content

Commit d615421

Browse files
committed
Switched to deferred rendering.
1 parent bcebfcf commit d615421

File tree

2 files changed

+68
-17
lines changed

2 files changed

+68
-17
lines changed

Assets/Shaders/PolymerPBR.shader

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,11 +1240,11 @@ Shader "PolymerPBR"
12401240
UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy);
12411241
#endif
12421242

1243-
#if defined(_SPECULAR_SETUP)
1243+
//#if defined(_SPECULAR_SETUP)
12441244
SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0;
1245-
#else
1246-
SurfaceOutputStandard o = (SurfaceOutputStandard)0;
1247-
#endif
1245+
//#else
1246+
// SurfaceOutputStandard o = (SurfaceOutputStandard)0;
1247+
//#endif
12481248
float3 WorldTangent = float3(IN.tSpace0.x,IN.tSpace1.x,IN.tSpace2.x);
12491249
float3 WorldBiTangent = float3(IN.tSpace0.y,IN.tSpace1.y,IN.tSpace2.y);
12501250
float3 WorldNormal = float3(IN.tSpace0.z,IN.tSpace1.z,IN.tSpace2.z);
@@ -1257,11 +1257,11 @@ Shader "PolymerPBR"
12571257
o.Albedo = tex2D( _PaletteTex, ( tex2D( _MainTex, uv_MainTex ).r * float2( 1,0 ) ) ).rgb;
12581258
o.Normal = fixed3( 0, 0, 1 );
12591259
o.Emission = half3( 0, 0, 0 );
1260-
#if defined(_SPECULAR_SETUP)
1260+
//#if defined(_SPECULAR_SETUP)
12611261
o.Specular = fixed3( 0, 0, 0 );
1262-
#else
1263-
o.Metallic = 0.0;
1264-
#endif
1262+
//#else
1263+
// o.Metallic = 0.0;
1264+
//#endif
12651265
o.Smoothness = 0;
12661266
o.Occlusion = 1;
12671267
o.Alpha = 1;
@@ -1325,11 +1325,11 @@ Shader "PolymerPBR"
13251325
giInput.probePosition[1] = unity_SpecCube1_ProbePosition;
13261326
#endif
13271327

1328-
#if defined(_SPECULAR_SETUP)
1328+
//#if defined(_SPECULAR_SETUP)
13291329
LightingStandardSpecular_GI( o, giInput, gi );
1330-
#else
1331-
LightingStandard_GI( o, giInput, gi );
1332-
#endif
1330+
//#else
1331+
// LightingStandard_GI( o, giInput, gi );
1332+
//#endif
13331333

13341334
#ifdef ASE_BAKEDGI
13351335
gi.indirect.diffuse = BakedGI;
@@ -1339,11 +1339,11 @@ Shader "PolymerPBR"
13391339
gi.indirect.diffuse = 0;
13401340
#endif
13411341

1342-
#if defined(_SPECULAR_SETUP)
1342+
//#if defined(_SPECULAR_SETUP)
13431343
outEmission = LightingStandardSpecular_Deferred( o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2 );
1344-
#else
1345-
outEmission = LightingStandard_Deferred( o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2 );
1346-
#endif
1344+
//#else
1345+
// outEmission = LightingStandard_Deferred( o, worldViewDir, gi, outGBuffer0, outGBuffer1, outGBuffer2 );
1346+
//#endif
13471347

13481348
#if defined(SHADOWS_SHADOWMASK) && (UNITY_ALLOWED_MRT_COUNT > 4)
13491349
outShadowMask = UnityGetRawBakedOcclusions (IN.lmap.xy, float3(0, 0, 0));

ProjectSettings/GraphicsSettings.asset

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,58 @@ GraphicsSettings:
4444
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
4545
m_DefaultRenderingPath: 1
4646
m_DefaultMobileRenderingPath: 1
47-
m_TierSettings: []
47+
m_TierSettings:
48+
- serializedVersion: 5
49+
m_BuildTarget: 1
50+
m_Tier: 0
51+
m_Settings:
52+
standardShaderQuality: 2
53+
renderingPath: 3
54+
hdrMode: 1
55+
realtimeGICPUUsage: 25
56+
useReflectionProbeBoxProjection: 1
57+
useReflectionProbeBlending: 1
58+
useHDR: 0
59+
useDetailNormalMap: 1
60+
useCascadedShadowMaps: 1
61+
prefer32BitShadowMaps: 0
62+
enableLPPV: 1
63+
useDitherMaskForAlphaBlendedShadows: 1
64+
m_Automatic: 0
65+
- serializedVersion: 5
66+
m_BuildTarget: 1
67+
m_Tier: 1
68+
m_Settings:
69+
standardShaderQuality: 2
70+
renderingPath: 3
71+
hdrMode: 1
72+
realtimeGICPUUsage: 25
73+
useReflectionProbeBoxProjection: 1
74+
useReflectionProbeBlending: 1
75+
useHDR: 0
76+
useDetailNormalMap: 1
77+
useCascadedShadowMaps: 1
78+
prefer32BitShadowMaps: 0
79+
enableLPPV: 1
80+
useDitherMaskForAlphaBlendedShadows: 1
81+
m_Automatic: 0
82+
- serializedVersion: 5
83+
m_BuildTarget: 1
84+
m_Tier: 2
85+
m_Settings:
86+
standardShaderQuality: 2
87+
renderingPath: 3
88+
hdrMode: 1
89+
realtimeGICPUUsage: 50
90+
useReflectionProbeBoxProjection: 1
91+
useReflectionProbeBlending: 1
92+
useHDR: 0
93+
useDetailNormalMap: 1
94+
useCascadedShadowMaps: 1
95+
prefer32BitShadowMaps: 0
96+
enableLPPV: 1
97+
useDitherMaskForAlphaBlendedShadows: 1
98+
m_Automatic: 0
4899
m_LightmapStripping: 0
49100
m_FogStripping: 0
50101
m_InstancingStripping: 0

0 commit comments

Comments
 (0)