Resources for building custom PBR shaders? #9160
-
Hi all! Today I've dipped my toes into creating a custom WGSL shader for my project. I need to be able to change some of the verts based on some input and to select different textures in the fragment shader based on some other input. I found that parts of the standard PBR shader have been made reusable. However, I haven't been able to quite figure out how it's all supposed to fit together. Are there any resources or examples for this? Things I run into:
As you might see from my questions, I'm far from a shader expert. I've made some shaders in Unity in the past that were based on its standard shader. That's as far as my experience goes. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Currently, your best option is copying as-is the bevy PBR shader and edit it with your modifications. Check out the following repository, it's a good starting point for this: https://github.com/DGriffin91/bevy_mod_standard_material/ |
Beta Was this translation helpful? Give feedback.
-
I have started, but I have not completed it properly. However, I believe you can still make use of some parts of it. Hopefully, it will be helpful. I'm not sure that it works properly but looks good enough ground.wgsl
ground.rs
|
Beta Was this translation helpful? Give feedback.
Currently, your best option is copying as-is the bevy PBR shader and edit it with your modifications.
Check out the following repository, it's a good starting point for this: https://github.com/DGriffin91/bevy_mod_standard_material/