Giter Club home page Giter Club logo

Comments (7)

BearishSun avatar BearishSun commented on August 22, 2024 1

Possibly, but in the editor where the user can dynamically change shaders it could get pretty spammy when the user makes an error, so it would need to be a bit more sophisticated solution.

from bsf.

underdoeg avatar underdoeg commented on August 22, 2024

I intentionally added an error into the fragment shader of the LowLevelRendering Example. The result ist a message:
[ERROR] Cannot find parameter block with the name: 'Params' which makes sense since the shader was not properly compiled. thous I would expect a shader compiler error message.

from bsf.

BearishSun avatar BearishSun commented on August 22, 2024

This is when compiling the shaders through low-level rendering, or are you importing a .bsl shader?

With low-level rendering you need to check for compile status yourself. For example:

SPtr<GpuProgram> prog = ...; // create the shader
prog->blockUntilCoreInitialized();

if (!prog->isCompiled())
    BS_LOG(Error, Renderer, prog->getCompileErrorMessage())

from bsf.

underdoeg avatar underdoeg commented on August 22, 2024

That is with the low level interface. I'll try this tomorrow. Thanks

from bsf.

underdoeg avatar underdoeg commented on August 22, 2024

Yes. That works. Thank you. I still feel like it would be nicer if the engine would report the error itself instead of just crashing. (at least in the debug build)

from bsf.

BearishSun avatar BearishSun commented on August 22, 2024

That's how it used to be, but it's problematic when you have a higher-level shader parsing code that parses the entire BSL file, in which case you want to be able to report all the errors in one place, rather than reporting BSL parsing errors in one spot and individual shader function compilation errors elsewhere.

from bsf.

underdoeg avatar underdoeg commented on August 22, 2024

Ah I see the problem. Well it is called low level interface, so an extra step is not too bad. But couldn't you check before submitting the pipeline to the renderer if the shader is actually compiled?

from bsf.

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.