UV's normal in editor but tiny during runtime

Godot Version

4.5

Question

I’ve got a simple shader meant to display a scrolling star texture, and it looks fine in the editor, but the stars are miniscule during runtime, and I can’t figure out how to scale them up, as the zoom variable only impacts the editor version. I figure it’s likely related to how small the actual image is, but I’d like to be able to adjust the displayed size without increasing the file size.

Don’t use SCREEN_UV in your scale calculation.

What’s the actual effect you’re aiming for?

I want to have a 9 patch mask a scrolling texture. I tried using regular UV but it got messed up at the corners and edges because of the 9 patch.

Project the pattern texture in world or object space; transform the vertex position in vertex function to world space by multiplying with MODELVIEW_MATRIX, scale the result and send it to the fragment function to use as pattern texture UVs.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.