We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I try to fool around with the game of Life playground.
If we take this piece of code
let render = ti.kernel(() => { ti.clearColor(renderTarget, [0.0, 0.0, 0.0, 1.0]); for (let v of ti.inputVertices(vertices)) { ti.outputPosition([v.x, v.y, 0.0, 1.0]); ti.outputVertex(v); } for (let f of ti.inputFragments()) { let coord = (f + 1) / 2.0; let cellIndex = ti.i32(coord * (liveness.dimensions - 1)); let live = ti.f32(liveness[cellIndex]); ti.outputColor(renderTarget, [live, live, live, 1.0]); } });
And let's say I don't want game of life but I want to fill the canvas with red pixel.
let render = ti.kernel(() => { ti.clearColor(renderTarget, [0.0, 0.0, 0.0, 1.0]); for (let v of ti.inputVertices(vertices)) { ti.outputPosition([v.x, v.y, 0.0, 1.0]); ti.outputVertex(v); } for (let f of ti.inputFragments()) { // let coord = (f + 1) / 2.0; // let cellIndex = ti.i32(coord * (liveness.dimensions - 1)); // let live = ti.f32(liveness[cellIndex]); ti.outputColor(renderTarget, [1.0, 0.0, 0.0, 1.0]); } });
I get black canvas and in the console :
Bind group layout index (0) doesn't correspond to a bind group for this pipeline. - While Validating GetBindGroupLayout (0) on [RenderPipeline]
If i uncomment the lines and keep my red pixel, then it work
let render = ti.kernel(() => { ti.clearColor(renderTarget, [0.0, 0.0, 0.0, 1.0]); for (let v of ti.inputVertices(vertices)) { ti.outputPosition([v.x, v.y, 0.0, 1.0]); ti.outputVertex(v); } for (let f of ti.inputFragments()) { let coord = (f + 1) / 2.0; let cellIndex = ti.i32(coord * (liveness.dimensions - 1)); let live = ti.f32(liveness[cellIndex]); ti.outputColor(renderTarget, [1.0, 0.0, 0.0, 1.0]); } });
I've also attempted with removing the lines instead of commenting it.
The text was updated successfully, but these errors were encountered:
Look like it work only if we are "using" some uniform even if we are not using it : Those are two example that work :
for (let f of ti.inputFragments()) { let foo = liveness[[0, 0]]; ti.outputColor(renderTarget, [1.0, 0.0, 0.0, 1.0]); }
for (let f of ti.inputFragments()) { let foo = numNeighbors[[0, 0]]; ti.outputColor(renderTarget, [1.0, 0.0, 0.0, 1.0]); }
So maybe that is a niche bug that occure only when we want a fragment shader that does not use uniforms.
Sorry, something went wrong.
No branches or pull requests
Hello,
I try to fool around with the game of Life playground.
If we take this piece of code
And let's say I don't want game of life but I want to fill the canvas with red pixel.
I get black canvas and in the console :
If i uncomment the lines and keep my red pixel, then it work
I've also attempted with removing the lines instead of commenting it.
The text was updated successfully, but these errors were encountered: