Skip to content

Fixed lightmaps not working properly with shader graphs in ray traced reflections (case 1305335). #3352

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

Merged
merged 3 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed light layer issue when performing editing on multiple lights.
- Fixed an issue where selection in a debug panel would reset when cycling through enum items.
- Fixed material keywords with fbx importer.
- Fixed lightmaps not working properly with shader graphs in ray traced reflections (case 1305335).

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor()
var descriptor = base.GetRaytracingSubShaderDescriptor();

if (eyeData.subsurfaceScattering)
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface());
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true));

return descriptor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor()
var descriptor = base.GetRaytracingSubShaderDescriptor();

if (fabricData.subsurfaceScattering)
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface());
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true));

return descriptor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor()
var descriptor = base.GetRaytracingSubShaderDescriptor();

if (litData.materialType == HDLitData.MaterialType.SubsurfaceScattering)
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface());
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true));

return descriptor;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,7 @@ public static PassDescriptor GenerateRaytracingIndirect(bool supportLighting)
referenceName = "SHADERPASS_RAYTRACING_INDIRECT",
lightMode = "IndirectDXR",
useInPreview = false,
requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null,

// Collections
pragmas = CorePragmas.RaytracingBasic,
Expand Down Expand Up @@ -972,6 +973,7 @@ public static PassDescriptor GenerateRaytracingForward(bool supportLighting)
referenceName = "SHADERPASS_RAYTRACING_FORWARD",
lightMode = "ForwardDXR",
useInPreview = false,
requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null,

// Port Mask
// validVertexBlocks = CoreBlockMasks.Vertex,
Expand Down Expand Up @@ -1037,6 +1039,7 @@ public static PassDescriptor GenerateRaytracingGBuffer(bool supportLighting)
referenceName = "SHADERPASS_RAYTRACING_GBUFFER",
lightMode = "GBufferDXR",
useInPreview = false,
requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null,

// Port Mask
// validVertexBlocks = CoreBlockMasks.Vertex,
Expand Down Expand Up @@ -1150,7 +1153,7 @@ IncludeCollection GenerateIncludes()

#region Raytracing Subsurface

public static PassDescriptor GenerateRaytracingSubsurface()
public static PassDescriptor GenerateRaytracingSubsurface(bool supportLighting)
{
return new PassDescriptor
{
Expand All @@ -1159,6 +1162,7 @@ public static PassDescriptor GenerateRaytracingSubsurface()
referenceName = "SHADERPASS_RAYTRACING_SUB_SURFACE",
lightMode = "SubSurfaceDXR",
useInPreview = false,
requiredFields = supportLighting ? CoreRequiredFields.LitMinimal : null,

// Template
// passTemplatePath = passTemplatePath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ protected override SubShaderDescriptor GetRaytracingSubShaderDescriptor()
var descriptor = base.GetRaytracingSubShaderDescriptor();

if (stackLitData.subsurfaceScattering)
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface());
descriptor.passes.Add(HDShaderPasses.GenerateRaytracingSubsurface(true));

return descriptor;
}
Expand Down