Giter VIP home page Giter VIP logo

shader-baker's People

Contributors

dboone avatar drbassett avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

shader-baker's Issues

Cache OpenGL shader objects used for validation

Currently, each validation pass for shaders asks OpenGL to create a brand new shader object for validation, and deletes it after validation has completed. This approach has a couple of issues:

  • For a GLSL program validation feature, any shaders attached to a program will have to be created and compiled again. If the same shader is attached to multiple programs, it will have to be created and compiled for each of these programs.
  • For a GLSL program preview feature, the same problem occurs as for whole program validation. Shaders have to be recreated and recompiled.

On-the-fly recompilation is a simple and nicely decoupled design, but is incredibly wasteful. A more efficient solution would be to cache OpenGL shader objects that have already been validated, so that they can be reused immediately when validating programs, and when setting up a program for rendering.

Establishing a caching pattern will also be useful for future features, such as program validation, loading program inputs into buffer objects, etc.

Unique names for GLSL shaders and programs

The application should generate unique names for shaders and programs, and require that the name be unique when the user renames them. This will help disambiguate parts of the GUI. For example, the shader error list displays the shader name along with the error message. If two shaders have the same name, it is impossible for the user to tell which one is in error without inspecting the shader source code directly.

This will also ease the addition of a serialized project format. It is likely that shaders will be stored in separate files (rather than embedded in a monolithic project file), and in this case the shader name can also be used as its file name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.