Replies: 1 comment
-
Ok, I got some fine results by making this fragment shader here, instead of modifying vertex shader:
The change is line I believe I could make a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks!
As in title - I want my textures to be aligned to world space, with similar effect to this https://www.youtube.com/watch?v=JW8LfB5Gkm0&t=309s
My vertex and fragment shaders come from bevy.
Im experimenting with using
world_position
that is created usingmesh_functions::mesh_position_local_to_world
from this bevy wgsl file that is also used in the (I suppose) default implementation of vertex shader for StandardMaterialFor now I'm trying to simply map xy world coordinates to uv, for now without that good results
out.uv = out.world_position.xy * 0.1;
Here there are no visible artifacts around texture edges, but obviously the uv won't tile as I'd like
https://github.com/bevyengine/bevy/assets/22750053/4187bfca-659e-4b19-b5f9-f6eec7e75fc4
out.uv = fract(out.world_position.xy * 0.1);
The texture is tiling, but I get weird artifacts around texture edges that seem to be influenced by vertexes
App-2024-04-11-22-50-30.mp4
whole shader code
Beta Was this translation helpful? Give feedback.
All reactions