uygar
2f7e24ac
Initial commit for the new shadow system.
The old system is still in place and is executing, alongside the new system.
Rendering will use the results of the new system, though.
Shadowmap rendering now happens after light lists have been generated.
All relevant files are in the Shadow subfolder.
The basic file structure is:
- ShadowBase.cs has interface and base class definitions
- Shadow.cs has default implementations
- Shadow.hlsl is the default header to be included by shaders
TilePass.cs currently owns the shadows via its InitShadowSystem function.
8 年前
uygar
c8a27740
Merge branch 'master' into shadows
8 年前
uygar
a9dc4866
Modified ShadowmapBase by adding a new enum bitmask designating the supported shadow types by this shadowmap.
Modified ShadowManager to take an array of shadow maps instead of only one. The shadowmanager will allocate lights according to each shadowmap's supported shadows mask. Shadowmaps are traversed in order specified in the constructor. Currently there's a limit of 4 maps per light type.
Changed shadow sampling functions in shader code to support multiple comparison samplers.
Modified tilepass to pass two shadowmaps, one for directional, one for point lights, to the shadowmanager to test the new functionality. This will probably change again soon.
8 年前
uygar
02ed6370
Added a new ShadowPayload struct that contains 4 ints to cut down on the number of buffer load instructions in shaders.
Updated the code to use the new shadow payload struct instead of a simple int[] array.
Removed an obsolete assertion.
8 年前
uygar
4ab44f55
Added missing call to postupdate in shadow atlas after rendering the last shadowmap.
8 年前
uygar
94d9ef0a
Added support for choosing shadow algorithms. Each algorithm can have up to 8 variants.
Added VSM, EVSM and MSM shadowmaps.
Added custom editor to additional light data for drawing shadow specific UI.
8 年前
uygar
699822c3
Added support for choosing a precision for shadow variants. There are two settings, Low and High, which currently select between 16 bits per channel and 32 bits per channel shadow maps.
Merged directional and point/spot lights into the same atlas again. Added two additional atlases to support 16 bpp VSM style shadow maps.
Added new dropdown to AdditionalLightData to select precision if available.
8 年前
uygar
95a0d58b
Fixed winding order of objects renderered into point shadowmaps.
Pulled point light matrix and split plane calculations from C++ into C#.
Removed cullresults and index parameters from the ShadowUtils helper function for point lights.
Added new ShadowUtilsConstants class which contains constants to work with cubemaps.
8 年前
uygar
d717a22e
Added additional bias parameter for all algorithms.
Changed the scale of the PCF bias parameter.
8 年前
Torbjorn Laedre
e84f6bea
Fixed compiler warning.
8 年前
uygar
cefe8b15
Merge branch 'master' into shadows
8 年前
uygar
13bfd3f7
Changed texelSizeRcp passed into shaders from a float2 to a float4. The first xy coordinates are the actual texel size of the texture, whereas zw are the texelsizes relative to the viewport.
Added a factor of 100 to the normal bias passed into the shader.
Updated shaders to use the new zw component for the normal bias offset.
Added bias offset code to point, spot and punctual routines as well.
8 年前
uygar
015180f0
Added checking the individual shadow fade distance per light to the shadow managers prune function.
8 年前
uygar
ce4c49e3
Fixed shadowmap rendertargets getting lost upon scene change. Also added cleanup code for rendertargets.
8 年前
uygar
1d081a77
Moved shadow related files into ShaderLibrary and common to reflect their general usage.
Added support for the new shadow library to fptl.
Introduced a new shadow include inline file to support different shadow setups for different light loops per project.
Restructured the code a bit in order to support multiple instances per project.
Fixed and issue with broken shaders when one of the samplers was set to 0.
8 年前
Tim Cooper
c30d33b8
[Format]Reformat via format.pl to match the new conventions
8 年前
Evgenii Golubev
f5b4c7e9
Implement orthographic projector lights (single pass loop only)
8 年前
FlorentGuinier
980b67d3
[gfx-shadows] First step toward adding tents pcf filters
Adding UI and placeholder shader implementation
8 年前
uygar
d82162c7
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into shadows
8 年前
uygar
c0b6dcd6
Removed the old shadow system.
Removed the temporary namespace ShadowExp.
8 年前
uygar
7f34a973
Added ifdef guards around Editor code to fix script compile errors when building a player.
8 年前
sebastienlagarde
36fbd6cc
HDRenderPipeline: Relink enable shadow option + add test shadow scene
8 年前
Sebastien Lagarde
f5f6d525
HDRenderPipeline: Fix shadow debug menu (was not working after shadow merge)
8 年前
uygar
1996704d
Fixed hardcoded shadow resource path incorrectly handling out of bounds cases.
Fixed directional lights being subject to shadow distance calculations.
Fixed errors when having empty cascades.
8 年前
uygar
622d6403
Fixed shadow priority sort being inverted.
8 年前
uygar
beaf6e75
Modified moment based shadow maps to always use [0;1] z.
8 年前
uygar
81876b50
Added shadow cascade settings to additional light data.
8 年前
Julien Ignace
b09d5f72
- Cleaned up CommonSettings from Cascaded parameters which are now in the light.
- Cleaned up some now useless code in the init code of shadow system
- Split ShadowSettings struct into two different parts. One for the init and the other for the per frame setup
- Cleaned up HDRenderPipeline a bit (mostly moving logic stuff from the asset to the instance itself)
8 年前
Julien Ignace
0fef8e78
Added cascadeCount API to AdditionalLightData
8 年前
Julien Ignace
8db13baa
Refactored shadow map debug views. Now ShadowMap implementation is responsible for display.
8 年前
Julien Ignace
e20b9e23
Removed Material from Shadow Debug API (it's now held by the shadow system)
8 年前
Julien Ignace
70b0ab1e
User can now display shadow map of the currently selected light.
8 年前
Julien Ignace
c4442bb9
Renamed shadow debug API based on feedback and added the slice parameter.
8 年前
Julien Ignace
c6828cd2
Implemented variance shadow specific debug shader.
8 年前
uygar
2e691da9
Modified creation of shadowmap, so subclasses can override texture settings before the RTID gets created.
8 年前
uygar
0cf2dd7b
Added min/max values to the shadowmap debug drawer to control the output value range. Also added controls for the new values to the lightingdebug panel.
8 年前
Tim Cooper
acb5e6cb
rename CullingParameters -> ScriptableCullingParameters
8 年前
Tim Cooper
8b0f6d4c
use pooling
8 年前
Tim Cooper
696ae193
Fixing memory allocations
8 年前
Tim Cooper
b1156959
[gc]Convert to pooling
7 年前
sebastienlagarde
a7ee1111
HDRenderPipeline: Split AdditionalLightdata into HDAdditionalLight and AdditionalShadowData
HDAdditionalLight is dedicated to the render pipeline
AdditionalShadowData is common to all render pipeline
7 年前
sebastienlagarde
3c87f2f4
Update shadow API - Use List<VisibleLight> instead of VisibleLightArray[]
7 年前
Julien Ignace
a097b170
Changed HDRP and Shadow system APIs to take command buffers instead of ScriptableRenderPipeline.
This forces client to handle Cmd Buffer management and execution. This is necessary due to the impossibility to use nested Command Buffers currently (so any API called from user land cannot create and execute a CB of its own).
7 年前
Evgenii Golubev
b55fb554
Avoid modifying VisibleLights
7 年前
Evgenii Golubev
72d87a7d
Fix CSM for camera-relative rendering and enable the latter by default
7 年前
runes
3c1116f3
added code to bind shadow resources to compute shaders
7 年前
uygar
303965c0
Fixed normal bias leading to light leaking with point shadows.
7 年前
uygar
178ae77f
Added smooth cascade transitions to cascaded shadowmaps.
7 年前
uygar
05ca6220
Changed CachedEntry type from struct to class to avoid unnecessary copies when doing array operations.
Replaced unnecessary array copy in VectorArray class.
7 年前
uygar
876f9979
Added dithering to cascade transitions. There are now two functions to choose from, to either blend between cascades doing two fetches, or dither doing just one fetch.
Added functions to query the world space position of a shadowmap sample.
7 年前
Julien Ignace
024ca3bf
Failing to allocate shadow maps no longer throws an exception but just raises an error.
7 年前
runes
dd5838bd
sample game delta:
-FPS Mode (Render mesh with custom FOV)
-only PCF shadows with game specific limits
-Atmosphere y-offset property
7 年前
Julien Ignace
d4b9dd15
Split directional shadow resolution in a different pass to reduce VGPR pressure during tile lighting.
7 年前
Peter Andreasen
69c448b2
Merge remote-tracking branch 'origin/master' into sample_game
7 年前
Thomas
2cdd3c12
Moved most of HDRP utilities to Core
7 年前
Thomas
895c04b2
Improved ProfilingSample API
7 年前
Peter Andreasen
2ef7d649
merged with master
7 年前
uygar
b90724d4
Added MSAA support to moment based shadowmaps. Also made some optimizations to the blur compute shader.
7 年前
uygar
20767512
Added programmatic control of depth clipping. Depth clipping is disabled for shadow cascades and enabled for everything else.
7 年前
Arnaud Carre
532e9568
fix profiling markers for C#
7 年前
Peter Andreasen
f052451a
merged from master
7 年前
Peter Andreasen
5d36f104
Merged master
7 年前
Julien Ignace
536372e5
Fixed shadow map creation code in the shadow framework.
7 年前
Evgenii Golubev
87e85612
Refactor math constant defines
7 年前
Peter Andreasen
b6423cf9
merge
7 年前
sebastienlagarde
f6f454a7
Fix issue with tessellation and shadow
7 年前
uygar
47eeaedf
Reduced per frame memory allocations.
7 年前
Peter Andreasen
3ccf74cc
merged from master
7 年前
uygar
c8556633
Changed shadow biasing. Biasing can now use normal and light vector information to avoid artifacts.
Added:
- normal+view biasing
- light view only biasing
- per sample biasing for wide PCF filters
- corner light leaking mitigation
- defines to control what type of biasing should be enabled
- a few new UI controls in the additionalshadowdata component
Removed previous biasing controls. They won't have any effect anymore.
7 年前
uygar
4bf6ce24
Increased the default fov guard for now to handle seams for point lights.
7 年前
uygar
c278421b
Added new helper function to calculate a guard angle for spot and point lights that gets added to the given fov so that biasing and filtering cannot access the shadowmap outside the valid range.
7 年前
uygar
f5518a7e
Limited per face information to matrices and atlas offsets to cut down on register usage.
7 年前
uygar
74b782e2
Added new parameters to control the edge leak fixup.
Agreessiveness of the fixup can be controled, and the reference vector can either be set to the normal if available or the view vector.
7 年前
uygar
a6b4b937
Set the default depth bias to 0.
7 年前
uygar
34eeceb3
Moved slice into a separate float to avoid unnecessary casting in the shader.
7 年前
uygar
ae42e524
Split shadow matrix into separate components to selectively load per face data for point lights to improve register usage.
7 年前
uygar
34443229
Separated light and cascade data loading for directional lights.
Introduced clear rect rendering to avoid clearing the entire shadowmap.
7 年前
uygar
7528e3f3
Replaced the two clear shadow passes with one using the platform far plane define.
7 年前
sebastienlagarde
116379ee
Add memory RT name/information everywhere
7 年前
sebastienlagarde
35560656
Merge remote-tracking branch 'refs/remotes/origin/master' into shadows-biasing
7 年前
uygar
775d3f32
Optimized cascade selection code to reduce register usage.
Added additional texture size parameter to tent filters to avoid rcp calculations using up registers.
Removed unused scale parameter from directional light payloads.
7 年前
uygar
c9b42ea6
Added cam relative offset to inverse of shadow matrix.
7 年前
uygar
62637d1f
Fixed out of bounds access.
7 年前
uygar
e85069ef
Added null check to handle some weird case when running tests.
7 年前
uygar
75a06b95
Added a combined contact shadows + normal biasing pass.
Replaced shadow specific cubemap face function. The shadow system is now going to use the one from common.hlsl.
Renamed nrml to normal.
Added a few comments.
7 年前
Peter Andreasen
04b933d9
merged with master
7 年前
Sebastien Lagarde
0c54bec9
Move resources outside of resource folder
- Move all shader/material in Resources folder to CoreResource folder
- Move DisplayShadowMap.Shader out of Resources folder
- Pass needed material to Core function through parameters
- Update reflection system to take RenderPipeline resource into account
7 年前
Sebastien Lagarde
4d0b3071
add shadow resource to renderpipeline resource
- Move shadow .shader and .compute from ShaderLibrary to Shadow folder
- Init material and compute throught SahdowAtlasInit
7 年前
uygar
706c8fbf
Provided way of passing in values for per frame shadow update budgets.
7 年前
Tim Cooper
da540b9e
Fix minor warnings
7 年前
uygar
3251dfad
Fixed cascade selection when there are less than max cascades.
7 年前
uygar
db49ba68
Changed atlasing errors to warnings.
7 年前
Tim Cooper
ab32fa26
Fix minor warnings
7 年前
sebastienlagarde
1edd41cb
Fixed cascade selection when there are less than max cascades.
7 年前
sebastienlagarde
02280c4b
Fix shader warning, shadow warning and hide physical camera parameter
7 年前
uygar
ba8f60e4
Added reading the global overrides when launching shadow requests.
7 年前
uygar
f40129d8
Fixed blending of inactive cascades.
7 年前
uygar
32641789
Enabled support for rendering into slices as the runtime supports it now.
Fixed an error in the atlasing logic.
7 年前
Julien Ignace
845f068a
Fixed shadow and reflection debug overlay being flipped in game view.
7 年前
Peter Bay Bastian
9ea8912a
Fixed handling unknown GPUShadowTypes in the shadow manager.
7 年前
Evgenii Golubev
f1877508
Update GetRenderTargetAutoName() to support volume textures
7 年前
uygar
2fc50ce9
Fixed handling unknown GPUShadowTypes in the shadow manager.
7 年前
Tim Cooper
fafb59af
Run code formatter.
7 年前
Antoine Lelievre
447b05b3
Raw PCSS import from DREAM-2018.2 project
6 年前
Antoine Lelievre
3072fc83
PCSS is now working
6 年前
Antoine Lelievre
f53d652d
Added a field to control sampleCount in the inspector
6 年前
Antoine Lelievre
8120bd8f
Cleanup code and inconsistencies
6 年前
Antoine Lelievre
f6b0b8f5
Fix shadow algorithm reserve size
6 年前