Exemplo n.º 1
0
    public static void uniqueMaterialWithClickableEmission(MeshInstance mesh, out SpatialMaterial material)
    {
        // copy the material to be able to set different seedssss
        material = (SpatialMaterial)mesh.GetSurfaceMaterial(0).Duplicate(true);
        MaterialUtils.setClickableEmission(material);

        mesh.SetSurfaceMaterial(0, material);
    }
Exemplo n.º 2
0
    private void uniqueMaterial()
    {
        var mesh = (MeshInstance)GetNode("DepotMesh");

        // copy the material to be able to set different seeds
        material = (SpatialMaterial)mesh.GetSurfaceMaterial(0).Duplicate(true);
        MaterialUtils.setClickableEmission(material);

        mesh.SetSurfaceMaterial(0, material);
    }
Exemplo n.º 3
0
    private void randomizeGround()
    {
        var mesh = (MeshInstance)this.GetNode("TileMesh");

        // copy the material to be able to set different seeds
        material = (SpatialMaterial)mesh.GetSurfaceMaterial(0).Duplicate(true);
        var noise = (OpenSimplexNoise)((NoiseTexture)material.RoughnessTexture).Noise;

        noise.Seed = rnd.Next();

        material = MaterialUtils.setClickableEmission(material);

        mesh.SetSurfaceMaterial(0, material);
    }