@@ -38,7 +38,7 @@ static void AddAdditionalLightData()
38
38
SkyRenderer m_SkyRenderer = null ;
39
39
[ SerializeField ]
40
40
SkyParameters m_SkyParameters = new SkyParameters ( ) ;
41
-
41
+
42
42
public SkyParameters skyParameters
43
43
{
44
44
get { return m_SkyParameters ; }
@@ -97,7 +97,7 @@ public RenderTargetIdentifier[] GetGBuffers()
97
97
98
98
return colorMRTs ;
99
99
}
100
-
100
+
101
101
/*
102
102
public void BindBuffers(Material mat)
103
103
{
@@ -158,7 +158,7 @@ public TextureSettings textureSettings
158
158
159
159
// This must be allocate outside of Rebuild() else the option in the class can't be set in the inspector (as it will in this case recreate the class with default value)
160
160
BaseLightLoop m_lightLoop = new TilePass . LightLoop ( ) ;
161
-
161
+
162
162
public BaseLightLoop lightLoop
163
163
{
164
164
get { return m_lightLoop ; }
@@ -196,7 +196,7 @@ public override void Rebuild()
196
196
197
197
m_ShadowPass = new ShadowRenderPass ( m_ShadowSettings ) ;
198
198
199
- // Init Gbuffer description
199
+ // Init Gbuffer description
200
200
201
201
m_gbufferManager . gbufferCount = m_LitRenderLoop . GetMaterialGBufferCount ( ) ;
202
202
RenderTextureFormat [ ] RTFormat ; RenderTextureReadWrite [ ] RTReadWrite ;
@@ -315,8 +315,8 @@ void RenderOpaqueRenderList(CullResults cull, Camera camera, RenderLoop renderLo
315
315
var settings = new DrawRendererSettings ( cull , camera , new ShaderPassName ( passName ) )
316
316
{
317
317
rendererConfiguration = rendererConfiguration ,
318
- sorting = { sortOptions = SortOptions . SortByMaterialThenMesh }
319
- } ;
318
+ sorting = { flags = SortFlags . CommonOpaque }
319
+ } ;
320
320
settings . inputFilter . SetQueuesOpaque ( ) ;
321
321
renderLoop . DrawRenderers ( ref settings ) ;
322
322
}
@@ -329,7 +329,7 @@ void RenderTransparentRenderList(CullResults cull, Camera camera, RenderLoop ren
329
329
var settings = new DrawRendererSettings ( cull , camera , new ShaderPassName ( passName ) )
330
330
{
331
331
rendererConfiguration = rendererConfiguration ,
332
- sorting = { sortOptions = SortOptions . BackToFront }
332
+ sorting = { flags = SortFlags . CommonTransparent }
333
333
} ;
334
334
settings . inputFilter . SetQueuesTransparent ( ) ;
335
335
renderLoop . DrawRenderers ( ref settings ) ;
@@ -344,7 +344,7 @@ void RenderDepthPrepass(CullResults cull, Camera camera, RenderLoop renderLoop)
344
344
345
345
using ( new Utilities . ProfilingSample ( "Depth Prepass" , renderLoop ) )
346
346
{
347
- // TODO: Must do opaque then alpha masked for performance!
347
+ // TODO: Must do opaque then alpha masked for performance!
348
348
// TODO: front to back for opaque and by materal for opaque tested when we split in two
349
349
Utilities . SetRenderTarget ( renderLoop , m_CameraDepthBufferRT ) ;
350
350
RenderOpaqueRenderList ( cull , camera , renderLoop , "DepthOnly" ) ;
@@ -570,7 +570,7 @@ void FinalPass(RenderLoop renderLoop)
570
570
void PrepareLightsForGPU ( CullResults cullResults , Camera camera , ref ShadowOutput shadowOutput )
571
571
{
572
572
// build per tile light lists
573
- m_lightLoop . PrepareLightsForGPU ( cullResults , camera , ref shadowOutput ) ;
573
+ m_lightLoop . PrepareLightsForGPU ( cullResults , camera , ref shadowOutput ) ;
574
574
}
575
575
576
576
void Resize ( Camera camera )
@@ -581,7 +581,7 @@ void Resize(Camera camera)
581
581
// the below buffer which is bad. Best is to have a set of buffer for each camera that is persistent and reallocate resource if need
582
582
// For now consider we have only one camera that go to this code, the main one.
583
583
m_SkyRenderer . Resize ( m_SkyParameters ) ; // TODO: Also a bad naming, here we just want to realloc texture if skyparameters change (usefull for lookdev)
584
-
584
+
585
585
if ( camera . pixelWidth != m_WidthOnRecord || camera . pixelHeight != m_HeightOnRecord || m_lightLoop . NeedResize ( ) )
586
586
{
587
587
if ( m_WidthOnRecord > 0 && m_HeightOnRecord > 0 )
@@ -609,7 +609,7 @@ public void PushGlobalParams(Camera camera, RenderLoop renderLoop)
609
609
Shader . SetGlobalInt ( "_EnvLightSkyEnabled" , 0 ) ;
610
610
}
611
611
612
- m_lightLoop . PushGlobalParams ( camera , renderLoop ) ;
612
+ m_lightLoop . PushGlobalParams ( camera , renderLoop ) ;
613
613
}
614
614
615
615
public override void Render ( Camera [ ] cameras , RenderLoop renderLoop )
@@ -658,7 +658,7 @@ public override void Render(Camera[] cameras, RenderLoop renderLoop)
658
658
// TODO: avoid double lighting by tagging stencil or gbuffer that we must not lit.
659
659
// TODO: ask Morten why this pass is not before GBuffer ? Will make more sense and avoid
660
660
// to do gbuffer pass on unseen mesh.
661
- // TODO: how do we select only the object that must be render forward ?
661
+ // TODO: how do we select only the object that must be render forward ?
662
662
// this is all object with gbuffer pass disabled ?
663
663
//RenderForwardOpaqueDepth(cullResults, camera, renderLoop);
664
664
@@ -678,7 +678,7 @@ public override void Render(Camera[] cameras, RenderLoop renderLoop)
678
678
679
679
using ( new Utilities . ProfilingSample ( "Build Light list" , renderLoop ) )
680
680
{
681
- m_lightLoop . PrepareLightsForGPU ( cullResults , camera , ref shadows ) ;
681
+ m_lightLoop . PrepareLightsForGPU ( cullResults , camera , ref shadows ) ;
682
682
m_lightLoop . BuildGPULightLists ( camera , renderLoop , m_CameraDepthBufferRT ) ;
683
683
684
684
PushGlobalParams ( camera , renderLoop ) ;
@@ -693,7 +693,7 @@ public override void Render(Camera[] cameras, RenderLoop renderLoop)
693
693
694
694
RenderForwardUnlit ( cullResults , camera , renderLoop ) ;
695
695
696
- RenderVelocity ( cullResults , camera , renderLoop ) ; // Note we may have to render velocity earlier if we do temporalAO, temporal volumetric etc... Mean we will not take into account forward opaque in case of deferred rendering ?
696
+ RenderVelocity ( cullResults , camera , renderLoop ) ; // Note we may have to render velocity earlier if we do temporalAO, temporal volumetric etc... Mean we will not take into account forward opaque in case of deferred rendering ?
697
697
698
698
// TODO: Check with VFX team.
699
699
// Rendering distortion here have off course lot of artifact.
0 commit comments