How can I tile textures and rotate them randomly in multiples of 90?
Asked Answered
V

2

0

There's information on how to do this in Godot 3, but not that many for Godot 4. I tried creating a shader myself but nothing seems to work.

This godot 3 plugin shows kind of what I want to do.

Coming from a tiled texture, I'd like to rotate the UVs around so they feel more natural. This video explains well how to do this in Godot 4.

The issue is, I want the rotation to be in multiples of 90. And by that I mean something like this:

Is this even possible?

Virgiliovirgin answered 16/3 at 2:21 Comment(0)
V
0

This ended up working, it could be done way better, you may have to change some constants for it to work depending on your use

Virgiliovirgin answered 21/3 at 3:10 Comment(0)
I
1

Virgiliovirgin It's possible but if you only rotate by 90 deg increments then you'll lose any rotation blending. It also wouldn't make sense to use voronoi based noise to drive the rotations as it creates irregular areas that can cut through pixels. You'd probably want to use the square grid instead.

Iou answered 16/3 at 12:14 Comment(0)
V
0

This ended up working, it could be done way better, you may have to change some constants for it to work depending on your use

Virgiliovirgin answered 21/3 at 3:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.