-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Sky Atmosphere #9649
Merged
AMZN-alexpete
merged 49 commits into
o3de:development
from
aws-lumberyard-dev:Atom/sky/initial
Aug 11, 2022
Merged
Initial Sky Atmosphere #9649
Changes from 24 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
e1810e9
WIP
AMZN-alexpete e63b51a
WIP
AMZN-alexpete 77be766
Support atmospheres at any location
AMZN-alexpete 585af86
Only update Transmittance LUT when values changed.
AMZN-alexpete ce7c782
Add atmosphere origin modes and fast sky prep
AMZN-alexpete 55f4d1e
Merge branch 'Atom/sky/initial' of https://github.com/aws-lumberyard-…
AMZN-alexpete bc88271
WIP
AMZN-alexpete 4f96459
Support atmospheres at any location
AMZN-alexpete 191935d
Only update Transmittance LUT when values changed.
AMZN-alexpete 7442785
Add atmosphere origin modes and fast sky prep
AMZN-alexpete 0513aaf
WIP
AMZN-alexpete a5cb059
Automatically update sun transform on config change
AMZN-alexpete fb5ffa9
Add fast sky LUT for inside atmosphere
AMZN-alexpete e2ff7d6
Fix scaled objects getting culled incorrectly
AMZN-alexpete 5cbb3e0
Fix duplicate sun field
AMZN-alexpete 4135d06
WIP atmosphere shadows
AMZN-alexpete 276a88c
Merge branch 'Atom/sky/initial' of https://github.com/aws-lumberyard-…
AMZN-alexpete 8df7a75
Fix cube map renderer never finishing
AMZN-alexpete 56a8c2b
WIP use shader variants for shadows, sun
AMZN-alexpete 60d66a4
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete 2870689
Use shader variants and fix editor groups
AMZN-alexpete a9fe70d
Revert specular background color change in passes
AMZN-alexpete 412fadf
Revert clear value change for reflection output
AMZN-alexpete 817da6d
Fix tabs, add credit, minor cleanup
AMZN-alexpete 493e22d
Simplify SkyAtmosphereFeatureProcessorInterface
AMZN-alexpete c55da3a
Fix tabs, add comments
AMZN-alexpete 990be2d
Manage LUT update in pass instead of component
AMZN-alexpete cca1308
Fix failing to bind shadow pass in skyviewlut
AMZN-alexpete 0881a2f
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete 3118286
Do not set background to black if not enabled
AMZN-alexpete a7b69c5
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete 60b16ca
Fix missing AZ::Color include
AMZN-alexpete 1d7a703
Update to use latest shadow API
AMZN-alexpete 54e58ad
Attempt to prevent entire entity from re-activating on changes
AMZN-alexpete 2ffe8f4
Fix issue SRG constants not being applied
AMZN-alexpete 5dafe09
Add CubeMap capture support
AMZN-alexpete 7833b5e
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete ab767cb
Add near clip, fade and limit shadow to far clip
AMZN-alexpete dc214ee
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete 183eee8
Removing unnecessary slot info in parent pass
AMZN-alexpete 963835d
Rename PassData to be less ambiguous
AMZN-alexpete fdd4e0e
Fix error when removing child pass
AMZN-alexpete 19e4689
Move SRG updating from Simulate to Render
AMZN-alexpete b08fc97
Fix child pass creation outside build phase
AMZN-alexpete 047086f
Fix not detecting sun transform changes
AMZN-alexpete 3e0b454
Remove unused lighting defines
AMZN-alexpete 35ef904
Fixed shader asset case sensitive path
AMZN-alexpete a4c0808
Merge remote-tracking branch 'upstream/development' into Atom/sky/ini…
AMZN-alexpete d642aee
Fix missing NameDictionary
AMZN-alexpete File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
Gems/Atom/Feature/Common/Assets/Passes/SkyAtmosphere.pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"Type": "JsonSerialization", | ||
"Description" : "This is the group of passes that render the sky atmosphere.", | ||
"Version": 1, | ||
"ClassName": "PassAsset", | ||
"ClassData": { | ||
"PassTemplate": { | ||
"Name": "SkyAtmosphereTemplate", | ||
"PassClass": "SkyAtmospherePass", | ||
"Slots": [ | ||
{ | ||
"Name": "SpecularInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "ReflectionInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "SkyBoxDepth", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ImageViewDesc": { | ||
"AspectFlags": [ | ||
"Depth" | ||
] | ||
} | ||
AMZN-alexpete marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
{ | ||
"Name": "DirectionalShadowmap", | ||
"SlotType": "Input" | ||
}, | ||
{ | ||
"Name": "DirectionalESM", | ||
"SlotType": "Input" | ||
} | ||
], | ||
"PassRequests": [ | ||
{ | ||
"Name": "SkyTransmittanceLUTPass", | ||
"TemplateName": "SkyTransmittanceLUTTemplate", | ||
"Enabled": true | ||
}, | ||
{ | ||
"Name": "SkyViewLUTPass", | ||
"TemplateName": "SkyViewLUTTemplate", | ||
"Enabled": true, | ||
"Connections": [ | ||
{ | ||
"LocalSlot": "SkyTransmittanceLUTInput", | ||
"AttachmentRef": { | ||
"Pass": "SkyTransmittanceLUTPass", | ||
"Attachment": "SkyTransmittanceLUTOutput" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "DirectionalShadowmap", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "DirectionalShadowmap" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "DirectionalESM", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "DirectionalESM" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "SkyRayMarchingPass", | ||
"TemplateName": "SkyRayMarchingTemplate", | ||
"Enabled": true, | ||
"Connections": [ | ||
{ | ||
"LocalSlot": "SkyTransmittanceLUTInput", | ||
"AttachmentRef": { | ||
"Pass": "SkyTransmittanceLUTPass", | ||
"Attachment": "SkyTransmittanceLUTOutput" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "SkyViewLUTInput", | ||
"AttachmentRef": { | ||
"Pass": "SkyViewLUTPass", | ||
"Attachment": "SkyViewLUTOutput" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "SpecularInputOutput", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "SpecularInputOutput" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "ReflectionInputOutput", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "ReflectionInputOutput" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "DepthStencilTextureInput", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "SkyBoxDepth" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "DirectionalShadowmap", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "DirectionalShadowmap" | ||
} | ||
}, | ||
{ | ||
"LocalSlot": "DirectionalESM", | ||
"AttachmentRef": { | ||
"Pass": "Parent", | ||
"Attachment": "DirectionalESM" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
Gems/Atom/Feature/Common/Assets/Passes/SkyAtmosphereParent.pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"Type": "JsonSerialization", | ||
"Description" : "This is the group of passes that render the sky atmosphere.", | ||
"Version": 1, | ||
"ClassName": "PassAsset", | ||
"ClassData": { | ||
"PassTemplate": { | ||
"Name": "SkyAtmosphereParentTemplate", | ||
"PassClass": "SkyAtmosphereParentPass", | ||
"Slots": [ | ||
{ | ||
"Name": "DirectionalShadowmap", | ||
"SlotType": "Input" | ||
}, | ||
{ | ||
"Name": "DirectionalESM", | ||
"SlotType": "Input" | ||
}, | ||
{ | ||
"Name": "SpecularInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "ReflectionInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "SkyBoxDepth", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ImageViewDesc": { | ||
"AspectFlags": [ | ||
"Depth" | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
Gems/Atom/Feature/Common/Assets/Passes/SkyRayMarching.pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{ | ||
"Type": "JsonSerialization", | ||
"Description" : "This is the pass template that renders the sky atmosphere", | ||
"Version": 1, | ||
"ClassName": "PassAsset", | ||
"ClassData": { | ||
"PassTemplate": { | ||
"Name": "SkyRayMarchingTemplate", | ||
"PassClass": "FullScreenTriangle", | ||
"Slots": [ | ||
{ | ||
"Name": "SkyTransmittanceLUTInput", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ShaderInputName": "m_transmittanceLUT" | ||
}, | ||
{ | ||
"Name": "SkyViewLUTInput", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ShaderInputName": "m_skyViewLUT" | ||
}, | ||
{ | ||
"Name": "SpecularInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "ReflectionInputOutput", | ||
"SlotType": "InputOutput", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
}, | ||
{ | ||
"Name": "DepthStencilTextureInput", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ShaderInputName": "m_depth", | ||
"ImageViewDesc": { | ||
"AspectFlags": [ | ||
"Depth" | ||
] | ||
} | ||
}, | ||
|
||
//------------- Shadowing Resources ------------- | ||
{ | ||
"Name": "DirectionalShadowmap", | ||
"ShaderInputName": "m_directionalLightShadowmap", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ImageViewDesc": { | ||
"IsArray": 1 | ||
} | ||
}, | ||
{ | ||
"Name": "DirectionalESM", | ||
"ShaderInputName": "m_directionalLightExponentialShadowmap", | ||
"SlotType": "Input", | ||
"ScopeAttachmentUsage": "Shader", | ||
"ImageViewDesc": { | ||
"IsArray": 1 | ||
} | ||
} | ||
], | ||
"PassData": { | ||
"$type": "FullscreenTrianglePassData", | ||
"ShaderAsset": { | ||
"FilePath": "shaders/skyatmosphere/skyraymarching.shader" | ||
}, | ||
"PipelineViewTag": "MainCamera" | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
Gems/Atom/Feature/Common/Assets/Passes/SkyTransmittanceLUT.pass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"Type": "JsonSerialization", | ||
"Description" : "This is the pass template that renders the sun transmittance", | ||
"Version": 1, | ||
"ClassName": "PassAsset", | ||
"ClassData": { | ||
"PassTemplate": { | ||
"Name": "SkyTransmittanceLUTTemplate", | ||
"PassClass": "FullScreenTriangle", | ||
"Slots": [ | ||
{ | ||
"Name": "SkyTransmittanceLUTOutput", | ||
"SlotType": "Output", | ||
"ScopeAttachmentUsage": "RenderTarget" | ||
} | ||
], | ||
"PassData": { | ||
"$type": "FullscreenTrianglePassData", | ||
"ShaderAsset": { | ||
"FilePath": "shaders/skyatmosphere/skytransmittancelut.shader" | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be in its own Gem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can easily be moved to a gem, but I thought that if it would be eventually replacing the existing physical sky implementation then perhaps it makes sense to put in the same place.