Jump to content

Truelove

Newbies
  • Posts

    4
  • Joined

  • Last visited

About Truelove

  • Birthday 01/01/1970

Profile Information

  • Location
    Minsk, BY

Truelove's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Don't know right I'm or not, but this is new Utility.ClampToByte() code: #region UICode int Amount1 = 0; // [0,255] Transparensy #endregion void Render(Surface dst, Surface src, Rectangle rect) { PdnRegion selectionRegion = EnvironmentParameters.GetSelection(src.Bounds); ColorBgra CurrentPixel; int R, G, B; byte A; for(int y = rect.Top; y < rect.Bottom; y++) { for (int x = rect.Left; x < rect.Right; x++) { CurrentPixel = src[x,y]; R = (int)CurrentPixel.R; G = (int)CurrentPixel.G; B = (int)CurrentPixel.B; A = (byte)(int)(Amount1 - CurrentPixel.A); dst[x,y] = ColorBgra.FromBgra(Utility.ClampToByte(,Utility.ClampToByte(G),Utility.ClampToByte(R),Utility.ClampToByte(A)); } } }
  2. I imagine broken brain, when will try to rewrite new "Alpha Works" code...
  3. Sorry if something going wrong, I've just wrote this source by myself to recreate your work. That's will not happen again.
  4. Very useful with HDR lighting... This is CodeLab code: Enjoy!
×
×
  • Create New...