mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
16b39c2b36
# Objective The Custom Material GLSL shader example has an old version of the camera view uniform structure. This PR updates the example GLSL custom material shader to have the latest structure. ## Solution I was running into issues using the camera world position (it wasn't changing) and someone in discord pointed me to the source of truth. `crates/bevy_render/src/view/view.wgsl` After using this latest uniform structure in my project I'm now able to work with the camera position in my shader. ## Testing I tested this change by running the example with: ```bash cargo run --features shader_format_glsl --example shader_material_glsl ``` <img width="1392" alt="image" src="https://github.com/user-attachments/assets/39fc82ec-ff3b-4864-ad73-05f3a25db483"> --------- Co-authored-by: Carter Anderson <mcanders1@gmail.com> |
||
---|---|---|
.. | ||
android-res/mipmap-mdpi | ||
animation_graphs | ||
branding | ||
data | ||
docs | ||
environment_maps | ||
fonts | ||
irradiance_volumes | ||
lightmaps | ||
models | ||
pixel | ||
scenes | ||
shaders | ||
sounds | ||
textures | ||
volumes |