I was trying to create a slightly modified PBR pipeline where I would reposition the vertices in a vertex shader. Other than that I want the usual PBR stuff. For the vertex shader, I tried to copy the file crates/bevy_pbr/src/render/mesh.wgsl(https://github.com/bevyengine/bevy/blob/main/crates/bevy_pbr/src/render/mesh.wgsl) into my own shader file and then do my modifications. However, I get this error:
error: required import 'bevy_render::instance_index' not found
┌─ shaders/curvature_transform.wgsl:6:1
│
6 │ #import bevy_render::instance_index get_instance_index
│ ^
│
= missing import 'bevy_render::instance_index'
This leads me to believe I can't just copy and paste. Is there a simple way of displacing the vertices in a shader and still using the PBR pipeline? I can't do it on the CPU because the displacement is based on the player position and should happen every frame.