im trying to figure out a way to make a version of a piece of code that is for colors into a compressedtexture2d

here is the code that i need to convert:
self_modulate = Color.WHITE

and this is the compressdtexture2d version (it needs to have an identifier after ".")
self_modulate = CompressedTexture2D.

  • xyz replied to this.

    SuperGibaLogan Assign a shader and multiply the regular texture with modulation texture in the shader (assuming the node is a sprite or a texture rect)

      xyz tried my best to explain

      this only applies to the code, not the actual settings of the node since i already did that

      • xyz replied to this.

        xyz the result i want is to just give it any kind of image texture that relates

        xyz the node already has a sprite though
        or do you mean another one?

        • xyz replied to this.

          SuperGibaLogan So you want do modulate another texture over this sprite's texture? Don't be cryptic. Explain it in detail so we don't need to squeeze information out of you, dragging the thread needlessly 🙂

            xyz i want to modulate the texture as another texture, like it changes the image

            • xyz replied to this.

              xyz right here (it turns from the regular texture to another texture)

              • xyz replied to this.

                xyz yeah kinda except the changed texture completely takes the former texture's spot

                • xyz replied to this.

                  SuperGibaLogan yeah kinda except the changed texture completely takes the former texture's spot

                  That's the definition of crossfade 🙂
                  Put two sprites one over another and animate one's alpha form 0 to 1, and other's alpha form 1 to 0.

                  Alternatively you can do it with a shader. I think I even posted a shader like this long time ago. If you can find it...

                    xyz oh
                    btw i wont rlly do it with a shader, ill do the modulate thing

                    • xyz replied to this.