public bool CompileForShadowMap(Renderable target) { if (CompileIfNeeded() == false) { return(false); } Debug.Assert(_vertexType is not null); if (_shader is RenderShadowMapShader shader) { var definition = new VertexDefinition(_program); shader.DefineLocation(definition, target, _vertexType); } else { Debug.Fail($"Shader must be {nameof(RenderShadowMapShader)}. actual: {_shader?.GetType()?.FullName}"); } return(true); }
protected abstract void DefineLocation(VertexDefinition definition, Renderable target, Type vertexType);
protected abstract void DefineLocation(VertexDefinition definition, Control target, Type vertexType);
public void DefineLocation(VertexDefinition definition, Renderable target, Type vertexType) { definition.Map(vertexType, 0, VertexSpecialField.Position); }