Comments (3)
Your cbuffer definitely causes the crash. An exception: "Buffer block cannot be expressed as any of std430, std140, scalar, even with enhanced layouts. You can try flattening this block to support a more flexible layout." is thrown.
It works fine when it is reordered in this way (or just float2 before int):
cbuffer cbPerFrame : register(b0)
{
float4x4 matGeo;
float4x4 matVP;
float4x4 matGeoLast;
float4x4 matVPLast;
float4x4 matVInv;
float2 viewport;
int frame;
};
I guess I could encapsulate this in a try-catch block just to prevent crashes. I don't think I can fix it.
Also a quick note: since HLSL is being translated to GLSL, the actual order of variables doesn't matter (like it usually does when using Direct3D). Only the names inside of the cbuffer matter. So you can just reorder variables and it should keep working as expected.
from shadered.
Thanks, this solved the issue for me.
from shadered.
It shouldn't crash anymore.
from shadered.
Related Issues (20)
- Black window on Ubuntu 22.04.1 LTS HOT 4
- Multithread Analyzer
- Export failure: Audio in project leads to failure to build export.cpp
- Outsource build fails
- Bundled packages conflict with standalone packages
- Window contents aren't resized when the wuindow is resized
- Lite: Can't copy or paste anything! HOT 2
- Web version: "Please provide a project file" error
- Changing the "y" of a "float2" inside of a struct changes the "x" too (2D HLSL)
- Gizmo manipulator issue (missing ArrowX point)
- Normal of culled faces sames wrong.
- Can not get spearnode working, need for help.
- using 2 textures in GLSL
- MacOS SpearNode build
- line continuation not supported for this version or the enabled extensions
- HLSL: VSInput semantics have no effect
- Can't use #include in shader
- Add community maintainers to project to address PRs and Issues
- gl_VertexIndex doesnt exist in vulkan glsl
- Problems with text editor find/replace and utf-8 characters.
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 shadered.