Skip to content

Commit 27c5c5e

Browse files
HDRenderLoop: Version that compile and display something
1 parent e78ae43 commit 27c5c5e

15 files changed

+337
-367
lines changed

Assets/ScriptableRenderLoop/HDRenderLoop/Debug/Resources/DebugViewTiles.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Shader "Hidden/HDRenderLoop/DebugViewTiles"
101101
#endif
102102

103103
int n = 0;
104-
for(int category = 0; category < NR_LIGHT_CATEGORIES; category++)
104+
for(int category = 0; category < LIGHTCATEGORY_COUNT; category++)
105105
{
106106
uint mask = 1u << category;
107107
uint start;

Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ MonoBehaviour:
2828
spotCookieSize: 128
2929
pointCookieSize: 512
3030
reflectionCubemapSize: 128
31+
m_Dirty: 0

Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.asset.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/Lighting.hlsl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717
#define HAS_LIGHTLOOP // Allow to not define LightLoop related function in Material.hlsl
1818

1919
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightDefinition.cs.hlsl"
20-
21-
#ifdef LIGHTLOOP_SINGLE_PASS
22-
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePass.hlsl"
2320
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/LightUtilities.hlsl"
24-
#elif defined(LIGHTLOOP_TILE_PASS)
21+
22+
#if defined(LIGHTLOOP_SINGLE_PASS) || defined(LIGHTLOOP_TILE_PASS)
2523
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePass.hlsl"
2624
#endif
2725

@@ -30,9 +28,7 @@
3028
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Material/Material.hlsl"
3129

3230
// LightLoop use evaluation BSDF function for light type define in Material.hlsl
33-
#ifdef LIGHTLOOP_SINGLE_PASS
34-
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePassLoop.hlsl"
35-
#elif defined(LIGHTLOOP_TILE_PASS)
31+
#if defined(LIGHTLOOP_SINGLE_PASS) || defined(LIGHTLOOP_TILE_PASS)
3632
#include "Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/TilePassLoop.hlsl"
3733
#endif
3834

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePass.hlsl

Lines changed: 0 additions & 192 deletions
This file was deleted.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePass.hlsl.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePassLoop.hlsl

Lines changed: 0 additions & 92 deletions
This file was deleted.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/SinglePass/SinglePassLoop.hlsl.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/ScriptableRenderLoop/HDRenderLoop/Lighting/TilePass/Resources/lightlistbuild-bigtile.compute

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ uniform float4x4 g_mInvScrProjection;
1919
uniform float4x4 g_mScrProjection;
2020
uniform float g_fNearPlane;
2121
uniform float g_fFarPlane;
22+
uniform int _EnvLightIndexShift;
2223

2324
StructuredBuffer<float3> g_vBoundsBuffer : register( t1 );
24-
StructuredBuffer<LightShapeData> _LightShapeData : register(t2);
25+
StructuredBuffer<LightVolumeData> _LightVolumeData : register(t2);
2526
StructuredBuffer<SFiniteLightBound> g_data : register( t3 );
2627

2728

@@ -212,7 +213,7 @@ void CullByExactEdgeTests(uint threadID, int iNrCoarseLights, uint2 viTilLL, uin
212213
for(int l=0; l<iNrCoarseLights; l++)
213214
{
214215
const uint idxCoarse = lightsListLDS[l];
215-
[branch]if (idxCoarse<(uint)g_iNrVisibLights && _LightShapeData[idxCoarse].lightVolume != SPHERE_VOLUME) // don't bother doing edge tests for sphere lights since these have camera aligned bboxes.
216+
[branch]if (idxCoarse<(uint)g_iNrVisibLights && _LightVolumeData[idxCoarse].lightVolume != LIGHTVOLUMETYPE_SPHERE) // don't bother doing edge tests for sphere lights since these have camera aligned bboxes.
216217
{
217218
SFiniteLightBound lgtDat = g_data[idxCoarse];
218219

0 commit comments

Comments
 (0)