Giter Site home page Giter Site logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Charles Nicholson points out this article from Tom Forsyth about pre-multiplied 
alpha:

http://home.comcast.net/~tom_forsyth/blog.wiki.html#%5B%5BPremultiplied%20alpha%
5D%5D

Original comment by [email protected] on 4 Mar 2008 at 10:59

from nvidia-texture-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Ignacio-

Here's a patch against 2.0.1 with the following features:

InputOptions has "void setPremultiplyAlpha(bool b)", backed by 
InputOptions::Private
"bool premultiplyAlpha".

Compressor has the private method "premultiplyAlphaMipmap(Mipmap&, const
InputOptions::Private&)", that converts the mipmap to a FloatImage, multiplies 
the
RGB channels by A into a new FloatImage, and overwrites the old one with the 
new one.
 This happens after mipmap initialization, but before quantization/compression.

nvcompress.exe has the command-line flag "-premula" to invoke this 
functionality.


The code in Compressor is a little sloppy in that it doesn't confirm the correct
number of channels, or error if conflicting options exist.  I'm pretty sure you 
can
do it to a normal map, which you probably don't want.  I adhered to the coding
standard in as much as i could glean without a doc.

Best,
charles

Original comment by [email protected] on 5 Mar 2008 at 9:49

Attachments:

from nvidia-texture-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
Thanks, I checked that in with some changes. I think alpha premultiplication 
should
be applied in the destination gamma space. If you apply it in linear space, 
then when
you transform the color to gamma space you will also transform the 
premultiplied alpha.

Original comment by [email protected] on 7 Mar 2008 at 1:49

  • Changed state: Started

from nvidia-texture-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024
The cuda compressors now have support for alpha modes.

Original comment by [email protected] on 6 May 2008 at 8:04

from nvidia-texture-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024

Original comment by [email protected] on 11 Oct 2008 at 7:30

  • Added labels: Priority-High
  • Removed labels: Priority-Medium

from nvidia-texture-tools.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 30, 2024

Original comment by [email protected] on 24 Nov 2008 at 10:36

  • Changed state: Fixed

from nvidia-texture-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.