浏览代码

Merge branch 'master' into sg/fix-for-subgraphs-inside-main-graph

/main
GitHub 7 年前
当前提交
2274ce9d
共有 11 个文件被更改,包括 47 次插入24 次删除
  1. 1
      .gitmodules
  2. 12
      TestProjects/ShaderGraph/Packages/manifest.json
  3. 3
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs
  4. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs
  5. 8
      com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs
  6. 27
      com.unity.shadergraph/CHANGELOG.md
  7. 13
      com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs
  8. 2
      com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs
  9. 3
      com.unity.shadergraph/.data/show_generated_code.gif
  10. 0
      /com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs.meta
  11. 0
      /com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs

1
.gitmodules


[submodule "com.unity.postprocessing"]
path = com.unity.postprocessing
url = https://github.com/Unity-Technologies/PostProcessing.git
branch = v2

12
TestProjects/ShaderGraph/Packages/manifest.json


{
"dependencies": {
}
"dependencies": {
"com.unity.postprocessing": "file:../../../com.unity.postprocessing",
"com.unity.render-pipelines.core": "file:../../../com.unity.render-pipelines.core",
"com.unity.shadergraph": "file:../../../com.unity.shadergraph",
"com.unity.render-pipelines.high-definition": "file:../../../com.unity.render-pipelines.high-definition",
"com.unity.render-pipelines.lightweight": "file:../../../com.unity.render-pipelines.lightweight"
},
"testables": [
"com.unity.render-pipelines.shadergraph"
]
}

3
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs


// A material's GI flag internally keeps track of whether emission is enabled at all, it's enabled but has no effect
// or is enabled and may be modified at runtime. This state depends on the values of the current flag and emissive color.
// The fixup routine makes sure that the material is in the correct state if/when changes are made to the mode or color.
if (material.HasProperty(kEmissionColor))
material.SetColor(kEmissionColor, Color.white); // kEmissionColor must always be white to allow our own material to control the GI (this allow to fallback from builtin unity to our system).
// as it happen with old material that it isn't the case, we force it.
MaterialEditor.FixupEmissiveFlag(material);
// Commented out for now because unfortunately we used the hard coded property names used by the GI system for our own parameters

2
com.unity.render-pipelines.high-definition/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs


{
"FragInputs.worldToTangent",
"FragInputs.positionWS",
"FragInputs.texCoord1",
"FragInputs.texCoord2"
},
PixelShaderSlots = new List<int>()
{

8
com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs


HDUtils.DrawFullScreen(cmd, hdCamera, m_CameraMotionVectorsMaterial, m_VelocityBuffer, m_CameraDepthStencilBuffer, null, 0);
PushFullScreenDebugTexture(hdCamera, cmd, m_VelocityBuffer, FullScreenDebugMode.MotionVectors);
#if UNITY_EDITOR
// In scene view there is no motion vector, so we clear the RT to black
if (hdCamera.camera.cameraType == CameraType.SceneView)
{
HDUtils.SetRenderTarget(cmd, hdCamera, m_VelocityBuffer, m_CameraDepthStencilBuffer, ClearFlag.Color, CoreUtils.clearColorAllBlack);
}
#endif
}
}

27
com.unity.shadergraph/CHANGELOG.md


![](.data/menu_settings.png)
The settings on master nodes now live in a small window that you can toggle on and off. The settings menu allows you to change various rendering settings for your shader.
The settings for master nodes now live in a small window that you can toggle on and off. Here, you can change various rendering settings for your shader.
The property reference names are now editable. Furthermore, it is now possible to control whether the properties are exposed.
You can now edit the Reference name for a property. To do so, select the property and type a new name next to Reference. If you want to reset to the default name, right-click Reference, and select Reset reference.
In the expanded property window, you can now also toggle if the property is exposed.
### Editable paths for graphs

Enables the user to change the path of Shader Graphs and Sub Graphs. Changing the path of a Shader Graph modifies the location it has in the shader selection list. Likewise changing the path of Sub Graph modifies its location in the node creation menu.
You can now change the path of Shader Graphs and Sub Graphs. When you change the path of a Shader Graph, this modifies the location it has in the shader selection list. When you change the path of Sub Graph, it will have a different location in the node creation menu.
### Gradient nodes

This adds gradient functionality via two new nodes. Sample Gradient node samples a gradient given a Time parameter. This gradient can be defined on the Gradient slot control view. The Gradient Asset node defines a gradient that can be sampled by multiple Sample Gradient nodes using different Time parameters.
This adds gradient functionality via two new nodes. The Sample Gradient node samples a gradient given a Time parameter. You can define this gradient on the Gradient slot control view. The Gradient Asset node defines a gradient that can be sampled by multiple Sample Gradient nodes using different Time parameters.
### Show generated code
![](.data/show_generated_code.gif)
You can now see the generated code for any specific node. To do so, right-click the node, and select Show Generated Code. The code snippet will now open in the code editor that you have linked to Unity.
- Fixed an issue where vector 1 node was not evaluating properly. ([#334](https://github.com/Unity-Technologies/ShaderGraph/issues/334) and [#337](https://github.com/Unity-Technologies/ShaderGraph/issues/337))
- Vector 1 nodes now evaluate correctly. ([#334](https://github.com/Unity-Technologies/ShaderGraph/issues/334) and [#337](https://github.com/Unity-Technologies/ShaderGraph/issues/337))
- Make nodes that are copied from one graph to another spawn in the center of the current view. ([#333](https://github.com/Unity-Technologies/ShaderGraph/issues/333))
- Fixed an issue with editable sub graph paths, causing the search window to sometimes yield a null reference exception.
- Ensure that the blackboard is within view when deserialized.
- Fixed float value to string error and truncation warning for normal create node.
- Nodes that are copied from one graph to another now spawn in the center of the current view. ([#333](https://github.com/Unity-Technologies/ShaderGraph/issues/333))
- When you edit sub graph paths, the search window no longer yields a null reference exception.
- The blackboard is now within view when deserialized.
- Your system locale can no longer cause incorrect commands due to full stops being converted to commas.
- Sub graphs are now suffixed with (sub), so you can tell them apart from other nodes.
- Sub graphs are now suffixed with (sub), so you can tell them apart from other nodes.

13
com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs


void OnSpaceDown(KeyDownEvent evt)
{
if (evt.keyCode == KeyCode.Space && !evt.shiftKey && !evt.altKey && !evt.ctrlKey && !evt.commandKey)
{
if (graphView.nodeCreationRequest == null)
return;
Vector2 referencePosition;
referencePosition = evt.imguiEvent.mousePosition;
Vector2 screenPoint = m_EditorWindow.position.position + referencePosition;
graphView.nodeCreationRequest(new NodeCreationContext() { screenMousePosition = screenPoint });
}
else if (evt.keyCode == KeyCode.F1)
if (evt.keyCode == KeyCode.F1)
{
if (m_GraphView.selection.OfType<MaterialNodeView>().Count() == 1)
{

2
com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs


{
public RenderPipelineAsset renderPipelineAsset;
#if UNITY_EDITOR
void OnEnable()
{
GraphicsSettings.renderPipelineAsset = renderPipelineAsset;

{
GraphicsSettings.renderPipelineAsset = renderPipelineAsset;
}
#endif
}

3
com.unity.shadergraph/.data/show_generated_code.gif


version https://git-lfs.github.com/spec/v1
oid sha256:a1724773ebd1aabd5f41531442ec99b1dc6f3714897f46fdcd2dd42c3c55168f
size 1563150

/com.unity.render-pipelines.core/CoreRP/Editor/SceneRenderPipeline.cs.meta → /com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs.meta

/com.unity.render-pipelines.core/CoreRP/Editor/SceneRenderPipeline.cs → /com.unity.render-pipelines.core/CoreRP/Utilities/SceneRenderPipeline.cs

正在加载...
取消
保存