AnnouncementsFunnyVideosMusicAncapsTechnologyEconomicsPrivacyGIFSCringeAnarchyFilmPicsThemesIdeas4MatrixAskMatrixHelpTop Subs
1
Add topics
Comment preview
I spent 12 hours last night trying to get a shader to work. It almost does - GPT has a case of the dumbs. This pic is not that, but its cool. so i put it up here.
[-]x0x7
0(+0|0)
I assume that patterns is some kind of wind like noise? Why does it have an axis of symmetry?
public static float GenerateWoodTexture(int x, int y, float scale, int seed, float ringFrequency = 1f) {
// Directly use seed in the Perlin noise calculation to affect wood ring patterns
float distanceX = x - 0.5f; // Center assumed at 0.5 offset
float distanceY = y - 0.5f;
float distanceToCenter = Mathf.Sqrt(distanceX * distanceX + distanceY * distanceY);
float sineValue = Mathf.Sin(distanceToCenter * ringFrequency + ModifiedPerlinNoise(x, y, scale, seed));
return sineValue * 0.5f + 0.5f; // Normalizing to 0-1
} -- Got Wood?