[Request] Set pixel color

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I want this simple effect, set pixel (x,y) to color (rgb).

    Basicly the same function as Surface objects "set pixel" action (Surface : Set pixel at (X( "object" ),Y( "object" )) to GetRGB(255, 0, 0))
    The reason I won't use surface object is because it feels wrong to include such a heavy object just for this feature that would be acomplished just as well and faster by a shader, but maybe that's a wrong assumption?

    The shader would have 3 user defined variables (parameters) "Xpixel","Ypixel" and "pixelColor".
    This example would set the pixel at objects position to red:

    Code
    Set effect parameter "Xpixel" to X("object")
    Set effect parameter "Ypixel" to Y("object")
    Set effect parameter "pixelColor" to to GetRGB(255, 0, 0)

    I feel like this should be really simple to do so I tried making this myself but I can't figure out how to set the pixel coordinates and only end up with a fully colored texture...
    Anyway, here's an (incomplete) xml for copy/paste to maybe save you some time and clarify what I want:

    <effect>
    <name>Set pixel</name>
    <description>Sets color of pixel at destination</description>
    // EDIT <author></author>

    <parameter>
    <name>Xpixel</name>
    <code>Xpixel</code>
    <description>Pixel X coordinate.</description>
    // EDIT <type></type>
    <property>edit</property>
    <value>0</value>
    </parameter>

    <parameter>
    <name>Ypixel</name>
    <code>Ypixel</code>
    <description>Pixel Y coordinate.</description>
    // EDIT <type></type>
    <property>edit</property>
    <value>0</value>
    </parameter>

    <parameter>
    <name>pixelColor</name>
    <code>pixelColor</code>
    <description>The color of the pixel.</description>
    <type>int_float4</type>
    <property>color</property>
    </parameter>
    </effect>

  • I’m afraid shader cannot do this, cause it doesn’t save previous result, unless you only need to change one pixel.
    By the way, everything that can display contents has a surface (fusion’s display class), and surface (extension) is a wrapper of surface (class), so it’s not that slow or heavy. Although most of surface class’s functions are done by software, they are already fast enough, besides stretch, rotate and blit. And fusion now provides HWA versions of blitex that do stretch and rotate together.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!