Sebastien Lagarde
7 年前
当前提交
c95b7c47
共有 26 个文件被更改,包括 274 次插入 和 105 次删除
-
5com.unity.render-pipelines.core/CoreRP/Editor/ShaderGenerator/ShaderTypeGeneration.cs
-
2com.unity.render-pipelines.core/CoreRP/ShaderLibrary/Common.hlsl
-
25com.unity.render-pipelines.high-definition/CHANGELOG.md
-
5com.unity.render-pipelines.high-definition/HDRP/Debug/ColorPickerDebug.cs
-
24com.unity.render-pipelines.high-definition/HDRP/Debug/DebugColorPicker.shader
-
33com.unity.render-pipelines.high-definition/HDRP/Debug/DebugDisplay.cs
-
2com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/HDLightEditor.Styles.cs
-
18com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/ReflectionMenuItem.cs
-
39com.unity.render-pipelines.high-definition/HDRP/Material/Lit/Lit.hlsl
-
12com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs
-
3com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDStringConstants.cs
-
14com.unity.render-pipelines.lightweight/LWRP/Editor/ShaderGraph/lightweightPBRExtraPasses.template
-
11com.unity.render-pipelines.lightweight/LWRP/Editor/ShaderGraph/lightweightPBRForwardPass.template
-
14com.unity.render-pipelines.lightweight/LWRP/Editor/ShaderGraph/lightweightUnlitExtraPasses.template
-
11com.unity.render-pipelines.lightweight/LWRP/Editor/ShaderGraph/lightweightUnlitPass.template
-
6com.unity.render-pipelines.lightweight/LWRP/LightweightForwardRenderer.cs
-
3com.unity.render-pipelines.lightweight/LWRP/Shaders/LightweightScreenSpaceShadows.shader
-
2com.unity.render-pipelines.lightweight/LWRP/Shaders/Terrain/LightweightStandardTerrain.shader
-
6com.unity.render-pipelines.lightweight/LWRP/Shaders/Terrain/LightweightStandardTerrainBase.shader
-
82com.unity.shadergraph/Editor/Data/Nodes/Utility/Logic/IsFrontFaceNode.cs
-
5com.unity.shadergraph/Editor/Data/Util/PropertyCollector.cs
-
5com.unity.shadergraph/Editor/Data/Util/ShaderGenerator.cs
-
11CONTRIBUTING
-
21com.unity.render-pipelines.high-definition/HDRP/Debug/FalseColorDebug.cs
-
11com.unity.render-pipelines.high-definition/HDRP/Debug/FalseColorDebug.cs.meta
-
9issue_template.md
|
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Utility", "Logic", "Is Front Face")] |
|||
public class IsFrontFaceNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireFaceSign |
|||
{ |
|||
public IsFrontFaceNode() |
|||
{ |
|||
name = "Is Front Face"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Is-Front-Face-Node"; } |
|||
} |
|||
|
|||
public override bool hasPreview { get { return false; } } |
|||
|
|||
public const int OutputSlotId = 0; |
|||
private const string kOutputSlotName = "Out"; |
|||
|
|||
public override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new BooleanMaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, true, ShaderStageCapability.Fragment)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotId }); |
|||
} |
|||
|
|||
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
visitor.AddShaderChunk(string.Format("{0} {1} = max(0, IN.{2});", precision, GetVariableNameForSlot(OutputSlotId), ShaderGeneratorNames.FaceSign), true); |
|||
} |
|||
|
|||
public bool RequiresFaceSign(ShaderStageCapability stageCapability = ShaderStageCapability.Fragment) |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
|||
using UnityEngine; |
|||
using UnityEditor.Graphing; |
|||
|
|||
namespace UnityEditor.ShaderGraph |
|||
{ |
|||
[Title("Utility", "Logic", "Is Front Face")] |
|||
public class IsFrontFaceNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireFaceSign |
|||
{ |
|||
public IsFrontFaceNode() |
|||
{ |
|||
name = "Is Front Face"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string documentationURL |
|||
{ |
|||
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Is-Front-Face-Node"; } |
|||
} |
|||
|
|||
public override bool hasPreview { get { return false; } } |
|||
|
|||
public const int OutputSlotId = 0; |
|||
private const string kOutputSlotName = "Out"; |
|||
|
|||
public override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new BooleanMaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, true, ShaderStageCapability.Fragment)); |
|||
RemoveSlotsNameNotMatching(new[] { OutputSlotId }); |
|||
} |
|||
|
|||
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
visitor.AddShaderChunk(string.Format("{0} {1} = max(0, IN.{2});", precision, GetVariableNameForSlot(OutputSlotId), ShaderGeneratorNames.FaceSign), true); |
|||
} |
|||
|
|||
public bool RequiresFaceSign(ShaderStageCapability stageCapability = ShaderStageCapability.Fragment) |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
|
|||
# PR review process |
|||
|
|||
- Any PR must have an entry in the corresponding changelog in a separate commit (CHANGELOG.MD file) |
|||
- Changelog follow these guidelines: https://github.com/Unity-Technologies/PostProcessing/blob/v2/CHANGELOG.md |
|||
- Each release branch (2018.1, 2018.2...) have a unique Changelog file |
|||
- when backporting, don't backport the changelog commit but update the branch changelog manually |
|||
- (optional) add reviewver from doc team |
|||
- Any more complex description of a change with future need to go in a release note file |
|||
|
|||
|
|||
|
|
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|||
{ |
|||
[Serializable] |
|||
public class FalseColorDebugSettings |
|||
{ |
|||
public bool falseColor = false; |
|||
|
|||
public float colorThreshold0 = 0.0f; |
|||
public float colorThreshold1 = 2.0f; |
|||
public float colorThreshold2 = 10.0f; |
|||
public float colorThreshold3 = 20.0f; |
|||
|
|||
public void OnValidate() |
|||
{ |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8fc313e69425fb44c8fa18af3761ec24 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
##### What happened? |
|||
|
|||
##### Which package (Shader graph, LW, HDRP, Core...)? |
|||
|
|||
##### Unity template or github source code? |
|||
|
|||
##### Which package version or branch (1.1.8-preview, 2.0.0-preview, 2018.1, 2018.1-experiment, 2108.2...)? |
|||
|
|||
##### Unity version, operating system, target platform (standalone windows, mac, iOS, PS4...)? |
撰写
预览
正在加载...
取消
保存
Reference in new issue