|
|
|
|
|
|
|
|
|
|
var surfaceDescriptionFunction = new ShaderGenerator(); |
|
|
|
var surfaceDescriptionStruct = new ShaderGenerator(); |
|
|
|
var shaderFunctionVisitor = new ShaderGenerator(); |
|
|
|
var surfaceInputs = new ShaderGenerator(); |
|
|
|
var functionRegistry = new FunctionRegistry(builder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var requirements = ShaderGraphRequirements.FromNodes(activeNodeList); |
|
|
|
|
|
|
|
/* |
|
|
|
ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresPosition, InterpolatorType.Position, surfaceInputs);*/ |
|
|
|
|
|
|
|
ShaderGenerator.GenerateSpaceTranslationSurfaceInputs(requirements.requiresPosition, InterpolatorType.Position, surfaceInputs); |
|
|
|
|
|
|
|
ShaderGenerator defines = new ShaderGenerator(); |
|
|
|
defines.AddShaderChunk(string.Format("#define SHADERPASS {0}", pass.ShaderPassName), true); |
|
|
|
|
|
|
|
|
|
|
/*if (requirements.requiresScreenPosition) |
|
|
|
surfaceInputs.AddShaderChunk(string.Format("float4 {0};", ShaderGeneratorNames.ScreenPosition), false);*/ |
|
|
|
if (requirements.requiresScreenPosition) |
|
|
|
surfaceInputs.AddShaderChunk(string.Format("float4 {0};", ShaderGeneratorNames.ScreenPosition), false); |
|
|
|
defines.AddShaderChunk("#define ATTRIBUTES_NEED_TEXCOORD" + (int)channel, true); |
|
|
|
defines.AddShaderChunk("#define VARYINGS_NEED_TEXCOORD" + (int)channel, true); |
|
|
|
defines.AddShaderChunk(string.Format("#define ATTRIBUTES_NEED_TEXCOORD{0}", (int)channel), true); |
|
|
|
defines.AddShaderChunk(string.Format("#define VARYINGS_NEED_TEXCOORD{0}", (int)channel), true); |
|
|
|
} |
|
|
|
|
|
|
|
surfaceInputs.Deindent(); |
|
|
|
|
|
|
usedSlots); |
|
|
|
|
|
|
|
var graph = new ShaderGenerator(); |
|
|
|
graph.AddShaderChunk(shaderFunctionVisitor.GetShaderString(2), false); |
|
|
|
graph.AddShaderChunk(shaderProperties.GetPropertiesDeclaration(2), false); |
|
|
|
graph.AddShaderChunk(builder.ToString(), false); |
|
|
|
graph.AddShaderChunk(shaderProperties.GetPropertiesDeclaration(2), false); |
|
|
|
graph.AddShaderChunk(surfaceDescriptionFunction.GetShaderString(2), false); |
|
|
|
|
|
|
|
var tagsVisitor = new ShaderGenerator(); |
|
|
|