Giter VIP home page Giter VIP logo

Comments (3)

bkaradzic avatar bkaradzic commented on May 14, 2024

Yes GLSL is text in .bin file, but technically they should be considered binary (they are only in source form because that's how GL expect it, if I could use binaries there I would :). Source GLSL shader passes throught GLSL optimizer and it outputs optimized version of GLSL. HLSL has binary representation. The reason why I don't pass HLSL source is because I don't want to link or dynamically load D3DX DLL. You should be able to pass different vertex attributes to shaders, even if they mismatch shader inputs.

As for multiple render targets, I'm planning to add them, but I want solution that would work for GLES2, so that part is a bit more difficult. Anyhow it's on my todo list to be done soon.

from bgfx.

questor avatar questor commented on May 14, 2024

okay, makes sense somehow :) It also wouldn't be very clever to optimise something still with compile switches... perhaps I have to think more about a shader configuration (a json file with all possible define combinations that are allowed on a shader and the compiler compiles all combinations). but that would be something for a upper software layer, not for bgfx itself...

from bgfx.

bkaradzic avatar bkaradzic commented on May 14, 2024

Yeah idea is to keep those shader code generators in layer above bgfx. shaderc is running full preprocessor, so if you can achieve what you need with some preprocessor magic, you could do it with shaderc. Also you could generate multiple .sc files in some scripting language, and then run it through shaderc to get final binaries. If you share small example on Gist I might have better idea what you're trying to achieve and I might have solution for it.

from bgfx.

Related Issues (20)

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.