Relative Content

Tag Archive for unity-game-enginetexturesurpshader-graphdecal

Unity URP set decal Base Map via script

private void GenerateBrushTexture() { int textureSize = Mathf.CeilToInt(radius * 2); brushTexture = new Texture2D(textureSize, textureSize); for (int x = 0; x < textureSize; x++) { for (int y = 0; y < textureSize; y++) { // Calculate the distance from the center of the texture float distance = Vector2.Distance(new Vector2(x, y), new Vector2(textureSize / 2, […]