浏览代码

Fix basic code generation (still draft, output is not only SurfaceData but also BuiltInData)

/scriptablerenderloop-materialgraph
Paul Demeulenaere 8 年前
当前提交
cdb8bd40
共有 3 个文件被更改,包括 6 次插入8 次删除
  1. 10
      Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs
  2. 1
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.template
  3. 3
      Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitShare.template

10
Assets/ScriptableRenderLoop/HDRenderLoop/HDRenderLoop.cs


namespace UnityEngine.Experimental.ScriptableRenderLoop
{
[Serializable]
public abstract class AbstractHDRenderLoopMasterNode : AbstractMasterNode
public abstract class AbstractHDRenderLoopMasterNode : AbstractMasterNode, IRequiresWorldPosition
{
public AbstractHDRenderLoopMasterNode()
{

};
});
vayrings.Concat(activeNodeList.Where(x => x is IRequiresNormal).Select(x =>
vayrings = vayrings.Concat(activeNodeList.Where(x => x is IRequiresNormal).Select(x =>
{
return new
{

};
}));
vayrings.Concat(activeNodeList.Where(x => x is IRequiresWorldPosition).Select(x =>
vayrings = vayrings.Concat(activeNodeList.Where(x => x is IRequiresWorldPosition).Select(x =>
{
return new
{

};
}));
vayrings.Concat(activeNodeList.Where(x => x is IRequiresViewDirection).Select(x =>
vayrings = vayrings.Concat(activeNodeList.Where(x => x is IRequiresViewDirection).Select(x =>
{
return new
{

if (fromNode == null)
continue;
pixelShaderBodyVisitor.AddShaderChunk("ouput." + slot.shaderOutputName + " = " + fromNode.GetVariableNameForSlot(outputRef.slotId) + ";", true);
pixelShaderBodyVisitor.AddShaderChunk("o." + slot.shaderOutputName + " = " + fromNode.GetVariableNameForSlot(outputRef.slotId) + ";", true);
}
}

1
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/Lit.template


//-------------------------------------------------------------------------------------
// Set of users variables
${LightingFunction}
${ShaderFunctions}
${ShaderPropertyUsages}

3
Assets/ScriptableRenderLoop/HDRenderLoop/Shaders/Material/Lit/LitShare.template


{
Varyings output;
output.positionWS = TransformObjectToWorld(input.positionOS);
output.positionHS = TransformWorldToHClip(output.positionWS);
output.positionHS = TransformWorldToHClip(TransformObjectToWorld(input.positionOS));
${VertexShaderBody}
return PackVaryings(output);
正在加载...
取消
保存