mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 06:00:20 +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> |
||
---|---|---|
.. | ||
animate_shader.wgsl | ||
array_texture.wgsl | ||
cubemap_unlit.wgsl | ||
custom_gltf_2d.wgsl | ||
custom_material.frag | ||
custom_material.vert | ||
custom_material.wgsl | ||
custom_material_2d.wgsl | ||
custom_material_import.wgsl | ||
custom_material_screenspace_texture.wgsl | ||
custom_phase_item.wgsl | ||
custom_ui_material.wgsl | ||
custom_vertex_attribute.wgsl | ||
extended_material.wgsl | ||
fallback_image_test.wgsl | ||
game_of_life.wgsl | ||
gpu_readback.wgsl | ||
instancing.wgsl | ||
irradiance_volume_voxel_visualization.wgsl | ||
line_material.wgsl | ||
post_processing.wgsl | ||
shader_defs.wgsl | ||
show_prepass.wgsl | ||
specialized_mesh_pipeline.wgsl | ||
storage_buffer.wgsl | ||
texture_binding_array.wgsl | ||
tonemapping_test_patterns.wgsl | ||
water_material.wgsl |