#228 part_color ignores alpha component

unknown
open
nobody
particles (2)
any
5
2014-08-20
2014-08-19
Anonymous
No

Using Gem 0.93.3 on Windows 7 32bit.

I noticed that when using a part_color, the 4th value (alpha component) is ignored. I looked at the code, and I think it is line 56 of part_color.cpp. When rendering, the color is not passed into the function.

Discussion

  • IOhannes m zmölnig

    afaict, this is a limitation of the "particle API" used by Gem.

    while the pColor() function (as used in part_color.cpp:56) has indeed an "alpha" value, this is only a scalar, and not part of the 3D(sic! there's now 4th dimension for the alpha) space that forms a domain.

     
  • Anonymous - 2014-08-20

    Sorry, not sure I understand you. Surely if the line changed from this:

    pColorD(1.0f, PDLine, m_color1[0], m_color1[1], m_color1[2], m_color2[0], m_color2[1], m_color2[2]);
    

    to this:

    pColorD(m_color1[3], PDLine, m_color1[0], m_color1[1], m_color1[2], m_color2[0], m_color2[1], m_color2[2]);
    

    it would at least pay attention to the alpha value of color1?

     
  • IOhannes m zmölnig

    Well yes.
    the question is, whether this is actually useful behaviour...
    e.g. using a linear domain between (1,0,0,0) and (1,1,0,1) will "interpolate" between red and yellow, but the alpha value will be fixed to 0.

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks