BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Color Mask and Blending ... Background  (Read 8924 times)

JeffC

  • Newbie
  • *
  • Posts: 8
    • View Profile
Color Mask and Blending ... Background
« on: June 08, 2020, 01:11:27 PM »

Hi. I would like to (better) understand the EVE engine. I am drawing a red colored rectangle, with COLOR_MASK set to only affect reds, yet the result is a vaguely red rectangle. Allowing green and blue in the COLOR_MASK makes the red rectangle more red. Here's the display list:

CLEAR_COLOR_RGB(127,127,127) // mid grey background
CLEAR(1, 1, 1)
BEGIN(RECTS)

COLOR_RGB(255,0,0)

COLOR_MASK(1, 0, 0, 0)
BLEND_FUNC(ONE, ZERO)
VERTEX2II(124, 309, 0, 0)
VERTEX2II(260, 444, 0, 0)

I thought the math was
target red = ONE (from BLEND_FUNC) * 255 (source color) + ZERO (from BLEND_FUNC) * 127 (destination/background)
target green/blue/alpha unaffected due to COLOR_MASK

What am I missing ? Thanks !
Logged