public static ZeroAttributeRenderer Create() { var shaderCodes = new ShaderCode[2]; shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\ZeroAttributeRenderer\ZeroAttribute.vert"), ShaderType.VertexShader); shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\ZeroAttributeRenderer\ZeroAttribute.frag"), ShaderType.FragmentShader); var map = new AttributeMap();// no items in this map. var model = new ZeroAttributeModel(DrawMode.TriangleStrip, 0, 4); var renderer = new ZeroAttributeRenderer(model, shaderCodes, map, new PointSpriteState()); renderer.ModelSize = new vec3(2.05f, 2.05f, 0.01f); return renderer; }
public static RayTracingRenderer Create() { var shaderCodes = new ShaderCode[2]; shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\RayTracingRenderer\fullscreen.vert.glsl"), ShaderType.VertexShader); shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\RayTracingRenderer\texture.frag.glsl"), ShaderType.FragmentShader); var map = new AttributeMap(); IBufferable model = new ZeroAttributeModel(DrawMode.TriangleStrip, 0, 4); var renderer = new RayTracingRenderer(model, shaderCodes, map); return(renderer); }
public static ZeroAttributeRenderer Create() { var shaderCodes = new ShaderCode[2]; shaderCodes[0] = new ShaderCode(File.ReadAllText(@"shaders\ZeroAttributeRenderer\ZeroAttribute.vert"), ShaderType.VertexShader); shaderCodes[1] = new ShaderCode(File.ReadAllText(@"shaders\ZeroAttributeRenderer\ZeroAttribute.frag"), ShaderType.FragmentShader); var map = new AttributeMap();// no items in this map. var model = new ZeroAttributeModel(DrawMode.TriangleStrip, 0, 4); var renderer = new ZeroAttributeRenderer(model, shaderCodes, map, new PointSpriteState()); renderer.ModelSize = new vec3(2.05f, 2.05f, 0.01f); return(renderer); }