Hi, new to shaders in general and WGSL. I want to play around with this shader in bevy: https://godotshaders.com/shader/2d-perspective/ so Im gonna have to port it over.
Problem is I have no idea what I'm doing, lol. So im trying my best here to figure it out on my own, but the resources im finding are not being helpful, or its just a skill issue.
But honestly, I feel like if I can just figure out the "setup" portion (where you define the input bindings) I think i can take care of the rest.
So my current questions are:
- where can I find the documentation on the
@group(x)stuff, cus im not sure which ones to use. Im assuming the bindings are just like array indexes, starting at 0.
So far I have this for the uniform definitions from the godot shader:
@group(2) @binding(0) var<uniform> fov: f32;
@group(2) @binding(1) var<uniform> cull_back: bool;
@group(2) @binding(2) var<uniform> y_rot: f32;
@group(2) @binding(3) var<uniform> x_rot: f32;
@group(2) @binding(4) var<uniform> inset: f32;
Of course, idk if I should be using group 2 for all of them but the answer to this question will help me figure that out.
[gonna ask more question(s) in a second message]