[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13715] trunk/blender/source/blender/src/ drawimage.c: Images in the image editor were being draw with the wrong glBlendFunc() command

Ton Roosendaal ton at blender.org
Sun Feb 24 10:55:39 CET 2008


Hi,

> I think ton wants to make
> everything work in key alpha anyway,

Also that idea was rejected in the meantime... it's a nasty topic that  
needs more evaluation.
But definitely it's like this:

Key alpha is for:
- painting (Image window)
- composite operations on alpha only (like making masks)
- while rendering a pixel (is a bit like painting...)

Premul alpha is for:
- subsampling
- filtering / blurring
- scaling
- mipmap, etc.

An immediate solution to solve some of the issues is to make a  
AlphaConvert Node in compositor, so you can switch types when needed.

-Ton-


> so there isn't much point to my
> bugfix in that case, especially since it's not working quite correctly
> (texture filtering was also apparently messing up).
>
> Joe
>
> Stéphane SOPPERA wrote:
>> Hi,
>>
>>> Eh it should be GL_ONE by default, after my latest commit.  Hrm.   
>>> The UV
>>> image editor image user should be per-image, but it's not, so if you
>>> have premul on in one, it'll be on for all of them (only used for
>>> displaying images in the uv editor, but still annoying).  Maybe it
>>> wasn't such a good idea to make this an image user flag after all  :/
>>>
>>>
>> Sorry for not replying sooner, I just tested right now.
>> There is a behavior I don't understand:
>> With the file compo.blend linked to the bug report:
>> - run render
>> - in image viewer, change image to cube_premul.exr.png
>> -> since this image is premultiplied, it's now displayed correctly  
>> again
>> - in menu View, select Image Properties
>> - activate premul
>> -> as excepted (since image is already premultiplied), the edges of  
>> the
>> cube are badly drawn
>> - select Render Result
>> -> render result is badly drawn with dark edges (this seems to be the
>> bug you are talking about in above message, right?)
>> - select Viewer Node image
>> -> this image is still drawn as usual, whereas I would have except the
>> bug above should have premultiplied it
>> - select again "cube_premul.exr.png"
>> -> the premul switch is OFF and the image is drawn without dark edges
>>
>> I don't understand in this scenario:
>> - Is the bad draw of Render Result the same problem you talk about in
>> the mail above.
>> - Why this problem does not affect "Viewer Node" image?
>> - Why after viewing "Viewer Node" image the "Premul" button on the
>> cube_premul.exr.png image is reset? (and why Render Result image does
>> not have the same effect).
>> Any idea?
>>
>> Regards,
>> Stephane
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>>
>>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list