# FNAGLSL Trying to hackily shoehorn GLSL shaders into FNA, while trying to comply with the `Effect` API as much as possible. (Which isn't always working.) ## Does it work? Kinda. Static shaders work. Passing vertex data is very hacky and brittle. Uniforms seem to work, but aren't well-tested. Same goes for textures. Using regular shaders interleaved w/ GLSL shader draw calls seems to work ok. ## How does this work? No. Don't. Here be dragons. ## Are there things it can't do? Yes: * Passing this to a `SpriteBatch` will probably fail in a bad way (unlikely to be fixed). ## How can I use it? ```cs var glsl = new GLSLEffect(GraphicsDevice, new Dictionary() { { GLSLPurpose. VertexShader, "vertex shader here" }, { GLSLPurpose.FragmentShader, "fragment shader here" }, }); // ... glsl.Parameters["paramname"].SetValueT(xyz); using (var bound = glsl.Bind()) { GraphicsDevice.DrawPrimitives(/*...*/); } ``` ## License ``` Copyright (C) 2020 PoroCYon This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the LICENSE file for more details. ```