[過去ログ] 【3Dゲームエンジン】Unity質問スレッド36 (1002レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
38: 名前は開発中のものです。 [sage] 2018/06/08(金) 22:51:27.49 ID:WuDcEQ3x(1) AAS
シェーダーグラフのノードを自作できるみたいなんで以下の感じでテクスチャをRGBAでアウトプットする
ノードを作ってみたのですが、
Preview shader for graph has 1 error:
Shader compilation error in graph at line 47 (on d3d11):
undeclared identifier '_MyCustomNode_93134358_Sampler'
とエラーがでてしまいます。調べてもそれらしい情報がみつからずに手詰まり状態です。
シェーダーにテクスチャが宣言されていなバグだろうとは思うのですが、どなたか情報もってる方おられませんでしょうか?
using UnityEngine;
using UnityEditor.ShaderGraph;
using System.Reflection;
[Title("Custom", "My Custom Node")]
public class NewBehaviourScript : CodeFunctionNode
{ public NewBehaviourScript()
{
name = "My Custom Node";
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("test",
BindingFlags.Static | BindingFlags.NonPublic);
}
static string test(
[Slot(0, Binding.None)] Texture2D Texture,
[Slot(1, Binding.MeshUV0)] DynamicDimensionVector UV,
[Slot(2, Binding.None)] SamplerState Sampler,
[Slot(3, Binding.None)] out ColorRGBA Out)
{return @"{Out = SAMPLE_TEXTURE2D(Texture, Sampler, UV);}";}
}
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.027s