Comments (7)
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.
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.
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.
That is with the low level interface. I'll try this tomorrow. Thanks
from bsf.
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.
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.
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)
- Crash on loading skybox texture asset HOT 12
- way to enable vertex program point size with gl renderer HOT 6
- Auto aspect ratio for camera HOT 1
- compiling error in vs 2019 HOT 1
- Vulkan rendering crashing, in master HOT 5
- add dependencies through plugins[Feature] HOT 3
- First example crashes If started directly from visual studio 2019 HOT 1
- Bug: Imgui plugin demo fails compilation
- alternativeto card
- How bout metal and mobile support (ios, android)?
- get exception when closing the my app window
- macOS 10.14+ support
- Mesh and material in one file
- memcpy parameters flipped
- How to turn off the automatic download function in CMAKE
- [PSA] DEAD - Project is [assumed to be] dead HOT 3
- Cmake auto downloading Resource link invalid HOT 1
- [PSA] - Project Death Update HOT 5
- Domain hijacked
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bsf.