-
Notifications
You must be signed in to change notification settings - Fork 850
Add light layer on indirect lighting controller #777
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
sebastienlagarde
merged 12 commits into
HDRP/staging
from
HDRP/update-multiplier-controler
Jun 16, 2020
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
adca5e0
Add support for reflection controller.
sebastienlagarde ac3df38
Fix compilation
sebastienlagarde 6dbbe96
Merge branch 'HDRP/staging' into HDRP/update-multiplier-controler
sebastienlagarde 9083b2a
Fixed compilation issue and naming
sebastienlagarde e700de0
Merge branch 'HDRP/staging' into HDRP/update-multiplier-controler
sebastienlagarde 21d5558
Fixed compilation issue and naming
sebastienlagarde 82dc77b
Update IndirectLightingControllerEditor.cs
sebastienlagarde 4e1f5ce
Update CHANGELOG.md
sebastienlagarde 3544d23
Update Override-Indirect-Lighting-Controller.md
sebastienlagarde 9be2e82
Update Override-Indirect-Lighting-Controller.md
sebastienlagarde 0107aaf
Update Override-Indirect-Lighting-Controller.md
sebastienlagarde 61c3d24
Update. Indirect controller also affect planar
sebastienlagarde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
33 changes: 27 additions & 6 deletions
33
...nity.render-pipelines.high-definition/Editor/Lighting/IndirectLightingControllerEditor.cs
This file contains hidden or 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 |
---|---|---|
@@ -1,26 +1,47 @@ | ||
using UnityEngine; | ||
using UnityEngine.Rendering.HighDefinition; | ||
using UnityEngine.Rendering; | ||
|
||
namespace UnityEditor.Rendering.HighDefinition | ||
{ | ||
[CanEditMultipleObjects] | ||
[VolumeComponentEditor(typeof(IndirectLightingController))] | ||
class IndirectLightingControllerEditor : VolumeComponentEditor | ||
{ | ||
SerializedDataParameter m_IndirectDiffuseIntensity; | ||
SerializedDataParameter m_IndirectSpecularIntensity; | ||
SerializedDataParameter m_IndirectDiffuseLightingMultiplier; | ||
SerializedDataParameter m_IndirectDiffuseLightingLayers; | ||
|
||
SerializedDataParameter m_ReflectionLightingMultiplier; | ||
SerializedDataParameter m_ReflectionLightingLayers; | ||
|
||
SerializedDataParameter m_ReflectionProbeIntensityMultiplier; | ||
|
||
public override void OnEnable() | ||
{ | ||
var o = new PropertyFetcher<IndirectLightingController>(serializedObject); | ||
|
||
m_IndirectSpecularIntensity = Unpack(o.Find(x => x.indirectSpecularIntensity)); | ||
m_IndirectDiffuseIntensity = Unpack(o.Find(x => x.indirectDiffuseIntensity)); | ||
m_IndirectDiffuseLightingMultiplier = Unpack(o.Find(x => x.indirectDiffuseLightingMultiplier)); | ||
m_IndirectDiffuseLightingLayers = Unpack(o.Find(x => x.indirectDiffuseLightingLayers)); | ||
|
||
m_ReflectionLightingMultiplier = Unpack(o.Find(x => x.reflectionLightingMultiplier)); | ||
m_ReflectionLightingLayers = Unpack(o.Find(x => x.reflectionLightingLayers)); | ||
|
||
m_ReflectionProbeIntensityMultiplier = Unpack(o.Find(x => x.reflectionProbeIntensityMultiplier)); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
PropertyField(m_IndirectDiffuseIntensity, EditorGUIUtility.TrTextContent("Indirect Diffuse Intensity", "Sets the multiplier for baked diffuse lighting.")); | ||
PropertyField(m_IndirectSpecularIntensity, EditorGUIUtility.TrTextContent("Indirect Specular Intensity", "Sets the multiplier for reflected specular lighting.")); | ||
PropertyField(m_IndirectDiffuseLightingMultiplier, EditorGUIUtility.TrTextContent("Indirect Diffuse Lighting Multiplier", "Sets the multiplier for indirect diffuse lighting.\nIt affect Ambient Probe, Light Probes, Lightmaps, Light Probe Volumes, Screen Space Global Illumination, Raytrace Global Illumination.")); | ||
GUI.enabled = HDUtils.hdrpSettings.supportLightLayers; | ||
PropertyField(m_IndirectDiffuseLightingLayers, EditorGUIUtility.TrTextContent("Indirect Diffuse Lighting Layers", "Sets the light layer mask for indirect diffuse lighting. Only matching RenderingLayers on Mesh will get affected by the multiplier.")); | ||
GUI.enabled = true; | ||
|
||
PropertyField(m_ReflectionLightingMultiplier, EditorGUIUtility.TrTextContent("Reflection Lighting Multiplier", "Sets the multiplier for reflected specular lighting.\nIt affect Sky Reflection, Reflection Probes, Planar Probes, Screen Space Reflection, Raytrace Reflection.")); | ||
GUI.enabled = HDUtils.hdrpSettings.supportLightLayers; | ||
PropertyField(m_ReflectionLightingLayers, EditorGUIUtility.TrTextContent("Reflection Lighting Layers", "Sets the light layer mask for reflected specular lighting. Only matching RenderingLayers on Mesh will get affected by the multiplier.")); | ||
GUI.enabled = true; | ||
|
||
PropertyField(m_ReflectionProbeIntensityMultiplier, EditorGUIUtility.TrTextContent("Reflection Probe Intensity Multiplier", "Sets the intensity multiplier for Reflection Probes.")); | ||
} | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.