|
|
|
|
|
|
|
|
|
|
public override void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode) |
|
|
|
{ |
|
|
|
var slotTexture2D = FindInputSlot<MaterialSlot>(0); |
|
|
|
var slotTexture2D = FindOutputSlot<MaterialSlot>(0); |
|
|
|
if (slotTexture2D != null) |
|
|
|
{ |
|
|
|
var edgesTexture2D = owner.GetEdges(slotTexture2D.slotReference).ToList(); |
|
|
|
|
|
|
visitor.AddShaderChunk("Texture2D " + propertyName + "_T2D;", true); |
|
|
|
visitor.AddShaderChunk("Texture2D " + propertyName + ";", true); |
|
|
|
var slotSampler2D = FindInputSlot<MaterialSlot>(0); |
|
|
|
var slotSampler2D = FindOutputSlot<MaterialSlot>(1); |
|
|
|
var edgesSampler2D = owner.GetEdges(slotTexture2D.slotReference).ToList(); |
|
|
|
var edgesSampler2D = owner.GetEdges(slotSampler2D.slotReference).ToList(); |
|
|
|
visitor.AddShaderChunk("Sampler2D " + propertyName + "_S2D;", true); |
|
|
|
visitor.AddShaderChunk("sampler2D " + propertyName + ";", true); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|