浏览代码

Fix TextureSlotControl not accepting Render Textures (#1569)

* Allow RT input to TextureSlotControl

* Update changelog
/main
Peter Bay Bastian 6 年前
当前提交
c4fb2e1e
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1
      com.unity.shadergraph/CHANGELOG.md
  2. 2
      com.unity.shadergraph/Editor/Drawing/Views/Slots/TextureSlotControlView.cs

1
com.unity.shadergraph/CHANGELOG.md


- Sub graphs are now suffixed with (sub), so you can tell them apart from other nodes.
- Boolean and Texture type properties now function correctly in sub-graphs.
- The preview of a node does not obstruct the selection outliner anymore.
- The Texture type default input now accepts render textures.
- The Dielectric Specular node no longer resets its control values.
- HD PBR subshader no longer duplicates surface description code into vertex shader.
- You can now copy, paste, and duplicate sub-graph nodes with vector type input ports.

2
com.unity.shadergraph/Editor/Drawing/Views/Slots/TextureSlotControlView.cs


void OnValueChanged(ChangeEvent<Object> evt)
{
var texture = evt.newValue as Texture2D;
var texture = evt.newValue as Texture;
if (texture != m_Slot.texture)
{
m_Slot.owner.owner.owner.RegisterCompleteObjectUndo("Change Texture");

正在加载...
取消
保存