Exemple #1
0
 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);
 }
Exemple #2
0
 protected abstract void DefineLocation(VertexDefinition definition, Renderable target, Type vertexType);
Exemple #3
0
 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);
 }